Added payment export BOD-147
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -160,6 +160,7 @@ export const UPDATE_INVOICE = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_INVOICES = gql`
|
||||
mutation UPDATE_INVOICES(
|
||||
$invoiceIdList: [uuid!]!
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user