IO-1336 Resolve towing/storage missing on export.
This commit is contained in:
@@ -389,6 +389,53 @@ const generateInvoiceQbxml = (
|
||||
});
|
||||
});
|
||||
|
||||
//Add Towing, storage and adjustment lines.
|
||||
|
||||
if (jobs_by_pk.towing_payable && jobs_by_pk.towing_payable !== 0) {
|
||||
InvoiceLineAdd.push({
|
||||
ItemRef: {
|
||||
FullName: responsibilityCenters.defaults.profits["TOW"].accountitem,
|
||||
},
|
||||
Desc: responsibilityCenters.defaults.profits["TOW"].accountdesc,
|
||||
Quantity: 1,
|
||||
Amount: Dinero(jobs_by_pk.towing_payable).toFormat(DineroQbFormat),
|
||||
SalesTaxCodeRef: {
|
||||
FullName: "E",
|
||||
},
|
||||
});
|
||||
}
|
||||
if (jobs_by_pk.storage_payable && jobs_by_pk.storage_payable !== 0) {
|
||||
InvoiceLineAdd.push({
|
||||
ItemRef: {
|
||||
FullName: responsibilityCenters.defaults.profits["TOW"].accountitem,
|
||||
},
|
||||
Desc: responsibilityCenters.defaults.profits["TOW"].accountdesc,
|
||||
Quantity: 1,
|
||||
Amount: Dinero(jobs_by_pk.storage_payable).toFormat(DineroQbFormat),
|
||||
SalesTaxCodeRef: {
|
||||
FullName: "E",
|
||||
},
|
||||
});
|
||||
}
|
||||
if (
|
||||
jobs_by_pk.adjustment_bottom_line &&
|
||||
jobs_by_pk.adjustment_bottom_line !== 0
|
||||
) {
|
||||
InvoiceLineAdd.push({
|
||||
ItemRef: {
|
||||
FullName: responsibilityCenters.defaults.profits["TOW"].accountitem,
|
||||
},
|
||||
Desc: responsibilityCenters.defaults.profits["TOW"].accountdesc,
|
||||
Quantity: 1,
|
||||
Amount: Dinero(jobs_by_pk.adjustment_bottom_line).toFormat(
|
||||
DineroQbFormat
|
||||
),
|
||||
SalesTaxCodeRef: {
|
||||
FullName: "E",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//Add tax lines
|
||||
const job_totals = jobs_by_pk.job_totals;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user