IO-789 Adjust main job query to pull bill data.

This commit is contained in:
Patrick Fic
2021-03-19 15:36:18 -07:00
parent 4fec7cf186
commit 613ab4c540
4 changed files with 38 additions and 71 deletions

View File

@@ -22,26 +22,3 @@ export const INSERT_NEW_BILL_LINES = gql`
}
}
`;
export const QUERY_BILLS_BY_JOB_REF = gql`
query QUERY_BILLS_BY_JOB_REF($jobId: uuid!) {
billlines(
where: { bill: { jobid: { _eq: $jobId } } }
limit: 1
order_by: { bill: { date: desc } }
) {
id
quantity
actual_cost
actual_price
joblineid
bill {
id
vendor {
id
name
}
}
}
}
`;

View File

@@ -521,6 +521,20 @@ export const GET_JOB_BY_PK = gql`
tax_part
db_ref
manual_line
billlines(limit: 1, order_by: { bill: { date: desc } }) {
id
quantity
actual_cost
actual_price
joblineid
bill {
id
vendor {
id
name
}
}
}
parts_order_lines {
id
parts_order {