Skip to content

Commit 52adc9e

Browse files
Adding disbursement counts to reconciliations summary
1 parent 44bc7d8 commit 52adc9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jobs/notebook-report/reports/reconciliation_summary.ipynb

+4-1
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,18 @@
376376
" csv_paid_total = csv_paid_only.sum()\n",
377377
" csv_count_total = csv_paid_only.count()\n",
378378
" disbursed_amount = 0\n",
379+
" disbursement_counts = 0\n",
379380
" if reconciliation_disbursed is not None and reconciliation_disbursed.empty is False:\n",
380381
" disbursed_amount = reconciliation_disbursed.query(\"disbursement_status_code == 'COMPLETED' and (disbursement_date_pacific >= @from_date_disbursement and disbursement_date_pacific <= @to_date_disbursement)\").get('disbursed_amount', 0).sum()\n",
382+
" disbursement_counts = reconciliation_disbursed.query(\"disbursement_status_code == 'COMPLETED' and (disbursement_date_pacific >= @from_date_disbursement and disbursement_date_pacific <= @to_date_disbursement)\").get('disbursed_amount', 0).count()\n",
381383
" format_currency = lambda x: f\"$ {x:,.2f}\"\n",
382384
" format_number = lambda x: f\"{x:,.0f}\"\n",
383385
" table_rows = [{\n",
384386
" 'registry': partner_code,\n",
385387
" 'totalPayment': format_currency(csv_paid_total),\n",
386388
" 'transactionCounts': format_number(csv_count_total),\n",
387-
" 'totalDisbursement': format_currency(disbursed_amount)\n",
389+
" 'totalDisbursement': format_currency(disbursed_amount),\n",
390+
" 'disbursementCounts' : format_number(disbursement_counts)\n",
388391
" }]\n",
389392
"\n",
390393
" current_date = datetime.now(tz=timezone.utc).strftime(\"%B %d, %Y\")\n",

0 commit comments

Comments
 (0)