Modification to Credits not Received.

This commit is contained in:
Patrick Fic
2022-04-21 11:45:41 -07:00
parent 51843f364b
commit 49818cc043
20 changed files with 511 additions and 26 deletions

View File

@@ -86,6 +86,7 @@ export const QUERY_BILLS_BY_JOBID = gql`
job_line_id
part_type
cost
cm_received
jobline {
id
part_type
@@ -124,7 +125,7 @@ export const QUERY_BILLS_BY_JOBID = gql`
applicable_taxes
deductedfromlbr
lbr_adjustment
jobline{
jobline {
oem_partno
part_type
}
@@ -164,7 +165,7 @@ export const QUERY_BILL_BY_PK = gql`
cost_center
quantity
joblineid
jobline{
jobline {
oem_partno
part_type
}

View File

@@ -72,7 +72,7 @@ export const QUERY_PARTS_ORDER_OEC = gql`
part_type
}
job {
bodyshop{
bodyshop {
shopname
bill_tax_rates
}
@@ -292,6 +292,22 @@ export const DELETE_PARTS_ORDER = gql`
}
`;
export const MUTATION_UPDATE_PO_CM_REECEIVED = gql`
mutation MUTATION_UPDATE_PO_CM_REECEIVED(
$partsLineId: uuid!
$partsOrder: parts_order_lines_set_input
) {
update_parts_order_lines(
where: { id: { _eq: $partsLineId } }
_set: $partsOrder
) {
returning {
id
cm_received
}
}
}
`;
export const MUTATION_UPDATE_BO_ETA = gql`
mutation MUTATION_UPDATE_BO_ETA(
$partsLineId: uuid!
@@ -339,3 +355,36 @@ export const MUTATION_BACKORDER_PART_LINE = gql`
}
}
`;
export const QUERY_UNRECEIVED_LINES = gql`
query QUERY_UNRECEIVED_LINES($jobId: uuid!, $vendorId: uuid!) {
parts_order_lines(
where: {
parts_order: { jobid: { _eq: $jobId }, vendorid: { _eq: $vendorId } }
cm_received: { _neq: true }
}
) {
cm_received
id
line_desc
quantity
act_price
cost
oem_partno
}
}
`;
export const MUTATION_MARK_RETURN_RECEIVED = gql`
mutation MUTATION_MARK_RETURN_RECEIVED($partsLineIds: [uuid!]!) {
update_parts_order_lines(
where: { id: { _in: $partsLineIds } }
_set: { cm_received: true }
) {
returning {
id
cm_received
}
}
}
`;