From 6397c5318cc5d45f29a2aaf1d32fa8acc6a62cc1 Mon Sep 17 00:00:00 2001 From: samuelsov Date: Tue, 18 Aug 2015 11:34:40 -0400 Subject: [PATCH] CRM-16561 - adding the invoice in the upgrade --- .../contribution_invoice_receipt_html.tpl | 433 ++++++++++++++++++ .../Incremental/sql/4.7.alpha1.mysql.tpl | 1 + 2 files changed, 434 insertions(+) create mode 100644 CRM/Upgrade/4.7.alpha1.msg_template/message_templates/contribution_invoice_receipt_html.tpl diff --git a/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/contribution_invoice_receipt_html.tpl b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/contribution_invoice_receipt_html.tpl new file mode 100644 index 0000000000..e88f1bd39b --- /dev/null +++ b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/contribution_invoice_receipt_html.tpl @@ -0,0 +1,433 @@ + + + + + + + + + + + +
+
+ + + + + + + + + {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} +


+ + + + + + + +
{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} + {$amount|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts} {$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
+
+ + + + +
+ + + + + +
{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 $contribution_status_id == $refundedStatusId} + + + + +
+
+ + + + + + + + + + {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} +
+ + diff --git a/CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl index d5561bb9b9..1fb8b9c2f0 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl @@ -21,6 +21,7 @@ UPDATE civicrm_option_value SET {localize field="label"}label = 'Activity Summar WHERE value = 'activitySummary' AND option_group_id = @option_group_id_report; --CRM-16853 PCP Owner Notification +--CRM-16853 Contribution Invoice Receipt Translation {include file='../CRM/Upgrade/4.7.alpha1.msg_template/civicrm_msg_template.tpl'} -- 2.25.1