IO-789 Adjust main job query to pull bill data.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user