Merged in release/2021-09-03 (pull request #193)
IO-1336 Resolve towing/storage missing on export. Approved-by: Patrick Fic
This commit is contained in:
@@ -389,6 +389,63 @@ 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.profits.find(
|
||||||
|
(c) => c.name === responsibilityCenters.defaults.profits["TOW"]
|
||||||
|
).accountitem,
|
||||||
|
},
|
||||||
|
Desc: "Towing",
|
||||||
|
Quantity: 1,
|
||||||
|
Amount: Dinero({
|
||||||
|
amount: Math.round((jobs_by_pk.towing_payable || 0) * 100),
|
||||||
|
}).toFormat(DineroQbFormat),
|
||||||
|
SalesTaxCodeRef: {
|
||||||
|
FullName: "E",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (jobs_by_pk.storage_payable && jobs_by_pk.storage_payable !== 0) {
|
||||||
|
InvoiceLineAdd.push({
|
||||||
|
ItemRef: {
|
||||||
|
FullName: responsibilityCenters.profits.find(
|
||||||
|
(c) => c.name === responsibilityCenters.defaults.profits["TOW"]
|
||||||
|
).accountitem,
|
||||||
|
},
|
||||||
|
Desc: "Storage",
|
||||||
|
Quantity: 1,
|
||||||
|
Amount: Dinero({
|
||||||
|
amount: Math.round((jobs_by_pk.storage_payable || 0) * 100),
|
||||||
|
}).toFormat(DineroQbFormat),
|
||||||
|
SalesTaxCodeRef: {
|
||||||
|
FullName: "E",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
jobs_by_pk.adjustment_bottom_line &&
|
||||||
|
jobs_by_pk.adjustment_bottom_line !== 0
|
||||||
|
) {
|
||||||
|
InvoiceLineAdd.push({
|
||||||
|
ItemRef: {
|
||||||
|
FullName: responsibilityCenters.profits.find(
|
||||||
|
(c) => c.name === responsibilityCenters.defaults.profits["PAO"]
|
||||||
|
).accountitem,
|
||||||
|
},
|
||||||
|
Desc: "Adjustment",
|
||||||
|
Quantity: 1,
|
||||||
|
Amount: Dinero({
|
||||||
|
amount: Math.round((jobs_by_pk.adjustment_bottom_line || 0) * 100),
|
||||||
|
}).toFormat(DineroQbFormat),
|
||||||
|
SalesTaxCodeRef: {
|
||||||
|
FullName: "E",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//Add tax lines
|
//Add tax lines
|
||||||
const job_totals = jobs_by_pk.job_totals;
|
const job_totals = jobs_by_pk.job_totals;
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
|||||||
ro_number
|
ro_number
|
||||||
clm_total
|
clm_total
|
||||||
clm_no
|
clm_no
|
||||||
invoice_allocation
|
|
||||||
ownerid
|
ownerid
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_fn
|
ownr_fn
|
||||||
@@ -92,6 +91,9 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
|||||||
class
|
class
|
||||||
ca_bc_pvrt
|
ca_bc_pvrt
|
||||||
ca_customer_gst
|
ca_customer_gst
|
||||||
|
towing_payable
|
||||||
|
storage_payable
|
||||||
|
adjustment_bottom_line
|
||||||
owner {
|
owner {
|
||||||
accountingid
|
accountingid
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user