IO-256 Add PVRT handling for QBO.

This commit is contained in:
Patrick Fic
2021-09-24 17:17:23 -07:00
parent 8f2b1f0f78
commit dfa9592755
4 changed files with 34 additions and 28 deletions

View File

@@ -521,7 +521,31 @@ module.exports = function ({
const { ca_bc_pvrt } = jobs_by_pk;
if (ca_bc_pvrt) {
if (qbo) {
// do qbo
InvoiceLineAdd.push({
DetailType: "SalesItemLineDetail",
Amount: Dinero({ amount: (ca_bc_pvrt || 0) * 100 }).toFormat(
DineroQbFormat
),
SalesItemLineDetail: {
ItemRef: {
value: items["PVRT"],
},
Qty: 1,
TaxCodeRef: {
value:
taxCodes[
findTaxCode(
{
local: false,
federal: false,
state: false,
},
bodyshop.md_responsibility_centers.sales_tax_codes
)
],
},
},
});
} else {
InvoiceLineAdd.push({
ItemRef: {