Compare commits

...

4 Commits

Author SHA1 Message Date
Patrick Fic
6faf69a875 Emergency fix #2 for GST Registrant. 2021-05-31 18:07:42 -07:00
Patrick Fic
7277688de4 Emergency hotfix for GST registrant. 2021-05-31 17:51:11 -07:00
Patrick Fic
5717677339 Merged in hotfix/2020-05-28 (pull request #78)
Hotfix/2020 05 28 - Production Deployment
2021-05-28 18:28:52 +00:00
Patrick Fic
42356c4e99 Merged in hotfix/2020-05-26 (pull request #71)
Deployment of Hotfix/2020 05 26
2021-05-26 18:24:58 +00:00
2 changed files with 14 additions and 5 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

@@ -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
? Dinero({ amount: 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,