mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
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:
1 parent
4f6f81c87a
commit
5b6c1ed2c2
5 files changed
+170
-2
No files matched your search
@@ -27,6 +27,9 @@ class InvoiceSyncService < SyncServiceBase
|
||||
# Man-hours: quantities of the labor products/services (plugin settings)
|
||||
map_attribute(:hours) { |remote| RedmineQboBilling::ManHours.hours(remote) }
|
||||
map_attribute :qbo_updated_at, "meta_data.last_updated_time"
|
||||
# Sales tax, and the day it was paid in full (nil while open), for reports such as monthly paid sales
|
||||
map_attribute(:tax_amount) { |remote| RedmineQboBilling::InvoicePaidOn.tax(remote) }
|
||||
map_attribute(:paid_on) { |remote| RedmineQboBilling::InvoicePaidOn.paid_on(remote) }
|
||||
map_belongs_to :customer
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user