PVRT Handling IO-736
This commit is contained in:
@@ -84,6 +84,7 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
||||
rate_mash
|
||||
rate_matd
|
||||
class
|
||||
ca_bc_pvrt
|
||||
owner {
|
||||
accountingid
|
||||
}
|
||||
|
||||
@@ -226,17 +226,28 @@ function CalculateAdditional(job) {
|
||||
Dinero({
|
||||
amount: Math.round((job.storage_payable || 0) * 100),
|
||||
})
|
||||
)
|
||||
.add(
|
||||
Dinero({
|
||||
amount: Math.round((job.ca_bc_pvrt || 0) * 100),
|
||||
})
|
||||
);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function CalculateTaxesTotals(job, otherTotals) {
|
||||
console.log(
|
||||
"🚀 ~ file: job-totals.js ~ line 240 ~ otherTotals",
|
||||
JSON.stringify(otherTotals)
|
||||
);
|
||||
|
||||
const subtotal = otherTotals.parts.parts.subtotal
|
||||
.add(otherTotals.parts.sublets.subtotal)
|
||||
.add(otherTotals.rates.rates_subtotal)
|
||||
.add(otherTotals.additional)
|
||||
.add(Dinero({ amount: (job.towing_payable || 0) * 100 }))
|
||||
.add(Dinero({ amount: (job.storage_payable || 0) * 100 }));
|
||||
.add(otherTotals.additional);
|
||||
// .add(Dinero({ amount: (job.towing_payable || 0) * 100 }))
|
||||
// .add(Dinero({ amount: (job.storage_payable || 0) * 100 }));
|
||||
|
||||
//Potential issue here with Sublet Calculation. Sublets are calculated under labor in Mitchell, but it's done in IO
|
||||
//Under the parts rates.
|
||||
@@ -247,7 +258,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
||||
job.joblines
|
||||
.filter((jl) => !jl.removed)
|
||||
.forEach((val) => {
|
||||
if (!!!val.tax_part || !!!val.part_type || IsAdditionalCost(val)) {
|
||||
if (!val.tax_part || !val.part_type || IsAdditionalCost(val)) {
|
||||
additionalItemsTax = additionalItemsTax.add(
|
||||
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
|
||||
.multiply(val.part_qty || 1)
|
||||
|
||||
Reference in New Issue
Block a user