Emergency hotfix for GST registrant.

This commit is contained in:
Patrick Fic
2021-05-31 17:51:11 -07:00
parent 5717677339
commit 7277688de4
2 changed files with 7 additions and 4 deletions

View File

@@ -36,8 +36,11 @@ export function JobsDetailRates({ jobRO, form, job }) {
<CurrencyInput
disabled={jobRO}
max={
((job.job_totals && job.job_totals.totals.federal_tax.amount) ||
0) / 100
Math.round(
(job.job_totals &&
job.job_totals.totals.federal_tax.amount) ||
0
) / 100
}
/>
</Form.Item>

View File

@@ -428,8 +428,8 @@ function CalculateTaxesTotals(job, otherTotals) {
ret.custPayable = {
deductible: Dinero({ amount: (job.ded_amt || 0) * 100 }) || 0,
federal_tax: job.ca_gst_registrant
? job.ca_customer_gst !== 0
? Dinero({ amount: job.ca_customer_gst * 100 })
? job.ca_customer_gst !== 0 || job.ca_customer_gst !== null
? Dinero({ amount: Math.round(job.ca_customer_gst * 100) })
: ret.federal_tax
: Dinero(),
other_customer_amount: Dinero({