Merged in hotfix/2021-05-31 (pull request #85)
Emergency fix #2 for GST Registrant.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user