Cache invoices' sales tax and the day they were paid in full

New invoices columns tax_amount and paid_on, filled in by the invoice
sync. An invoice is paid in full on the later of its date and the
dates of the payments and credit memos applied to it (local payments
first; QuickBooks only for ones not synced yet and credit memos), so
reports such as the monthly sales commission don't have to read
invoices from QuickBooks. A full sync fills them in for older
invoices; it now syncs payments before invoices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-17 18:34:21 -05:00
1 parent 4f6f81c87a
commit 5b6c1ed2c2
5 files changed
+170 -2

No files matched your search

+3 -2
View File
@@ -10,12 +10,13 @@
class QboSyncDispatcher
# Payments before invoices: an invoice's paid-in-full day is worked out from the local payments' dates
SYNC_JOBS = [
Customer,
Estimate,
Payment,
Invoice,
Employee,
Payment
Employee
].freeze
# Dispatches all synchronization jobs to perform a full sync of QuickBooks entities with the local database.