Update logic to ensure removed lines are always ignored. IO-733

This commit is contained in:
Patrick Fic
2021-03-05 09:34:18 -08:00
parent c4555f7441
commit 22f3f20882
5 changed files with 54 additions and 24 deletions

View File

@@ -205,7 +205,7 @@ query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
target_touchtime
workingdays
}
jobhrs: joblines_aggregate {
jobhrs: joblines_aggregate(where: { removed: { _eq: false } }) {
aggregate {
sum {
mod_lb_hrs
@@ -219,7 +219,7 @@ query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
id
block
job {
joblines_aggregate {
joblines_aggregate(where: { removed: { _eq: false } }) {
aggregate {
sum {
mod_lb_hrs
@@ -231,14 +231,22 @@ query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
jobs(where: {inproduction: {_eq: true}}) {
id
scheduled_completion
labhrs: joblines_aggregate(where: {mod_lbr_ty: {_neq: "LAR"}}) {
labhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
larhrs: joblines_aggregate(where: {mod_lbr_ty: {_eq: "LAR"}}) {
larhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
@@ -532,7 +540,7 @@ exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) {
deliverchecklist
voided
ca_bc_pvrt
joblines{
joblines(where: { removed: { _eq: false } }){
id
line_no
unq_seq