Commit abca6c8
feat(OUT-3874): use invoice address to designate tax jurisdiction
Send the customer's address to QBO as BillAddr + ShipAddr so its
Automated Sales Tax engine computes tax by jurisdiction, and record the
amount/tax QBO actually returned rather than the locally-computed values.
- Add getUsStateCode() (us-state-converter) to map a full state name to
the two-letter CountrySubDivisionCode QBO needs.
- Only attach the address when both state and postalCode resolve, the two
fields QBO requires to pin a jurisdiction.
- Gate TxnTaxDetail: send our own tax total when we have one or there is
no usable address; otherwise omit it so QBO computes from the address.
- Log amount/taxAmount from the QBO response (TotalAmt / TxnTaxDetail),
falling back to computed values.
- Make address sub-fields optional so partial addresses on the REST fetch
paths (_getInvoice/_getInvoices .parse) can't abort bulk resync.
- Consolidate InvoiceDeleted/InvoiceVoided response schemas into
InvoiceDestructiveResponseSchema.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 014f212 commit abca6c8
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
835 | 837 | | |
836 | 838 | | |
837 | 839 | | |
| |||
841 | 843 | | |
842 | 844 | | |
843 | 845 | | |
844 | | - | |
| 846 | + | |
845 | 847 | | |
846 | 848 | | |
847 | 849 | | |
| |||
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
888 | | - | |
| 890 | + | |
889 | 891 | | |
890 | 892 | | |
891 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
| |||
0 commit comments