IO-975 IO-978 IO-922 Multiple bug fixes.

This commit is contained in:
Patrick Fic
2021-05-03 11:53:23 -07:00
parent bf77bbd4ee
commit 1482786b2c
18 changed files with 1722 additions and 32 deletions

View File

@@ -85,6 +85,7 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
rate_matd
class
ca_bc_pvrt
ca_customer_gst
owner {
accountingid
}
@@ -540,6 +541,7 @@ exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) {
deliverchecklist
voided
ca_bc_pvrt
ca_customer_gst
joblines(where: { removed: { _eq: false } }){
id
line_no
@@ -630,6 +632,7 @@ exports.QUERY_JOB_COSTING_DETAILS = ` query QUERY_JOB_COSTING_DETAILS($id: uuid!
actual_in
status
ca_bc_pvrt
ca_customer_gst
joblines(where: { removed: { _eq: false } }) {
id
unq_seq
@@ -729,6 +732,7 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT
actual_in
status
ca_bc_pvrt
ca_customer_gst
joblines(where: {removed: {_eq: false}}) {
id
unq_seq

View File

@@ -401,7 +401,11 @@ function CalculateTaxesTotals(job, otherTotals) {
ret.custPayable = {
deductible: Dinero({ amount: (job.ded_amt || 0) * 100 }) || 0,
federal_tax: job.ca_gst_registrant ? ret.federal_tax : Dinero(),
federal_tax: job.ca_gst_registrant
? job.ca_customer_gst !== 0
? Dinero({ amount: job.ca_customer_gst * 100 })
: ret.federal_tax
: Dinero(),
other_customer_amount: Dinero({
amount: (job.other_amount_payable || 0) * 100,
}),