From a15be50c68a27590e2df3e70f07719c7149dce9f Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Thu, 4 Dec 2025 11:59:27 -0800 Subject: [PATCH 1/2] 28787 - Updates for statement calculation refactor on pay-api (#227) --- .../report-templates/generic_footer.html | 2 +- .../report-templates/statement_details.html | 20 +- .../report-templates/statement_header.html | 2 +- .../report-templates/statement_report.html | 76 +++-- .../statement_transactions.html | 315 +++++++++++------- .../src/api/services/chunk_report_service.py | 4 +- report-api/src/api/services/report_service.py | 4 +- report-api/tests/unit/api/test_reports.py | 2 +- 8 files changed, 276 insertions(+), 149 deletions(-) diff --git a/report-api/report-templates/generic_footer.html b/report-api/report-templates/generic_footer.html index 8f028fe2..bfc48d5c 100644 --- a/report-api/report-templates/generic_footer.html +++ b/report-api/report-templates/generic_footer.html @@ -33,7 +33,7 @@ {% endif %} {% endif %} {% endif %} - {% elif statement and statement.is_interim_statement %} + {% elif statement and statement.isInterimStatement %} Interim Account Statement #{{statement.id}} {% elif statement %} Account Statement #{{statement.id}} diff --git a/report-api/report-templates/statement_details.html b/report-api/report-templates/statement_details.html index eb3e53d8..570f0829 100644 --- a/report-api/report-templates/statement_details.html +++ b/report-api/report-templates/statement_details.html @@ -6,27 +6,27 @@
Account Number: {{ account.id }}
{% if not summary_header_text and groupedInvoices %} {% if payment_method == 'PAD' %} -
Pre-Authorized Debit Totals: ${{ '%.2f' % data.totals_summary }}
-
Amount Owing: ${{ '%.2f' % data.due_summary }}
+
Pre-Authorized Debit Totals: ${{ data.totals }}
+
Amount Owing: ${{ data.due }}
{% elif payment_method == 'ONLINE_BANKING' %} -
Online Banking Totals: ${{ '%.2f' % data.totals_summary }}
+
Online Banking Totals: ${{ data.totals }}
{% elif payment_method in ['DIRECT_PAY', 'CC'] %} -
Credit Card Totals: ${{ '%.2f' % data.totals_summary }}
+
Credit Card Totals: ${{ data.totals }}
{% elif payment_method == 'DRAWDOWN' %} -
BC OnLine Totals: ${{ '%.2f' % data.totals_summary }}
+
BC OnLine Totals: ${{ data.totals }}
{% elif payment_method == 'EJV' %} -
Electronic Journal Voucher Totals: ${{ '%.2f' % data.totals_summary }}
+
Electronic Journal Voucher Totals: ${{ data.totals }}
{% endif %} {% if eft_payment %} -
EFT Totals: ${{ '%.2f' % data.totals_summary }}
-
Amount Owing: ${{ '%.2f' % data.due_summary }}
+
EFT Totals: ${{ data.totals }}
+
Amount Owing: ${{ data.due }}
{% if statementSummary.dueDate %}
Payment Due Date: {{ statementSummary.dueDate }}
{% endif %} {% else %} -
Amount Paid: ${{ '%.2f' % data.paid_summary }}
+
Amount Paid: ${{ data.paid }}
{% endif %} - {% if statement.is_interim_statement and payment_method == 'EFT' %} + {% if statement.isInterimStatement and payment_method == 'EFT' %}
Payment Received Date: {{ statementSummary.latestStatementPaymentDate }}
diff --git a/report-api/report-templates/statement_header.html b/report-api/report-templates/statement_header.html index 7885e086..d2845171 100644 --- a/report-api/report-templates/statement_header.html +++ b/report-api/report-templates/statement_header.html @@ -25,7 +25,7 @@ {% if is_payment_instructions %}
BC Registries And Online Services
- {% elif statement.from_date or statement.to_date %} + {% elif statement.fromDate or statement.toDate %}
{{ statement.duration }}
diff --git a/report-api/report-templates/statement_report.html b/report-api/report-templates/statement_report.html index 7f61e76e..44231486 100644 --- a/report-api/report-templates/statement_report.html +++ b/report-api/report-templates/statement_report.html @@ -67,6 +67,13 @@ width: 100%; } + .statement-totals{ + border: 3px solid #e2e7ed; + margin-top: 20px; + margin-bottom: 20px; + padding-bottom: 20px; + } + .wordmark { font-family: Georgia, 'Times New Roman', Times, serif; } @@ -276,12 +283,17 @@ .transaction-table { margin: 0px 24px 16px; width: 690px; + border-bottom: 1px solid #bcbec5; } .transaction-table thead tr, .transaction-table tbody tr { line-height: 3; font-size: 12px; + border-top: 1px solid #bcbec5; + } + .transaction-table tbody tr.no-top-border { + border-top: transparent; border-bottom: 1px solid #bcbec5; } @@ -324,12 +336,36 @@ border-bottom: 1px solid #b3bac3; } - .total-elements_no_border { + .total-elements-bottom-border { + margin: 0px 24px; + font-size: 14px; + padding-bottom: 10px; + border-bottom: 2px solid #b3bac3; + } + + .total-elements-no-border { margin: 0px 24px; font-size: 14px; border-bottom: none; } + .transaction-summary-row { + margin: 0px 24px; + padding: 10px 0; + font-size: 14px; + border-bottom: 2px solid #b3bac3; + } + + .total-elements-last-row { + margin: 0px 24px; + padding: 0 0 10px 0; + border: none; + } + + .statement-subline{ + margin-left: 60px; + } + .total-elements-price { float: right; font-family: 'BCSans-Regular', sans-serif; @@ -414,33 +450,33 @@ - {% for data in groupedInvoices %} - {% set payment_method = data.payment_method %} - {% set transactions = data.transactions %} - {% set total_paid = data.total_paid %} - {% set latest_payment_date = data.latest_payment_date if 'latest_payment_date' in data else None %} - {% set due_date = data.due_date if 'due_date' in data else None %} - {% set eft_payment = payment_method == 'EFT' %} - {% set statement_header_text = data.statement_header_text %} - {% set include_service_provided = data.include_service_provided %} -
- {% include 'report-templates/statement_header.html' with context %} -
- - {% include 'report-templates/statement_details.html' with context %} - {% include 'report-templates/statement_transactions.html' with context %} - {% endfor %} - {% if not groupedInvoices %} + {% if not groupedInvoices or groupedInvoices|length == 0 %}
{% include 'report-templates/statement_header.html' %}
{% include 'report-templates/statement_details.html' %} {% include 'report-templates/statement_transactions.html' %} - {% endif %} + {% else %} + {% for data in groupedInvoices %} + {% set payment_method = data.paymentMethod %} + {% set transactions = data.transactions %} + {% set total_paid = data.total_paid %} + {% set latest_payment_date = data.latestPaymentDate if 'latest_payment_date' in data else None %} + {% set due_date = data.dueDate if 'due_date' in data else None %} + {% set eft_payment = payment_method == 'EFT' %} + {% set statement_header_text = data.statementHeaderText %} + {% set include_service_provided = data.includeServiceProvided %} +
+ {% include 'report-templates/statement_header.html' with context %} +
+ {% include 'report-templates/statement_details.html' with context %} + {% include 'report-templates/statement_transactions.html' with context %} + {% endfor %} + {% endif %} {% for data in groupedInvoices %} - {% if hasPaymentInstructions and data.payment_method == 'EFT' %} + {% if hasPaymentInstructions and data.paymentMethod == 'EFT' %} {% set payment_method = 'EFT' %} {% set is_payment_instructions = true %}
diff --git a/report-api/report-templates/statement_transactions.html b/report-api/report-templates/statement_transactions.html index adc73845..c944ed86 100644 --- a/report-api/report-templates/statement_transactions.html +++ b/report-api/report-templates/statement_transactions.html @@ -1,134 +1,93 @@
- - - - - - - -
-
- Transactions -
-
-
- Number of Transactions: {{ transactions|length }} -
-
- {% if transactions %} - - - - - - - - - - - {% for row in transactions %} +
Product PurchasedFolioDateFeeService FeeGSTTotal
+ {% if payment_method in ['EFT', 'PAD'] %} - - - - - - - + - {% endfor %} -
- {% for product in row.products %} -
{{ product }}
- {% endfor %} - {% if row.details %} -
- {% for detail in row.details %} -
{{ detail }}
- {% endfor %} -
- {% endif %} -
{{ row.folio }}{{ row.created_on }}${{ row.fee }}${{ row.service_fee }}${{ row.gst }} - ${{ row.total }} - {% if row.status_code == 'APPROVED' %} -
(Pending) - {% endif %} -
+
Previous Statement
+
- {% endif %} - + + + + + + + + + + {% endif %} - {% if data and data.refunds_total %} + {% if data and data.creditsApplied and data.creditsApplied != "0.00" %} {% endif %} - {% if data and data.credits_total %} + {% if payment_method == 'PAD' %} + + + {% endif %} - - - {% if payment_method == 'EFT' %} - {% if statementSummary.cancelledTransactions %} + {% if statementSummary.cancelledTransactions and statementSummary.cancelledTransactions != '0.00' %} {% endif %} - {% if statement.is_interim_statement %} + {% if statement.isInterimStatement %} {% else %} - - - {% if payment_method == 'DIRECT_PAY' or payment_method == 'CC' or payment_method == 'EFT' or payment_method == 'ONLINE_BANKING' %} {% endif %} {% endif %} {% if payment_method == 'PAD' %} - {% if data.due_summary %} + {% if data.due %} {% endif %} @@ -223,6 +177,143 @@ {% endif %} {% endif %} +
+
+ Previous Balance: + ${{ statementSummary.lastStatementTotal if statementSummary.lastStatementTotal else '0.00' }} +
+
+
+ Payments received ({{statementSummary.latestStatementPaymentDate}}) + {{ '$0.00' if not statementSummary or statementSummary.lastStatementPaidAmount == '0.00' else '-$' + data.paid }} +
+
+
+ Balance Forward (From {{ statement.fromDate }}): + ${{ statementSummary.balanceForward }} +
+
-
- {% if payment_method == 'PAD' %} - Pre-Authorized Debit Totals - {% elif payment_method == 'ONLINE_BANKING' %} - Online Banking Totals - {% elif payment_method == 'CC' or pm == 'DIRECT_PAY' %} - Credit Card Totals - {% elif payment_method == 'DRAWDOWN' %} - BC OnLine Totals - {% elif payment_method == 'EJV' %} - Electronic Journal Voucher Totals - {% elif payment_method == 'EFT' %} - Electronic Funds Transfer Totals - {% else %} - Totals - {% endif %} -
+
Current Statement
-
+
Fees: - ${{ '%.2f' % (data.fees_total if data else 0.0) }} + ${{ data.fees if data else '0.0' }}
-
+
Service Fees: - ${{ '%.2f' % (data.service_fees_total if data else 0.0) }} + ${{ data.serviceFees if data else '0.0' }}
-
+
GST: - ${{ '%.2f' % (data.gst_total if data else 0.0) }} + ${{ data.gst if data else '0.0' }}
-
- Refunds Received: - ${{ '%.2f' % (data.refunds_total if data else 0.0) }} +
+ Credits applied (from {{statement.duration}}): + {{ '$0.00' if not data or data.creditsApplied == '0.00' else '-$' + data.creditsApplied }}
-
- Credits Received: - ${{ '%.2f' % (data.credits_total if data else 0.0) }} +
+ Current Statement Total: + ${{ data.totals if data else '0.0' }}
+
+ Pre-Authorized Debit Amount Processed: + {{ '$0.00' if not data or data.paid == '0.00' else '-$' + data.paid }} +
+
-
- Total: - ${{ '%.2f' % (data.totals_summary if data else 0.0) }} -
-
@@ -146,7 +105,7 @@
@@ -157,12 +116,12 @@
Total Amount Paid: - ${{ data.paid_summary }} + ${{ data.paid }}
{% if statementSummary.latestStatementPaymentDate %}
Paid on {{ statementSummary.latestStatementPaymentDate }}
@@ -173,42 +132,37 @@
- Total Amount Owing: - ${{ '%.2f' % data.due_summary }} + Total Amount Due: + ${{ data.due if data else '0.0'}}
- {% if not statement.is_interim_statement %} + {% if not statement.isInterimStatement %}
Payment Due Date: {{ statementSummary.dueDate }}
{% endif %}
-
- Amount Paid: - ${{ '%.2f' % (data.paid_summary if data else 0.0) }} -
-
Total Amount Due: - ${{ '%.2f' % (data.due_summary if data else 0.0) }} + ${{ data.due if data else '0.0' }}
- Total Amount Owing: - ${{ '%.2f' % data.due_summary }} + Total Amount Due: + ${{ data.due }}
+
+ Will be withdrawn within 1-3 business days after the transaction date. +
+ + + + + + + +
+
+ Transactions from {{ statement.duration }} +
+
+
+ Number of Transactions: {{ transactions|length }} +
+
+ {% if transactions %} + + + + + + + + + + + {% for row in transactions %} + + + + + + + + + + {% if row.appliedCredits %} + + + + + + + + + + {% endif %} + {% set status_text = { + 'CANCELLED': 'Service Cancelled', + 'REFUNDED': 'Refunded', + 'CREDITED': 'Credited', + 'PARTIALLY_REFUNDED': 'Partially Refunded', + 'PARTIALLY_CREDITED': 'Partially Credited' + } %} + {% if row.statusCode in status_text %} + + + + + + + + + + {% endif %} + {% endfor %} +
Product PurchasedFolioDateFeeService FeeGSTTotal
+ {% for product in row.products %} +
{{ product }}
+ {% endfor %} + {% if row.details %} +
+ {% for detail in row.details %} +
{{ detail }}
+ {% endfor %} +
+ {% endif %} + {% if row.statusCode in ['Refund complete', 'PARTIALLY_REFUNDED'] %} +
+ {% if row.statusCode == 'Refund complete' %} + Refunds + {% elif row.statusCode == 'PARTIALLY_REFUNDED' %} + Partially Refunds + {% endif %} +
+ {% for product in row.products %} +
For: {{ product }}
+ {% endfor %} +
Refunded Transaction ID: {{ row.id }}
+ {% endif %} +
{{ row.folio }}{{ row.createdOn }}${{ row.fee }}${{ row.serviceFee }}${{ row.gst }} + ${{ row.total }} + {% if row.statusCode == 'APPROVED' %} +
(Pending) + {% endif %} +
+
Account Credit Applied
+
+ {% if row.isFullAppliedCredits %} +
{{ '$0.00' if row.fee == '0.00' else '-$' + row.fee }}
+ {% else %} +
{{ '$0.00' if row.appliedCreditsAmount == '0.00' else '-$' + row.appliedCreditsAmount }}
+ {% endif %} +
+ {% if row.isFullAppliedCredits %} +
{{ '$0.00' if row.serviceFee == '0.00' else '-$' + row.serviceFee }}
+ {% endif %} +
+ {% if row.isFullAppliedCredits %} +
{{ '$0.00' if row.gst == '0.00' else '-$' + row.gst }}
+ {% endif %} +
+
{{ '$0.00' if row.appliedCreditsAmount == '0.00' else '-$' + row.appliedCreditsAmount }}
+
+ {% for product in row.products %} +
{{ product }} ({{ status_text[row.statusCode] }})
+ {% endfor %} + {% if row.details %} +
+ {% for detail in row.details %} +
{{ detail }}
+ {% endfor %} +
+ {% endif %} +
{{ row.folio }}{{ row.refundDate }}{{ '$0.00' if row.fee == '0.00' else '-$' + row.fee }}{{ '$0.00' if row.serviceFee == '0.00' else '-$' + row.serviceFee }}{{ '$0.00' if row.gst == '0.00' else '-$' + row.gst }}{{ '$0.00' if row.total == '0.00' else '-$' + row.total }}
+ + +
+ Current Statement Total: + ${{ data.totals if data else '0.0' }} +
+ + + {% endif %} + {% if include_service_provided and payment_method == 'PAD' %} diff --git a/report-api/report-templates/statement_header.html b/report-api/report-templates/statement_header.html index d2845171..3ea603e0 100644 --- a/report-api/report-templates/statement_header.html +++ b/report-api/report-templates/statement_header.html @@ -36,7 +36,7 @@ {% if not is_payment_instructions %} diff --git a/report-api/report-templates/statement_report.html b/report-api/report-templates/statement_report.html index 44231486..88aafcd0 100644 --- a/report-api/report-templates/statement_report.html +++ b/report-api/report-templates/statement_report.html @@ -70,8 +70,10 @@ .statement-totals{ border: 3px solid #e2e7ed; margin-top: 20px; - margin-bottom: 20px; - padding-bottom: 20px; + border-collapse: separate; + border-spacing: 0 0; + padding-top: 15px; + padding-bottom: 15px; } .wordmark { @@ -336,6 +338,13 @@ border-bottom: 1px solid #b3bac3; } + .total-elements-top-border { + margin: 10px 24px 0 24px; + padding: 10px 0; + font-size: 14px; + border-top: 1px solid #b3bac3; + } + .total-elements-bottom-border { margin: 0px 24px; font-size: 14px; @@ -479,7 +488,7 @@ {% if hasPaymentInstructions and data.paymentMethod == 'EFT' %} {% set payment_method = 'EFT' %} {% set is_payment_instructions = true %} -
+
{% include 'report-templates/statement_header.html' %}

Payment Instructions

diff --git a/report-api/report-templates/statement_transactions.html b/report-api/report-templates/statement_transactions.html index c944ed86..875feb90 100644 --- a/report-api/report-templates/statement_transactions.html +++ b/report-api/report-templates/statement_transactions.html @@ -17,15 +17,15 @@
@@ -55,11 +55,24 @@ + {% if data and data.countedRefund != '0.00' and payment_method != 'PAD' %} + {% set refund_label = 'Credits received' + if payment_method in ['ONLINE_BANKING'] + else 'Refunds received' %} + + + + {% endif %} {% if data and data.creditsApplied and data.creditsApplied != "0.00" %} {% endif %} + {% if payment_method == 'PAD' %} - {% if payment_method == 'PAD' %} {% endif %} {% if payment_method == 'EFT' %} - - - - - + + + {% endif %} + {% if data.due and payment_method in ['EFT', 'PAD'] %} + + - - {% if statementSummary.cancelledTransactions and statementSummary.cancelledTransactions != '0.00' %} - - - - {% endif %} - + {% endif %} + + + {% endif %} + {% if payment_method == 'EFT' %} {% if statement.isInterimStatement %} {% endif %} - - - {% else %} - {% if payment_method == 'DIRECT_PAY' or payment_method == 'CC' or payment_method == 'EFT' or payment_method == 'ONLINE_BANKING' %} + {% if payment_method == 'DIRECT_PAY' or payment_method == 'CC' or payment_method == 'ONLINE_BANKING' %} {% endif %} {% endif %} - {% if payment_method == 'PAD' %} - {% if data.due %} - - - - {% endif %} - {% if statementSummary.lastPADStatementPaidAmount %} - - - - {% endif %} - {% endif %} + {% if payment_method in ['DIRECT_PAY', 'CC'] %} + + + + {% elif payment_method == 'ONLINE_BANKING' %} + + + + {% elif payment_method == 'DRAWDOWN' %} + + + + {% endif %}
diff --git a/report-api/src/api/services/chunk_report_service.py b/report-api/src/api/services/chunk_report_service.py index 78db2825..b9cb208b 100644 --- a/report-api/src/api/services/chunk_report_service.py +++ b/report-api/src/api/services/chunk_report_service.py @@ -83,7 +83,7 @@ def _build_chunk_html( chunk_info: 'ChunkReportService.ChunkInfo', ) -> str: chunk_vars = template_vars.copy() - chunk_vars['groupedInvoices'] = [invoice_copy] + chunk_vars['grouped_invoices'] = [invoice_copy] chunk_vars['_chunk_info'] = asdict(chunk_info) sanitized_name = sanitize_template_name(template_name) @@ -144,7 +144,7 @@ def create_chunk_report( if chunk_size is None: chunk_size = 500 # the optimal chunk size is 500 after testing - grouped_invoices = template_vars.get('groupedInvoices', []) + grouped_invoices = template_vars.get('grouped_invoices', []) temp_files: List[str] = [] # Build all chunk HTMLs ahead of time (keep order id) diff --git a/report-api/src/api/services/report_service.py b/report-api/src/api/services/report_service.py index 415d8adf..28198e65 100644 --- a/report-api/src/api/services/report_service.py +++ b/report-api/src/api/services/report_service.py @@ -64,9 +64,9 @@ def _finalize_pdf( html_out: str, generate_page_number: bool, ) -> bytes: - """Route to chunk only when statement_report has groupedInvoices; else render directly.""" + """Route to chunk only when statement_report has grouped_invoices; else render directly.""" is_statement = 'statement_report' in (template_name or '') - has_grouped_invoices = bool((template_args or {}).get('groupedInvoices')) + has_grouped_invoices = bool((template_args or {}).get('grouped_invoices')) if is_statement and has_grouped_invoices: return ChunkReportService.create_chunk_report( diff --git a/report-api/tests/unit/api/test_reports.py b/report-api/tests/unit/api/test_reports.py index 873ce610..c4eaa773 100644 --- a/report-api/tests/unit/api/test_reports.py +++ b/report-api/tests/unit/api/test_reports.py @@ -194,7 +194,7 @@ def test_statement_grouped_invoices(client, jwt, app, monkeypatch): data = { 'template': _inline_tpl(), 'templateVars': { - 'groupedInvoices': [{'transactions': [1]}], + 'grouped_invoices': [{'transactions': [1]}], 'reportName': 'statement_report', }, 'reportName': 'statement_report', From 93e8459c6c6ff3e818582abd357488acaea73e6f Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Tue, 9 Dec 2025 08:27:32 -0800 Subject: [PATCH 2/2] BCOL, CC, ONLINE_BANKING, EFT statement updates (#229) --- .../report-templates/statement_details.html | 28 --- .../report-templates/statement_header.html | 2 +- .../report-templates/statement_report.html | 15 +- .../statement_transactions.html | 181 +++++++++--------- 4 files changed, 107 insertions(+), 119 deletions(-) diff --git a/report-api/report-templates/statement_details.html b/report-api/report-templates/statement_details.html index 570f0829..184ff2ab 100644 --- a/report-api/report-templates/statement_details.html +++ b/report-api/report-templates/statement_details.html @@ -4,34 +4,6 @@
Account Number: {{ account.id }}
- {% if not summary_header_text and groupedInvoices %} - {% if payment_method == 'PAD' %} -
Pre-Authorized Debit Totals: ${{ data.totals }}
-
Amount Owing: ${{ data.due }}
- {% elif payment_method == 'ONLINE_BANKING' %} -
Online Banking Totals: ${{ data.totals }}
- {% elif payment_method in ['DIRECT_PAY', 'CC'] %} -
Credit Card Totals: ${{ data.totals }}
- {% elif payment_method == 'DRAWDOWN' %} -
BC OnLine Totals: ${{ data.totals }}
- {% elif payment_method == 'EJV' %} -
Electronic Journal Voucher Totals: ${{ data.totals }}
- {% endif %} - {% if eft_payment %} -
EFT Totals: ${{ data.totals }}
-
Amount Owing: ${{ data.due }}
- {% if statementSummary.dueDate %} -
Payment Due Date: {{ statementSummary.dueDate }}
- {% endif %} - {% else %} -
Amount Paid: ${{ data.paid }}
- {% endif %} - {% if statement.isInterimStatement and payment_method == 'EFT' %} -
Payment Received Date: - {{ statementSummary.latestStatementPaymentDate }} -
- {% endif %} - {% endif %}
Statement Number: {{statement.id}}
-
{{ account.name|upper }}
+
ACCOUNT NAME: {{ account.name|upper }}
- Payments received ({{statementSummary.latestStatementPaymentDate}}) - {{ '$0.00' if not statementSummary or statementSummary.lastStatementPaidAmount == '0.00' else '-$' + data.paid }} + Payments received ({{ statementSummary.latestStatementPaymentDate or statement.duration }}) + {{ '$0.00' if not statementSummary.lastStatementPaidAmount or statementSummary.lastStatementPaidAmount == '0.00' else '-$' + statementSummary.lastStatementPaidAmount }}
- Balance Forward (From {{ statement.fromDate }}): + Balance Forward (From {{ statement.toDate }}): ${{ statementSummary.balanceForward }}
- GST: + GST (Reg Number 107864738): ${{ data.gst if data else '0.0' }}
+
+ {{ refund_label }} (from {{ statement.duration }}): + {{ '$0.00' if not data or data.countedRefund == '0.00' else '-$' + data.countedRefund }} +
+
@@ -70,6 +83,7 @@
@@ -78,7 +92,6 @@
@@ -89,33 +102,36 @@
-
- Last Statement Total: - ${{ statementSummary.lastStatementTotal }} -
-
-
- Payment Received for Last Statement: - -${{ statementSummary.lastStatementPaidAmount }} +
+
+ Current Statement Total: + ${{ data.totals if data else '0.0' }} +
+
+
+ Total Amount Due: + ${{ data.due }} +
+ {% if payment_method == 'EFT' %} +
+ Payment Due Date: + {{ data.dueDate }}
-
-
- Cancelled Transactions: - -${{ statementSummary.cancelledTransactions }} + {% else %} +
+ Will be withdrawn within 1-3 business days after the transaction date.
-
@@ -129,19 +145,8 @@
-
- Total Amount Due: - ${{ data.due if data else '0.0'}} -
- {% if not statement.isInterimStatement %} -
Payment Due Date: {{ statementSummary.dueDate }}
- {% endif %} -
@@ -152,31 +157,43 @@
-
- Total Amount Due: - ${{ data.due }} -
-
- Will be withdrawn within 1-3 business days after the transaction date. -
-
-
- Payment Received for Pending Transactions on Last Statement: - -${{ '%.2f' % statementSummary.lastPADStatementPaidAmount }} -
-
+
+ CREDIT CARD TOTAL: + ${{ data.totals if data else '0.0' }} +
+
+ Fees charged to credit card +
+
+
+ ONLINE BANKING TOTAL: + ${{ data.totals if data else '0.0' }} +
+
+ Fees paid by online banking +
+
+
+ BC ONLINE TOTAL: + ${{ data.totals if data else '0.0' }} +
+
+ Fees for BC Registries and Online Services are deducted from the BC Online account. +
+
@@ -218,19 +235,6 @@ {% endfor %} {% endif %} - {% if row.statusCode in ['Refund complete', 'PARTIALLY_REFUNDED'] %} -
- {% if row.statusCode == 'Refund complete' %} - Refunds - {% elif row.statusCode == 'PARTIALLY_REFUNDED' %} - Partially Refunds - {% endif %} -
- {% for product in row.products %} -
For: {{ product }}
- {% endfor %} -
Refunded Transaction ID: {{ row.id }}
- {% endif %} @@ -239,7 +243,7 @@ @@ -293,13 +297,16 @@ {% endfor %} {% endif %} + {% if row.statusCode in ['REFUNDED', 'CREDITED', 'PARTIALLY_REFUNDED', 'PARTIALLY_CREDITED'] %} +
Refund Transaction ID: {{ row.refundId }}
+ {% endif %} - - - - + + + + {% endif %} {% endfor %} @@ -319,12 +326,12 @@ {% endif %} - {% if include_service_provided and payment_method in ('ONLINE_BANKING', 'CC', 'BCOL', 'DRAWDOWN', 'DIRECT_PAY', 'INTERNAL') %} + {% if payment_method in ('ONLINE_BANKING', 'CC', 'BCOL', 'DRAWDOWN', 'DIRECT_PAY', 'INTERNAL') %}
{{ row.folio }} {{ row.createdOn }}${{ row.gst }} ${{ row.total }} - {% if row.statusCode == 'APPROVED' %} + {% if row.statusCode == 'APPROVED' and payment_method == 'PAD' %}
(Pending) {% endif %}
{{ row.folio }} {{ row.refundDate }}{{ '$0.00' if row.fee == '0.00' else '-$' + row.fee }}{{ '$0.00' if row.serviceFee == '0.00' else '-$' + row.serviceFee }}{{ '$0.00' if row.gst == '0.00' else '-$' + row.gst }}{{ '$0.00' if row.total == '0.00' else '-$' + row.total }}{{ '$0.00' if row.refundFee == '0.00' else '-$' + row.refundFee }}{{ '$0.00' if row.refundServiceFee == '0.00' else '-$' + row.refundServiceFee }}{{ '$0.00' if row.refundGst == '0.00' else '-$' + row.refundGst }}{{ '$0.00' if row.refundTotal == '0.00' else '-$' + row.refundTotal }}

This statement lists only the products and services provided. To view the status of all transactions, please refer to the transaction page in your account settings.

-

The 'Total Amount Owing' indicates the amount that will be automatically debited from your PAD bank account within 1-3 business days. Please ensure sufficient funds are available. If a payment fails, a non-sufficient funds (NSF) fee of $30.00 may be applied for each failed attempt.

+

The 'Pre-Authorized Debit Amount' indicates the amount that will be automatically debited from your PAD bank account within 1-3 business days. Please ensure sufficient funds are available. If a payment fails, a non-sufficient funds (NSF) fee of $30.00 may be applied for each failed attempt.