Emergency fix #2 for GST Registrant.

This commit is contained in:
Patrick Fic
2021-05-31 18:07:42 -07:00
parent 7277688de4
commit 6faf69a875

View File

@@ -425,12 +425,18 @@ function CalculateTaxesTotals(job, otherTotals) {
.add(ret.state_tax)
.add(ret.local_tax);
console.log(
"Checking GST",
job.ca_customer_gst !== 0,
job.ca_customer_gst !== null
);
ret.custPayable = {
deductible: Dinero({ amount: (job.ded_amt || 0) * 100 }) || 0,
federal_tax: job.ca_gst_registrant
? job.ca_customer_gst !== 0 || job.ca_customer_gst !== null
? Dinero({ amount: Math.round(job.ca_customer_gst * 100) })
: ret.federal_tax
? job.ca_customer_gst === 0 || job.ca_customer_gst === null
? ret.federal_tax
: Dinero({ amount: Math.round(job.ca_customer_gst * 100) })
: Dinero(),
other_customer_amount: Dinero({
amount: (job.other_amount_payable || 0) * 100,