From f44ed697b3aeec4e0b8a54f63fc4c5dd8e62e28b Mon Sep 17 00:00:00 2001 From: KarinG Date: Sun, 23 Apr 2017 18:30:35 -0600 Subject: [PATCH] Upgrade the message template in the database. --- CRM/Contribute/Form/AdditionalPayment.php | 1 - .../contribution_invoice_receipt_html.tpl | 458 ++++++++++++++++++ 2 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 CRM/Upgrade/4.7.19.msg_template/message_templates/contribution_invoice_receipt_html.tpl diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 84cef14a5d..155b9cf5e4 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -105,7 +105,6 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract } $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail(); - $entityType = NULL; $entityType = 'contribution'; if ($this->_component == 'event') { $entityType = 'participant'; diff --git a/CRM/Upgrade/4.7.19.msg_template/message_templates/contribution_invoice_receipt_html.tpl b/CRM/Upgrade/4.7.19.msg_template/message_templates/contribution_invoice_receipt_html.tpl new file mode 100644 index 0000000000..a938ca349d --- /dev/null +++ b/CRM/Upgrade/4.7.19.msg_template/message_templates/contribution_invoice_receipt_html.tpl @@ -0,0 +1,458 @@ + + + + + + + + + + + +
+
+ + + + + + + + + {if $organization_name} + + {else} + + {/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ts}INVOICE{/ts}{ts}Invoice Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date} + + {if $domain_street_address }{$domain_street_address}{/if} + {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if} + +
{$street_address} {$supplemental_address_1}{ts}Invoice Number:{/ts} + + {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if} + {if $domain_state }{$domain_state}{/if} + +
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_id} + + {if $domain_city}{$domain_city}{/if} + {if $domain_postal_code }{$domain_postal_code}{/if} + +
{$city} {$postal_code}{ts}Reference:{/ts} {if $domain_country}{$domain_country}{/if}
{$source} {if $domain_phone}{$domain_phone}{/if}
{if $domain_email}{$domain_email}{/if}
+ + + + +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + + + + {foreach from=$lineItem item=value key=priceset name=taxpricevalue} + {if $smarty.foreach.taxpricevalue.index eq 0} + + + + {else} + + + + {/if} + + + + + {if $value.tax_amount != ''} + + {else} + + {/if} + + + {/foreach} + + + + + + + {foreach from = $dataArray item = value key = priceset} + + + {if $priceset} + + + {elseif $priceset == 0} + + + + {/if} + {/foreach} + + + + + + + + + + + {if $is_pay_later == 0} + + + + + + + + + + + + + + + + {/if} +


+ + + + {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1} + + + + + {/if} +
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{$taxTerm} {ts 1=$defaultCurrency}Amount %1{/ts}


+ {if $value.html_type eq 'Text'} + {$value.label} + {else} + {$value.field_title} - {$value.label} + {/if} + {if $value.description} +
{$value.description|truncate:30:"..."}
+ {/if} +
+
{$value.qty} {$value.unit_price|crmMoney:$currency} {$value.tax_rate}%{ts 1=$taxTerm}No %1{/ts}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts} {$subTotal|crmMoney:$currency}
{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{$value|crmMoney:$currency} {ts 1=$taxTerm}TOTAL NO %1{/ts}{$value|crmMoney:$currency}

{ts 1=$defaultCurrency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
+ {if $contribution_status_id == $refundedStatusId} + {ts}LESS Amount Credited{/ts} + {else} + {ts}LESS Amount Paid{/ts} + {/if} + + {$amountPaid|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts} {$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
+
+ {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1} + + + + +
+ + + + + +
{ts}PAYMENT ADVICE{/ts}

{ts}To: {/ts}
+ {$domain_organization}
+ {$domain_street_address} {$domain_supplemental_address_1}
+ {$domain_supplemental_address_2} {$domain_state}
+ {$domain_city} {$domain_postal_code}
+ {$domain_country}
+ {$domain_phone}
+ {$domain_email}
+


{$notes} +
+ + + + + + + + + + + + + {if $is_pay_later == 1} + + + + + + {else} + + + + + + {/if} + + + + + + + + +
{ts}Customer: {/ts}{$display_name}
{ts}Invoice Number: {/ts}{$invoice_id}

{ts}Amount Due:{/ts}{$amount|crmMoney:$currency}
{ts}Amount Due: {/ts}{$amountDue|crmMoney:$currency}
{ts}Due Date: {/ts}{$dueDate}

+
+ {/if} + + {if $contribution_status_id == $refundedStatusId || $contribution_status_id == $cancelledStatusId} + + + + +
+
+ + + + + + + + + + {if $organization_name} + + {else} + + {/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ts}CREDIT NOTE{/ts}{ts}Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date} + + {if $domain_street_address }{$domain_street_address}{/if} + {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if} + +
{$street_address} {$supplemental_address_1}{ts}Credit Note Number:{/ts} + + {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if} + {if $domain_state }{$domain_state}{/if} + +
{$supplemental_address_2} {$stateProvinceAbbreviation}{$creditnote_id} + + {if $domain_city}{$domain_city}{/if} + {if $domain_postal_code }{$domain_postal_code}{/if} + +
{$city} {$postal_code}{ts}Reference:{/ts} + + {if $domain_country}{$domain_country}{/if} + +
{$source} + + {if $domain_phone}{$domain_phone}{/if} + +
+ + {if $domain_email}{$domain_email}{/if} + +
+ + + + + +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + + + + {foreach from=$lineItem item=value key=priceset name=pricevalue} + {if $smarty.foreach.pricevalue.index eq 0} + + {else} + + {/if} + + + + + {if $value.tax_amount != ''} + + {else} + + {/if} + + + {/foreach} + + + + + + + {foreach from = $dataArray item = value key = priceset} + + + {if $priceset} + + + {elseif $priceset == 0} + + + + {/if} + {/foreach} + + + + + + + + + + {if $is_pay_later == 0} + + + + + + + + + + + + + + + + {/if} +


+ + + + + + + +
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{$taxTerm} {ts 1=$defaultCurrency}Amount %1{/ts}


+ + {if $value.html_type eq 'Text'} + {$value.label} + {else} + {$value.field_title} - {$value.label} + {/if} + {if $value.description} +
{$value.description|truncate:30:"..."}
+ {/if} +
+
{$value.qty} {$value.unit_price|crmMoney:$currency} {$value.tax_rate}%{ts 1=$taxTerm}No %1{/ts}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts} {$subTotal|crmMoney:$currency}
{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{$value|crmMoney:$currency} {ts 1=$taxTerm}TOTAL NO %1{/ts}{$value|crmMoney:$currency}

{ts 1=$defaultCurrency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
{ts}LESS Credit to invoice(s){/ts}{$amount|crmMoney:$currency}

{ts}REMAINING CREDIT{/ts}{$amountDue|crmMoney:$currency}
+
+ + + + +
+ + + + + + +
{ts}CREDIT ADVICE{/ts}

{ts}Please do not pay on this advice. Deduct the amount of this Credit Note from your next payment to us{/ts}

+ + + + + + + + + + + + + + + + + +
{ts}Customer:{/ts} {$display_name}
{ts}Credit Note#:{/ts} {$creditnote_id}

{ts}Credit Amount:{/ts}{$amount|crmMoney:$currency}
+
+ {/if} +
+ + -- 2.25.1