Added invoice number checkingBOD-411

This commit is contained in:
Patrick Fic
2020-09-29 14:40:39 -07:00
parent c222e027dd
commit 456ec10942
7 changed files with 82 additions and 1 deletions

View File

@@ -214,3 +214,20 @@ export const UPDATE_BILLS = gql`
}
}
`;
export const CHECK_BILL_INVOICE_NUMBER = gql`
query CHECK_BILL_INVOICE_NUMBER($invoice_number: String!, $vendorid: uuid!) {
bills_aggregate(
where: {
_and: {
invoice_number: { _eq: $invoice_number }
vendorid: { _eq: $vendorid }
}
}
) {
aggregate {
count
}
}
}
`;