Add bill ref to job lines table. IO-582

This commit is contained in:
Patrick Fic
2021-01-20 09:56:59 -08:00
parent 4228d1f13d
commit e82e1215ea
7 changed files with 134 additions and 25 deletions

View File

@@ -22,3 +22,26 @@ 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
}
}
}
}
`;