-
Notifications
You must be signed in to change notification settings - Fork 104
Fix invoice serialization to QBO #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the invoice serialization logic to include an explicit account reference for each line item, depending on its type. Corresponding tests are enhanced to verify serialization of both standard and expense line items, ensuring the correct account references are present in the serialized output. Changes
Sequence Diagram(s)sequenceDiagram
participant Invoice
participant InvoiceSerializer
participant LineItem
participant Integration
Invoice->>InvoiceSerializer: serialize(invoice)
loop for each line_item
InvoiceSerializer->>LineItem: check type
alt InvoiceExpense
LineItem->>InvoiceSerializer: provide expense_account_id
else
InvoiceSerializer->>Integration: get consulting_services_expense_account_id
end
InvoiceSerializer->>InvoiceSerializer: build line item hash with AccountRef
end
InvoiceSerializer->>Invoice: return serialized invoice with line items
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Follow-up to #259. Fixes an error when syncing invoices to QBO.
Summary by CodeRabbit
New Features
Tests