Added payment export BOD-147

This commit is contained in:
Patrick Fic
2020-06-30 16:23:25 -07:00
parent f1f9d7424b
commit 044fb4b9e0
29 changed files with 960 additions and 286 deletions

View File

@@ -48,3 +48,29 @@ export const QUERY_INVOICES_FOR_EXPORT = gql`
}
}
`;
export const QUERY_PAYMENTS_FOR_EXPORT = gql`
query QUERY_PAYMENTS_FOR_EXPORT {
payments(
where: { exportedat: { _eq: null } }
order_by: { created_at: desc }
) {
id
amount
job {
ro_number
est_number
id
ownr_fn
ownr_ln
ownr_co_nm
}
payer
memo
exportedat
stripeid
created_at
transactionid
}
}
`;

View File

@@ -160,6 +160,7 @@ export const UPDATE_INVOICE = gql`
}
}
`;
export const UPDATE_INVOICES = gql`
mutation UPDATE_INVOICES(
$invoiceIdList: [uuid!]!

View File

@@ -48,3 +48,28 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
}
}
`;
export const UPDATE_PAYMENT = gql`
mutation UPDATE_PAYMENT($paymentId: uuid!, $payment: payments_set_input!) {
update_payments(where: { id: { _eq: $paymentId } }, _set: $payment) {
returning {
id
exported_at
}
}
}
`;
export const UPDATE_PAYMENTS = gql`
mutation UPDATE_PAYMENTS(
$paymentIdList: [uuid!]!
$payment: payments_set_input!
) {
update_payments(where: { id: { _in: $paymentIdList } }, _set: $payment) {
returning {
id
exportedat
}
}
}
`;