You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duane has requested we should include the payment line items description, plus the counts of each Ewills product on a monthly basis.
We also need an adhoc run to grab the existing invoices + payment line items + descriptions + counts by month to cover the past months.
Example query:
SELECT count(*) as transaction_count, sum(i.total - i.service_fees) as subtotal, sum(i.service_fees) as service_fees, sum(i.total) as total, (payment_date)::date, description, payment_method_code, corp_type_code
FROM invoices i join payment_line_items pli on i.id = pli.invoice_id
WHERE corp_type_code = 'VS'
AND invoice_status_code = 'PAID'
AND payment_method_code in ('PAD','EJV', 'DIRECT_PAY')
AND date(payment_date) > date(current_date - 1 - interval '1 months')
AND date(payment_date) <= date(current_date - 1)
GROUP BY (payment_date)::date, payment_method_code, corp_type_code, description
order by payment_date, description, payment_method_code;
Should probably include DRAWDOWN and filter by disbursement date (note DRAWDOWN isnt disbursed) -^
This runs off of a cronjob in Openshift in the pay namespace.
The text was updated successfully, but these errors were encountered:
Steven Chen has created these for us:
https://github.com/bcgov/sbc-pay/blob/main/jobs/notebook-report/daily/reconciliation_details.ipynb
https://github.com/bcgov/sbc-pay/blob/main/jobs/notebook-report/monthly/reconciliation_summary.ipynb
Duane has requested we should include the payment line items description, plus the counts of each Ewills product on a monthly basis.
We also need an adhoc run to grab the existing invoices + payment line items + descriptions + counts by month to cover the past months.
Example query:
SELECT count(*) as transaction_count, sum(i.total - i.service_fees) as subtotal, sum(i.service_fees) as service_fees, sum(i.total) as total, (payment_date)::date, description, payment_method_code, corp_type_code
FROM invoices i join payment_line_items pli on i.id = pli.invoice_id
WHERE corp_type_code = 'VS'
AND invoice_status_code = 'PAID'
AND payment_method_code in ('PAD','EJV', 'DIRECT_PAY')
AND date(payment_date) > date(current_date - 1 - interval '1 months')
AND date(payment_date) <= date(current_date - 1)
GROUP BY (payment_date)::date, payment_method_code, corp_type_code, description
order by payment_date, description, payment_method_code;
Should probably include DRAWDOWN and filter by disbursement date (note DRAWDOWN isnt disbursed) -^
This runs off of a cronjob in Openshift in the pay namespace.
The text was updated successfully, but these errors were encountered: