Merged in hotfix/2021-06-08 (pull request #100)
Add rounding for depreciation.
This commit is contained in:
@@ -432,16 +432,18 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
ret.custPayable = {
|
ret.custPayable = {
|
||||||
deductible: Dinero({ amount: (job.ded_amt || 0) * 100 }) || 0,
|
deductible: Dinero({ amount: Math.round((job.ded_amt || 0) * 100) }) || 0,
|
||||||
federal_tax: job.ca_gst_registrant
|
federal_tax: job.ca_gst_registrant
|
||||||
? job.ca_customer_gst === 0 || job.ca_customer_gst === null
|
? job.ca_customer_gst === 0 || job.ca_customer_gst === null
|
||||||
? ret.federal_tax
|
? ret.federal_tax
|
||||||
: Dinero({ amount: Math.round(job.ca_customer_gst * 100) })
|
: Dinero({ amount: Math.round(job.ca_customer_gst * 100) })
|
||||||
: Dinero(),
|
: Dinero(),
|
||||||
other_customer_amount: Dinero({
|
other_customer_amount: Dinero({
|
||||||
amount: (job.other_amount_payable || 0) * 100,
|
amount: Math.round((job.other_amount_payable || 0) * 100),
|
||||||
|
}),
|
||||||
|
dep_taxes: Dinero({
|
||||||
|
amount: Math.round((job.depreciation_taxes || 0) * 100),
|
||||||
}),
|
}),
|
||||||
dep_taxes: Dinero({ amount: (job.depreciation_taxes || 0) * 100 }),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ret.custPayable.total = ret.custPayable.deductible
|
ret.custPayable.total = ret.custPayable.deductible
|
||||||
|
|||||||
Reference in New Issue
Block a user