diff --git a/Civi/Test/ExampleData/Contribution/Euro5990.php b/Civi/Test/ExampleData/Contribution/Euro5990.php
index b3811b397691..c06e546b6dc4 100644
--- a/Civi/Test/ExampleData/Contribution/Euro5990.php
+++ b/Civi/Test/ExampleData/Contribution/Euro5990.php
@@ -28,6 +28,7 @@ public function build(array &$example): void {
'net_amount' => 5990,
'currency' => 'EUR',
'source' => 'Online donation',
+ 'invoice_number' => 56789,
'amount_level' => 'premium purchased',
'contribution_recur_id' => 50,
'check_number' => '',
diff --git a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl
index 213665d7ebb7..c2742578fbce 100644
--- a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl
+++ b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl
@@ -26,14 +26,14 @@
{contact.display_name}{if '{contact.current_employer}'} ({contact.current_employer}){/if} |
- {$invoice_date} |
+ {contribution.receive_date|crmDate:"Full"} |
{domain.street_address}
{domain.supplemental_address_1}
|
- {$street_address} {$supplemental_address_1} |
+ {contact.address_billing.street_address} {contact.address_billing.supplemental_address_1} |
{ts}Invoice Number:{/ts} |
{domain.supplemental_address_2}
@@ -41,7 +41,7 @@
|
- {$supplemental_address_2} {$stateProvinceAbbreviation} |
+ {contact.address_billing.supplemental_address_2} {contact.address_billing.state_province_id:abbr} |
{contribution.invoice_number} |
{domain.city}
@@ -49,12 +49,12 @@
|
- {$city} {$postal_code} |
+ {contact.address_billing.city} {contact.address_billing.postal_code} |
{ts}Reference:{/ts} |
{domain.country_id:label} |
- {$country} |
+ {contact.address_billing.country_id:label} |
{contribution.source} |
{domain.email} |
@@ -71,7 +71,7 @@
{ts}Quantity{/ts} |
{ts}Unit Price{/ts} |
{domain.tax_term} |
- {ts 1=$currency}Amount %1{/ts} |
+ {ts 1='{contribution.currency}'}Amount %1{/ts} |
{foreach from=$lineItems item=line}
@@ -91,7 +91,7 @@
|
{ts}Sub Total{/ts} |
- {$subTotal|crmMoney:$currency} |
+ {contribution.tax_exclusive_amount} |
{foreach from=$taxRateBreakdown item=taxDetail key=taxRate}
{if $taxRate != 0}
@@ -104,8 +104,8 @@
{/foreach}
|
- {ts 1=$currency}TOTAL %1{/ts} |
- {$amount|crmMoney:$currency} |
+ {ts 1='{contribution.currency}'}TOTAL %1{/ts} |
+ {contribution.total_amount} |
|
@@ -116,7 +116,7 @@
{ts}Amount Paid{/ts}
{/if}
- {$amountPaid|crmMoney:$currency} |
+ {contribution.paid_amount} |
|
@@ -125,7 +125,7 @@
|
{ts}AMOUNT DUE:{/ts} |
- {$amountDue|crmMoney:$currency} |
+ {contribution.balance_amount} |
|
@@ -170,15 +170,15 @@
{contribution.invoice_number} |
|
- {if $is_pay_later == 1}
+ {if {contribution.is_pay_later|boolean}}
{ts}Amount Due:{/ts} |
- {$amount|crmMoney:$currency} |
+ {contribution.total_amount} |
{else}
{ts}Amount Due:{/ts} |
- {$amountDue|crmMoney:$currency} |
+ {contribution.paid_amount} |
{/if}
@@ -211,14 +211,14 @@
{contact.display_name}{if '{contact.current_employer}'} ({contact.current_employer}){/if} |
- {$invoice_date} |
+ {contribution.receive_date|crmDate:"Full"} |
{domain.street_address}
{domain.supplemental_address_1}
|
- {$street_address} {$supplemental_address_1} |
+ {contact.address_billing.street_address} {contact.address_billing.supplemental_address_1} |
{ts}Credit Note Number:{/ts} |
{domain.supplemental_address_2}
@@ -226,7 +226,7 @@
|
- {$supplemental_address_2} {$stateProvinceAbbreviation} |
+ {contact.address_billing.supplemental_address_2} {contact.address_billing.state_province_id:abbr} |
{contribution.creditnote_id} |
{domain.city}
@@ -234,7 +234,7 @@
|
- {$city} {$postal_code} |
+ {contact.address_billing.city} {contact.address_billing.postal_code} |
{ts}Reference:{/ts} |
{domain.country_id:label}
@@ -265,7 +265,7 @@
| {ts}Quantity{/ts} |
{ts}Unit Price{/ts} |
{domain.tax_term} |
- {ts 1=$currency}Amount %1{/ts} |
+ {ts 1="{contribution.currency}"}Amount %1{/ts} |
{foreach from=$lineItems item=line key=index}
|
@@ -274,7 +274,7 @@
{$line.title}
{$line.qty} |
- {$line.unit_price|crmMoney:$currency} |
+ {$line.unit_price|crmMoney:'{contribution.currency}'} |
{if $line.tax_amount != ''}
{if $line.tax_rate}{$line.tax_rate|crmNumberFormat}%{/if} |
{else}
@@ -287,7 +287,7 @@
|
{ts}Sub Total{/ts} |
- {$subTotal|crmMoney:$currency} |
+ {contribution.tax_exclusive_amount} |
{foreach from=$taxRateBreakdown item=taxDetail key=taxRate}
{if $taxRate != 0}
@@ -304,14 +304,14 @@
|
- {ts 1=$currency}TOTAL %1{/ts} |
- {$amount|crmMoney:$currency} |
+ {ts 1='{contribution.currency}'}TOTAL %1{/ts} |
+ {contribution.total_amount} |
- {if '{contribution.is_pay_later}' == 0}
+ {if !'{contribution.is_pay_later|boolean}'}
|
{ts}LESS Credit to invoice(s){/ts} |
- {$amount|crmMoney:$currency} |
+ {contribution.total_amount} |
|
@@ -320,7 +320,7 @@
|
{ts}REMAINING CREDIT{/ts} |
- {$amountDue|crmMoney:$currency} |
+ {contribution.balance_amount} |
|
{/if}
@@ -362,7 +362,7 @@
|
{ts}Credit Amount:{/ts} |
- {$amount|crmMoney:$currency} |
+ {contribution.total_amount} |
diff --git a/xml/templates/message_templates/contribution_invoice_receipt_text.tpl b/xml/templates/message_templates/contribution_invoice_receipt_text.tpl
index 37e2edf09d10..e69de29bb2d1 100644
--- a/xml/templates/message_templates/contribution_invoice_receipt_text.tpl
+++ b/xml/templates/message_templates/contribution_invoice_receipt_text.tpl
@@ -1 +0,0 @@
-{ts}Contribution Invoice{/ts}