From 5a2231b86688fb5b394566d8590ed618f25ee8e0 Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 26 Sep 2020 12:43:38 +1200 Subject: [PATCH] dev/core#2035 Invoice template - show Amount paid even when it is fully paid In https://github.com/civicrm/civicrm-core/pull/16680/files?w=1#diff-b211e0dac858fdad5d480c118d645e0bR129 there was a change from 'show amount paid & due depending on pay-later status' to 'show amount paid & due depending on whether payment is due' This has been experienced as a regression and, being an invoice, there seems no reason to only change it sometimes. This change just alters the template that new installs will receive. If approved another step is needed to update existing installs (unless they have customised the template) --- .../CRM/Contribute/Form/Task/InvoiceTest.php | 3 +- .../contribution_invoice_receipt_html.tpl | 45 +++++++++---------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php b/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php index 01172c6133..a8d020da56 100644 --- a/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php @@ -74,8 +74,7 @@ class CRM_Contribute_Form_Task_InvoiceTest extends CiviUnitTestCase { $this->assertContains('PAYMENT ADVICE', $invoiceHTML[$contribution['id']]); $this->assertContains('AMOUNT DUE: - $ 92.00', $invoiceHTML[$contribution3['id']]); - + $ 92.00', $invoiceHTML[$contribution3['id']]); } /** diff --git a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl index d6093e8510..2222bf0b5c 100644 --- a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl @@ -126,29 +126,28 @@ {ts 1=$defaultCurrency}TOTAL %1{/ts} {$amount|crmMoney:$currency} - {if $amountDue != 0} - - - - {if $contribution_status_id == $refundedStatusId} - {ts}Amount Credited{/ts} - {else} - {ts}Amount Paid{/ts} - {/if} - - - {$amountPaid|crmMoney:$currency} - - - -
- - - - {ts}AMOUNT DUE:{/ts} - {$amountDue|crmMoney:$currency} - - {/if} + + + + {if $contribution_status_id == $refundedStatusId} + {ts}Amount Credited{/ts} + {else} + {ts}Amount Paid{/ts} + {/if} + + + {$amountPaid|crmMoney:$currency} + + + +
+ + + + {ts}AMOUNT DUE:{/ts} + {$amountDue|crmMoney:$currency} + +


-- 2.25.1