'pay_later_receipt' => $values['pay_later_receipt'] ?? NULL,
'honor_block_is_active' => $values['honor_block_is_active'] ?? NULL,
'contributionStatus' => $values['contribution_status'] ?? NULL,
+ 'currency' => CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $values['contribution_id'], 'currency') ?? CRM_Core_Config::singleton()->defaultCurrency,
];
if (!empty($values['financial_type_id'])) {
*/
protected function postProcessMembership(
$membershipParams, $contactID, &$form, $premiumParams,
- $customFieldsFormatted = NULL, $includeFieldTypes = NULL, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
+ $customFieldsFormatted, $includeFieldTypes, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
$isProcessSeparateMembershipTransaction, $financialTypeID, $unprocessedLineItems) {
$membershipContribution = NULL;
* @return bool|object
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
- public function cancelSubscription(&$message = '', $params) {
+ public function cancelSubscription(&$message = '', $params = []) {
$template = CRM_Core_Smarty::singleton();
$template->assign('subscriptionType', 'cancel');
'credit_card_exp_date' => CRM_Utils_Date::mysqlToIso(CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $participantParams))),
'selfcancelxfer_time' => abs($values['event']['selfcancelxfer_time']),
'selfservice_preposition' => $values['event']['selfcancelxfer_time'] < 0 ? 'after' : 'before',
+ 'currency' => $values['event']['currency'] ?? CRM_Core_Config::singleton()->defaultCurrency,
]);
// CRM-13890 : NOTE wait list condition need to be given so that
<body>
receive_date:::{$receive_date}
receipt_date:::{$receipt_date}
+ {if !empty($receipt_text)}
receipt_text:::{$receipt_text}
+ {/if}
is_pay_later:::{$is_pay_later}
displayName:::{$displayName}
financialTypeId:::{$financialTypeId}
contactID:::{$contactID}
contributionID:::{$contributionID}
amount:::{$amount}
+ {if isset($amount_level)}
amount_level:::{$amount_level}
+ {/if}
+ {if isset($pay_later_receipt)}
pay_later_receipt:::{$pay_later_receipt}
+ {/if}
+ {if isset($headerstyle)}
headerStyle:::{$headerStyle}
+ {/if}
+ {if isset($valueStyle)}
valueStyle:::{$valueStyle}
+ {/if}
+ {if isset($labelStyle)}
labelStyle:::{$labelStyle}
+ {/if}
priceSetID:::{$priceSetID}
currency:::{$currency}
+ {if !empty($is_quick_config)}
is_quick_config:::{$is_quick_config}
+ {/if}
+ {if !empty($getTaxDetails)}
getTaxDetails:::{$getTaxDetails}
totalTaxAmount:::{$totalTaxAmount}
+ {/if}
+ {if isset($is_monetary)}
is_monetary:::{$is_monetary}
+ {/if}
+ {if isset($isShare)}
isShare:::{$isShare}
+ {/if}
honor_block_is_active:::{$honor_block_is_active}
+ {if $honor_block_is_active}
soft_credit_type:::{$soft_credit_type}
+ {/if}
+ {if isset($is_recur)}
is_recur:::{$is_recur}
+ {/if}
+ {if isset($contributeMode)}
contributeMode:::{$contributeMode}
+ {/if}
+ {if isset($trxn_id)}
trxn_id:::{$trxn_id}
+ {/if}
+ {if isset($cancelSubscriptionUrl)}
cancelSubscriptionUrl:::{$cancelSubscriptionUrl}
updateSubscriptionBillingUrl:::{$updateSubscriptionBillingUrl}
updateSubscriptionUrl:::{$updateSubscriptionUrl}
+ {/if}
+ {if isset($priceset)}
priceset:::{$priceset}
+ {/if}
+ {if isset($taxTerm)}
taxTerm:::{$taxTerm}
+ {/if}
+ {if !empty($pcpBlock)}
pcpBlock:::{$pcpBlock}
pcp_display_in_roll:::{$pcp_display_in_roll}
pcp_roll_nickname:::{$pcp_roll_nickname}
pcp_personal_note:::{$pcp_personal_note}
+ {/if}
+ {if isset($onBehalfProfile_grouptitle)}
onBehalfProfile_grouptitle:::{$onBehalfProfile_grouptitle}
+ {/if}
email:::{$email}
+ {if isset($contributionPageId)}
contributionPageId:::{$contributionPageId}
title:::{$title}
+ {/if}
+ {if isset($isBillingAddressRequiredForPayLater)}
isBillingAddressRequiredForPayLater:::{$isBillingAddressRequiredForPayLater}
+ {/if}
+ {if isset($billingName)}
billingName:::{$billingName}
address:::{$address}
+ {/if}
+ {if isset($credit_card_type)}
credit_card_type:::{$credit_card_type}
credit_card_number:::{$credit_card_number}
credit_card_exp_date:::{$credit_card_exp_date}
+ {/if}
+ {if isset($selectPremium)}
selectPremium:::{$selectPremium}
product_name:::{$product_name}
option:::{$option}
sku:::{$sku}
+ {/if}
+ {if isset($start_date)}
start_date:::{$start_date}
end_date:::{$end_date}
+ {/if}
+ {if isset($is_deductible)}
is_deductible:::{$is_deductible}
+ {/if}
+ {if isset($contact_email)}
contact_email:::{$contact_email}
+ {/if}
+ {if isset($contact_phone)}
contact_phone:::{$contact_phone}
+ {/if}
+ {if isset($price)}
price:::{$price}
+ {/if}
+ {if isset($customPre_grouptitle)}
customPre_grouptitle:::{$customPre_grouptitle}
+ {/if}
+ {if isset($customPost_grouptitle)}
customPost_grouptitle:::{$customPost_grouptitle}
+ {/if}
contributionStatus:::{$contributionStatus}
+ {if isset($lineItem)}
{foreach from=$lineItem item=value key=priceset}
{foreach from=$value item=line}
line.html_type:::{$line.html_type}
line.description:::{$line.description}
line.qty:::{$line.qty}
line.unit_price:::{$line.unit_price}
+ {if isset($line.tax_rate)}
line.tax_rate:::{$line.tax_rate}
line.tax_amount:::{$line.tax_amount}
+ {/if}
line.line_total:::{$line.line_total}
{/foreach}
{/foreach}
+ {/if}
+ {if !empty($dataArray)}
{foreach from=$dataArray item=value key=priceset}
dataArray: priceset:::$priceset
dataArray: value:::$value
{/foreach}
+ {/if}
+ {if !empty($honoreeProfile)}
{foreach from=$honoreeProfile item=value key=label}
honoreeProfile: label:::$label
honoreeProfile: value:::$value
{/foreach}
+ {/if}
+ {if !empty($softCreditTypes)}
{foreach from=$softCreditTypes item=softCreditType key=n}
softCreditType:::$softCreditType
{foreach from=$softCredits.$n item=value key=label}
softCredits: value:::$value
{/foreach}
{/foreach}
+ {/if}
+ {if !empty($onBehalfProfile)}
{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
onBehalfName:::$onBehalfName
onBehalfValue:::$onBehalfValue
{/foreach}
+ {/if}
+ {if !empty($customPre)}
{foreach from=$customPre item=customValue key=customName}
customPre: customName:::$customName
customPre: customValue:::$customValue
{/foreach}
+ {/if}
+ {if !empty($customPost)}
{foreach from=$customPost item=customValue key=customName}
customPost: customName:::$customName
customPost: customValue:::$customValue
{/foreach}
+ {/if}
+ {if !empty($trackingFields)}
{foreach from=$trackingFields item=trackingValue key=trackingName}
trackingName:::$trackingName
trackingValue:::$trackingValue
{/foreach}
+ {/if}
</body>
</html>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
contactID:::{$contactID}
+{if !empty($event.confirm_email_text)}
event.confirm_email_text:::{$event.confirm_email_text}
+{/if}
+{if isset($isOnWaitlist)}
isOnWaitlist:::{$isOnWaitlist}
+{/if}
+{if isset($isRequireApproval)}
isRequireApproval:::{$isRequireApproval}
+{/if}
participant_status:::{$participant_status}
+{if isset($pricesetFieldsCount)}
pricesetFieldsCount:::{$pricesetFieldsCount}
+{/if}
isPrimary:::{$isPrimary}
+{if isset($conference_sessions)}
conference_sessions:::{$conference_sessions}
+{/if}
+{if isset($is_pay_later)}
is_pay_later:::{$is_pay_later}
+{/if}
+{if isset($isAmountzero)}
isAmountzero:::{$isAmountzero}
+{/if}
+{if isset($isAdditionalParticipant)}
isAdditionalParticipant:::{$isAdditionalParticipant}
+{/if}
+{if isset($pay_later_receipt)}
pay_later_receipt:::{$pay_later_receipt}
+{/if}
event.event_title:::{$event.event_title}
event.event_start_date:::{$event.event_start_date|date_format:"%A"}
event.event_end_date:::{$event.event_end_date|date_format:"%Y%m%d"}
+{if isset($event.is_monetary)}
event.is_monetary:::{$event.is_monetary}
+{/if}
+{if !empty($event.fee_label)}
event.fee_label:::{$event.fee_label}
+{/if}
+{if !empty($conference_sessions)}
conference_sessions:::{$conference_sessions}
-event.participant_role::{$event.participant_role}
-defaultRole:::{$defaultRole}
+{/if}
+{if !empty($event.participant_role)}
+ event.participant_role::{$event.participant_role}
+ defaultRole:::{$defaultRole}
+{/if}
+{if !empty($isShowLocation)}
isShowLocation:::{$isShowLocation}
location.address.1.display:::{$location.address.1.display}
location.phone.1.phone:::{$location.phone.1.phone}
location.phone.1.phone_type_display:::{$location.phone.1.phone_type_display}
location.phone.1.phone_ext:::{$location.phone.1.phone_ext}
location.email.1.email:::{$location.email.1.email}
+{/if}
+{if !empty($event.is_public)}
event.is_public:::{$event.is_public}
+{/if}
+{if !empty($payer.name)}
payer.name:::{$payer.name}
-lineitem:::{if $lineItem}
+{/if}
+lineitem:::{if !empty($lineItem)}
{foreach from=$lineItem item=value key=priceset}
{foreach from=$value item=line}
line.html_type:::{$line.html_type}
line.description:::{$line.description}
line.qty:::{$line.qty}
line.unit_price:::{$line.unit_price}
+ {if isset($line.tax_rate)}
line.tax_rate:::{$line.tax_rate}
line.tax_amount:::{$line.tax_amount}
+ {/if}
line.line_total:::{$line.line_total}
{/foreach}
{/foreach}
{/if}
+{if !empty($part)}
part:::{foreach from=$part item=value key=key}
{$key}{$value}
{/foreach}
+{/if}
+{if !empty($dataArray)}
dataArray:::{$dataArray}
+{/if}
+{if isset($totalTaxAmount)}
totalTaxAmount:::{$totalTaxAmount}
-amounts:::{$amounts}
+{/if}
+{if !empty($amounts)}
+{foreach from=$amounts item=amountValue key=amountKey}
+amounts:::$amountKey $amountValue
+{/foreach}
+{/if}
register_date:::{$register_date|crmDate}
+{if !empty($receive_date)}
receive_date:::{$receive_date|crmDate}
+{/if}
+{if !empty($financialTypeName)}
financialTypeName:::{$financialTypeName}
+{/if}
+{if !empty($trxn_id)}
trxn_id:::{$trxn_id}
+{/if}
+{if !empty($paidBy)}
paidBy:::{$paidBy}
+{/if}
+{if isset($checkNumber)}
checkNumber:::{$checkNumber}
+{/if}
+{if isset($billingName)}
billingName:::{$billingName}
+{/if}
+{if isset($credit_card_type)}
credit_card_type:::{$credit_card_type}
credit_card_number:::{$credit_card_number}
address:::{$address}
credit_card_exp_date:::{$credit_card_exp_date}
+{/if}
+{if !empty($customPre)}
{foreach from=$customPre item=customValue key=customName}
customPre: customName:::$customName
customPre: customValue:::$customValue
{/foreach}
+{/if}
+{if !empty($customPost)}
{foreach from=$customPost item=customValue key=customName}
customPost: customName:::$customName
customPost: customValue:::$customValue
{/foreach}
+{/if}
<td style="text-align:right;"><font size="1">{ts}Sub Total{/ts}</font></td>
<td style="text-align:right;"><font size="1">{$subTotal|crmMoney:$currency}</font></td>
</tr>
+ {if !empty($dataArray)}
{foreach from=$dataArray item=value key=priceset}
<tr>
<td colspan="3"></td>
{elseif $priceset == 0}
<td style="text-align:right;white-space: nowrap"><font size="1">{ts 1=$taxTerm}TOTAL %1{/ts}</font></td>
<td style="text-align:right"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
+ {/if}
</tr>
- {/if}
{/foreach}
+ {/if}
<tr>
<td colspan="3"></td>
<td style="text-align:right;white-space: nowrap"><b><font size="1">{ts 1=$currency}TOTAL %1{/ts}</font></b></td>
<td style="padding-left:28px;text-align:right;"><font size="1">{ts}Sub Total{/ts}</font></td>
<td style="padding-left:28px;text-align:right;"><font size="1">{$subTotal|crmMoney:$currency}</font></td>
</tr>
+ {if !empty($dataArray)}
{foreach from=$dataArray item=value key=priceset}
<tr>
<td colspan="3"></td>
{elseif $priceset == 0}
<td style="padding-left:28px;text-align:right;"><font size="1">{ts 1=$taxTerm}TOTAL NO %1{/ts}</font></td>
<td style="padding-left:28px;text-align:right;"><font size="1" align="right">{$value|crmMoney:$currency}</font> </td>
+ {/if}
</tr>
- {/if}
{/foreach}
+ {/if}
<tr>
<td colspan="3"></td>
<td colspan="2"><hr></hr></td>
<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $formValues.receipt_text}
+ {if !empty($formValues.receipt_text)}
<p>{$formValues.receipt_text|htmlize}</p>
{else}
<p>{ts}Below you will find a receipt for this contribution.{/ts}</p>
</td>
</tr>
- {if $lineItem and !$is_quick_config}
+ {if !empty($lineItem) and empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
- {if $getTaxDetails}
+ {if !empty($getTaxDetails)}
<th>{ts}Subtotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
- {if $getTaxDetails}
+ {if !empty($getTaxDetails)}
<td>
{$line.unit_price*$line.qty|crmMoney:$currency}
</td>
- {if $line.tax_rate != "" || $line.tax_amount != ""}
+ {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
</tr>
{/foreach}
{/if}
- {if $getTaxDetails && $dataArray}
+ {if !empty($getTaxDetails) && !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts} Amount before Tax : {/ts}
</td>
</tr>
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Date Received{/ts}
</tr>
{/if}
- {if $formValues.paidBy and !$formValues.hidden_CreditCard}
+ {if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
{$formValues.paidBy}
</td>
</tr>
- {if $formValues.check_number}
+ {if !empty($formValues.check_number)}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
{/if}
{/if}
- {if $formValues.trxn_id}
+ {if !empty($formValues.trxn_id)}
<tr>
<td {$labelStyle}>
{ts}Transaction ID{/ts}
</tr>
{/if}
- {if $ccContribution}
+ {if !empty($ccContribution)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</tr>
{/if}
- {if $softCreditTypes and $softCredits}
+ {if !empty($softCreditTypes) and !empty($softCredits)}
{foreach from=$softCreditTypes item=softCreditType key=n}
<tr>
<th {$headerStyle}>
{/foreach}
{/if}
- {if $customGroup}
+ {if !empty($customGroup)}
{foreach from=$customGroup item=value key=customName}
<tr>
<th {$headerStyle}>
{/foreach}
{/if}
- {if $formValues.product_name}
+ {if !empty($formValues.product_name)}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $formValues.receipt_text}
+{if !empty($formValues.receipt_text)}
{$formValues.receipt_text}
{else}{ts}Below you will find a receipt for this contribution.{/ts}{/if}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $getTaxDetails}
+{if !empty($getTaxDetails)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $getTaxDetails} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($getTaxDetails)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $getTaxDetails}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($getTaxDetails)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
{/foreach}
{/foreach}
{/if}
-{if $getTaxDetails && $dataArray}
+{if !empty($getTaxDetails) && !empty($dataArray)}
{ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
-{if $receive_date}
+{if !empty($receive_date)}
{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $receipt_date}
{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
{/if}
-{if $formValues.paidBy and !$formValues.hidden_CreditCard}
+{if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}
{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
+{if !empty($formValues.check_number)}
{ts}Check Number{/ts}: {$formValues.check_number}
{/if}
{/if}
-{if $formValues.trxn_id}
+{if !empty($formValues.trxn_id)}
{ts}Transaction ID{/ts}: {$formValues.trxn_id}
{/if}
-{if $ccContribution}
+{if !empty($ccContribution)}
===========================================================
{ts}Billing Name and Address{/ts}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
-{if $customGroup}
+{if !empty($customGroup)}
{foreach from=$customGroup item=value key=customName}
===========================================================
{$customName}
{/foreach}
{/if}
-{if $softCreditTypes and $softCredits}
+{if !empty($softCreditTypes) and !empty($softCredits)}
{foreach from=$softCreditTypes item=softCreditType key=n}
===========================================================
{$softCreditType}
{/foreach}
{/if}
-{if $formValues.product_name}
+{if !empty($formValues.product_name)}
===========================================================
{ts}Premium Information{/ts}
<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $receipt_text}
+ {if !empty($receipt_text)}
<p>{$receipt_text|htmlize}</p>
{/if}
{if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+ <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
{/if}
</td>
</th>
</tr>
- {if $lineItem and $priceSetID and !$is_quick_config}
+ {if !empty($lineItem) and !empty($priceSetID) and empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
- {if $dataArray}
+ {if !empty($dataArray)}
<th>{ts}Subtotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
- {if $getTaxDetails}
+ {if !empty($getTaxDetails)}
<td>
{$line.unit_price*$line.qty|crmMoney:$currency}
</td>
- {if $line.tax_rate != "" || $line.tax_amount != ""}
+ {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
</td>
</tr>
{/foreach}
- {if $dataArray}
+ {if !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts} Amount before Tax : {/ts}
{/foreach}
{/if}
- {if $totalTaxAmount}
+ {if isset($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax{/ts}
{else}
- {if $totalTaxAmount}
+ {if !empty($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
{ts}Amount{/ts}
</td>
<td {$valueStyle}>
- {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
+ {$amount|crmMoney:$currency} {if isset($amount_level)} - {$amount_level}{/if}
</td>
</tr>
{/if}
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Date{/ts}
</tr>
{/if}
- {if $is_monetary and $trxn_id}
+ {if !empty($is_monetary) and !empty($trxn_id)}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</tr>
{/if}
- {if $is_recur}
+ {if !empty($is_recur)}
<tr>
<td colspan="2" {$labelStyle}>
{ts}This is a recurring contribution.{/ts}
</td>
</tr>
{/foreach}
- {elseif $softCreditTypes and $softCredits}
+ {elseif !empty($softCreditTypes) and !empty($softCredits)}
{foreach from=$softCreditTypes item=softCreditType key=n}
<tr>
<th {$headerStyle}>
{/foreach}
{/if}
- {if $pcpBlock}
+ {if !empty($pcpBlock)}
<tr>
<th {$headerStyle}>
{ts}Personal Campaign Page{/ts}
{/if}
{/if}
- {if $onBehalfProfile}
+ {if !empty($onBehalfProfile)}
<tr>
<th {$headerStyle}>
{$onBehalfProfile_grouptitle}
{/foreach}
{/if}
- {if $isShare}
+ {if !empty($isShare)}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
</tr>
{/if}
- {if $billingName}
+ {if !empty($billingName)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
{$email}
</td>
</tr>
- {elseif $email}
+ {elseif !empty($email)}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</tr>
{/if}
- {if $credit_card_type}
+ {if !empty($credit_card_type)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</tr>
{/if}
- {if $selectPremium}
+ {if !empty($selectPremium)}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
</td>
</tr>
{/if}
- {if $contact_email OR $contact_phone}
+ {if !empty($contact_email) OR !empty($contact_phone)}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
+ {if !empty($contact_email)}
<p>{$contact_email}</p>
{/if}
- {if $contact_phone}
+ {if !empty($contact_phone)}
<p>{$contact_phone}</p>
{/if}
</td>
</tr>
{/if}
- {if $is_deductible AND $price}
+ {if !empty($is_deductible) AND !empty($price)}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
{/if}
{/if}
- {if $customPre}
+ {if !empty($customPre)}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+ {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{/foreach}
{/if}
- {if $customPost}
+ {if !empty($customPost)}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+ {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $receipt_text}
+{if !empty($receipt_text)}
{$receipt_text}
{/if}
{if $is_pay_later}
===========================================================
-{$pay_later_receipt}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
===========================================================
{/if}
{ts}Contribution Information{/ts}
===========================================================
-{if $lineItem and $priceSetID and !$is_quick_config}
+{if $lineItem and $priceSetID and empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
---------------------------------------------------------
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
{/foreach}
{/foreach}
-{if $dataArray}
+{if !empty($dataArray)}
{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{/foreach}
{/if}
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
{else}
-{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
+{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if isset($amount_level) } - {$amount_level} {/if}
{/if}
{/if}
-{if $receive_date}
+{if !empty($receive_date)}
{ts}Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $is_monetary and $trxn_id}
+{if !empty($is_monetary) and !empty($trxn_id)}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
-{if $is_recur}
+{if !empty($is_recur)}
{ts}This is a recurring contribution.{/ts}
{if $cancelSubscriptionUrl}
{foreach from=$honoreeProfile item=value key=label}
{$label}: {$value}
{/foreach}
-{elseif $softCreditTypes and $softCredits}
+{elseif !empty($softCreditTypes) and !empty($softCredits)}
{foreach from=$softCreditTypes item=softCreditType key=n}
===========================================================
{$softCreditType}
{/foreach}
{/foreach}
{/if}
-{if $pcpBlock}
+{if !empty($pcpBlock)}
===========================================================
{ts}Personal Campaign Page{/ts}
{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
{/if}
-{if $onBehalfProfile}
+{if !empty($onBehalfProfile)}
===========================================================
{ts}On Behalf Of{/ts}
{/foreach}
{/if}
-{if $billingName}
+{if !empty($billingName)}
===========================================================
{ts}Billing Name and Address{/ts}
{$address}
{$email}
-{elseif $email}
+{elseif !empty($email)}
===========================================================
{ts}Registered Email{/ts}
===========================================================
{$email}
{/if} {* End billingName or Email*}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
===========================================================
{ts}Credit Card Information{/ts}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
-{if $selectPremium }
+{if !empty($selectPremium )}
===========================================================
{ts}Premium Information{/ts}
{if $end_date}
{ts}End Date{/ts}: {$end_date|crmDate}
{/if}
-{if $contact_email OR $contact_phone}
+{if !empty($contact_email) OR !empty($contact_phone)}
{ts}For information about this premium, contact:{/ts}
-{if $contact_email}
+{if !empty($contact_email)}
{$contact_email}
{/if}
-{if $contact_phone}
+{if !empty($contact_phone)}
{$contact_phone}
{/if}
{/if}
-{if $is_deductible AND $price}
+{if !empty($is_deductible) AND !empty($price)}
{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
{/if}
-{if $customPre}
+{if !empty($customPre)}
===========================================================
{$customPre_grouptitle}
===========================================================
{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}
-{if $customPost}
+{if !empty($customPost)}
===========================================================
{$customPost_grouptitle}
===========================================================
{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+ {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
<p>{$event.confirm_email_text|htmlize}</p>
{/if}
- {if $isOnWaitlist}
+ {if !empty($isOnWaitlist)}
<p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
+ {if !empty($isPrimary)}
<p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
{/if}
- {elseif $isRequireApproval}
+ {elseif !empty($isRequireApproval)}
<p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
+ {if !empty($isPrimary)}
<p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
{/if}
- {elseif $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+ {elseif !empty($is_pay_later)}
+ <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
{/if}
</td>
</td>
</tr>
- {if $event.participant_role neq 'Attendee' and $defaultRole}
+ {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</tr>
{/if}
- {if $isShowLocation}
+ {if !empty($isShowLocation)}
<tr>
<td colspan="2" {$valueStyle}>
{$location.address.1.display|nl2br}
</tr>
{/if}
- {if $location.phone.1.phone || $location.email.1.email}
+ {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Event Contacts:{/ts}
{/foreach}
{/if}
- {if $event.is_public}
+ {if !empty($event.is_public)}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
{/if}
- {if $event.is_monetary}
+ {if !empty($event.is_monetary)}
<tr>
<th {$headerStyle}>
- {$event.fee_label}
+ {if !empty($event.fee_label)}{$event.fee_label}{/if}
</th>
</tr>
- {if $lineItem}
+ {if !empty($lineItem)}
{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
- {if $dataArray}
+ {if !empty($dataArray)}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
+ {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
</tr>
{foreach from=$value item=line}
<tr>
<td>
{$line.unit_price|crmMoney}
</td>
- {if $dataArray}
+ {if !empty($dataArray)}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
<td>
{$line.line_total+$line.tax_amount|crmMoney}
</td>
- {if $pricesetFieldsCount }
+ {if !empty($pricesetFieldsCount) }
<td>
{$line.participant_count}
</td>
</tr>
{/if}
{/foreach}
- {if $dataArray}
+ {if !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts}Amount Before Tax:{/ts}
{/if}
{/if}
- {if $amount && !$lineItem}
+ {if !empty($amount) && !$lineItem}
{foreach from=$amount item=amnt key=level}
<tr>
<td colspan="2" {$valueStyle}>
</tr>
{/foreach}
{/if}
- {if $totalTaxAmount}
+ {if isset($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
{/if}
</td>
<td {$valueStyle}>
- {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+ {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
</td>
</tr>
- {if $balanceAmount}
+ {if isset($balanceAmount)}
<tr>
<td {$labelStyle}>
{ts}Balance{/ts}
</td>
</tr>
{/if}
- {if $pricesetFieldsCount }
+ {if !empty($pricesetFieldsCount) }
<tr>
<td {$labelStyle}>
{ts}Total Participants{/ts}</td>
</td>
</tr>
{/if}
- {if $is_pay_later}
+ {if !empty($is_pay_later)}
<tr>
<td colspan="2" {$labelStyle}>
- {$pay_later_receipt}
+ {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
</td>
</tr>
{/if}
</tr>
{/if}
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Transaction Date{/ts}
</tr>
{/if}
- {if $financialTypeName}
+ {if !empty($financialTypeName)}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</tr>
{/if}
- {if $trxn_id}
+ {if !empty($trxn_id)}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</tr>
{/if}
- {if $paidBy}
+ {if !empty($paidBy)}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</tr>
{/if}
- {if $checkNumber}
+ {if !empty($checkNumber)}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</tr>
{/if}
- {if $billingName}
+ {if !empty($billingName)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</tr>
{/if}
- {if $credit_card_type}
+ {if !empty($credit_card_type)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
{/if} {* End of conditional section for Paid events *}
- {if $customPre}
+ {if !empty($customPre)}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{/foreach}
{/if}
- {if $customPost}
+ {if !empty($customPost)}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=value key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{/foreach}
{/if}
- {if $customProfile}
+ {if !empty($customProfile)}
{foreach from=$customProfile item=value key=customName}
<tr>
<th {$headerStyle}>
{/foreach}
{/if}
- {if $customGroup}
+ {if !empty($customGroup)}
{foreach from=$customGroup item=value key=customName}
<tr>
<th {$headerStyle}>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
{$event.confirm_email_text}
{/if}
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($isOnWaitlist)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts}You have been added to the WAIT LIST for this event.{/ts}
{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{elseif !empty($isRequireApproval)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts}Your registration has been submitted.{/ts}
{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
-{elseif $is_pay_later}
+{elseif !empty($is_pay_later)}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts}Event Information and Location{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$event.event_title}
{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
-{if $event.participant_role neq 'Attendee' and $defaultRole}
+{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and empty($defaultRole)}
{ts}Participant Role{/ts}: {$event.participant_role}
{/if}
-{if $isShowLocation}
+{if !empty($isShowLocation)}
{$location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
-{if $location.phone.1.phone || $location.email.1.email}
+{if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
{ts}Event Contacts:{/ts}
{foreach from=$location.phone item=phone}
{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
{/if}
-{if $event.is_public}
+{if !empty($event.is_public)}
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
{ts}Download iCalendar File:{/ts} {$icalFeed}
{/if}
-{if $email}
+{if !empty($email)}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts}Registered Email{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$email}
{/if}
-{if $event.is_monetary} {* This section for Paid events only.*}
+{if !empty($event.is_monetary)} {* This section for Paid events only.*}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($event.fee_label)}{$event.fee_label}{/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+{if !empty($lineItem)}{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
-{if $isPrimary}
+{if !empty($isPrimary)}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
{ts 1=$priceset+1}Participant %1{/ts}
{/if}
{/if}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+---------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{capture assign=ts_participant_total}{if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+{capture assign=ts_participant_total}{if !empty($pricesetFieldsCount) }{ts}Total Participants{/ts}{/if}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {if !empty($ts_participant_total)}{$ts_participant_total|string_format:"%10s"}{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {if !empty($ts_participant_count)}{$ts_participant_count|string_format:"%10s"}{/if}
{/foreach}
{/if}
{/foreach}
-{if $dataArray}
+{if !empty($dataArray)}
{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{/if}
{/if}
-{if $amount && !$lineItem}
+{if !empty($amount) && !$lineItem}
{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
{/foreach}
{/if}
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
-{if $isPrimary}
+{if !empty($isPrimary)}
-{if $balanceAmount}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+{if !empty($balanceAmount)}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
-{if $balanceAmount}
+{if !empty($balanceAmount)}
{ts}Balance{/ts}: {$balanceAmount|crmMoney}
{/if}
-{if $pricesetFieldsCount }
+{if !empty($pricesetFieldsCount) }
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{ts}Total Participants{/ts}: {$count}
{/if}
-{if $is_pay_later }
+{if !empty($is_pay_later) }
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $financialTypeName}
+{if !empty($financialTypeName)}
{ts}Financial Type{/ts}: {$financialTypeName}
{/if}
-{if $trxn_id}
+{if !empty($trxn_id)}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
-{if $paidBy}
+{if !empty($paidBy)}
{ts}Paid By{/ts}: {$paidBy}
{/if}
-{if $checkNumber}
+{if !empty($checkNumber)}
{ts}Check Number{/ts}: {$checkNumber}
{/if}
-{if $billingName}
+{if !empty($billingName)}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts}Billing Name and Address{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$billingName}
{$address}
{/if}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
===========================================================
{ts}Credit Card Information{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$credit_card_type}
{$credit_card_number}
{/if}
{/if} {* End of conditional section for Paid events *}
-{if $customPre}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($customPre)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$customPre_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{foreach from=$customPre item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$value}
{/if}
{/foreach}
{/if}
-{if $customPost}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($customPost)}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$customPost_grouptitle}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{foreach from=$customPost item=value key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$value}
{/if}
{/foreach}
{/if}
-{if $customProfile}
+{if !empty($customProfile)}
{foreach from=$customProfile item=value key=customName}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{ts 1=$customName+1}Participant Information - Participant %1{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{foreach from=$value item=val key=field}
{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
{if $field eq 'additionalCustomPre' }
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{$additionalCustomPre_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{else}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{$additionalCustomPost_grouptitle}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount) }--------------------{/if}
{/if}
{foreach from=$val item=v key=f}
{/foreach}
{/foreach}
{/if}
-{if $customGroup}
+{if !empty($customGroup)}
{foreach from=$customGroup item=value key=customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
+=========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{$customName}
-=========================================================={if $pricesetFieldsCount }===================={/if}
+=========================================================={if !empty($pricesetFieldsCount) }===================={/if}
{foreach from=$value item=v key=n}
{$n}: {$v}
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+ {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
<p>{$event.confirm_email_text|htmlize}</p>
{else}
{/if}
<p>
- {if $isOnWaitlist}
+ {if !empty($isOnWaitlist)}
<p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
- {if $isPrimary}
+ {if !empty($isPrimary)}
<p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
{/if}
- {elseif $isRequireApproval}
+ {elseif !empty($isRequireApproval)}
<p>{ts}Your registration has been submitted.{/ts}</p>
- {if $isPrimary}
+ {if !empty($isPrimary)}
<p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
{/if}
- {elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+ {elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
+ <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
{/if}
</td>
</tr>
{/if}
- {if $event.participant_role neq 'Attendee' and $defaultRole}
+ {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</tr>
{/if}
- {if $isShowLocation}
+ {if !empty($isShowLocation)}
<tr>
<td colspan="2" {$valueStyle}>
{$location.address.1.display|nl2br}
</tr>
{/if}
- {if $location.phone.1.phone || $location.email.1.email}
+ {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Event Contacts:{/ts}
{/foreach}
{/if}
- {if $event.is_public}
+ {if !empty($event.is_public)}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
</tr>
{/if}
- {if $event.is_share}
+ {if !empty($event.is_share)}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
</td>
</tr>
{/if}
- {if $payer.name}
+ {if !empty($payer.name)}
<tr>
<th {$headerStyle}>
{ts}You were registered by:{/ts}
</td>
</tr>
{/if}
- {if $event.is_monetary and not $isRequireApproval}
+ {if !empty($event.is_monetary) and empty($isRequireApproval)}
<tr>
<th {$headerStyle}>
- {$event.fee_label}
+ {if !empty($event.fee_label)}{$event.fee_label}{/if}
</th>
</tr>
- {if $lineItem}
+ {if !empty($lineItem)}
{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
<tr>
<td colspan="2" {$labelStyle}>
- {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
+ {ts 1=$priceset+1}Participant %1{/ts} {if !empty($part.$priceset)}{$part.$priceset.info}{/if}
</td>
</tr>
{/if}
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
- {if $dataArray}
+ {if !empty($dataArray)}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
- {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
+ {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
</tr>
{foreach from=$value item=line}
<tr>
<td {$tdStyle}>
{$line.unit_price|crmMoney:$currency}
</td>
- {if $dataArray}
+ {if !empty($dataArray)}
<td {$tdStyle}>
{$line.unit_price*$line.qty|crmMoney}
</td>
- {if $line.tax_rate != "" || $line.tax_amount != ""}
+ {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
<td {$tdStyle}>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td {$tdStyle}>
{$line.line_total+$line.tax_amount|crmMoney:$currency}
</td>
- {if $pricesetFieldsCount }<td {$tdStyle}>{$line.participant_count}</td> {/if}
+ {if !empty($pricesetFieldsCount) }<td {$tdStyle}>{$line.participant_count}</td> {/if}
</tr>
{/foreach}
- {if $individual}
+ {if !empty($individual)}
<tr {$participantTotal}>
<td colspan=3>{ts}Participant Total{/ts}</td>
<td colspan=2>{$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney}</td>
</tr>
{/if}
{/foreach}
- {if $dataArray}
+ {if !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts} Amount Before Tax: {/ts}
{/if}
{/if}
- {if $amounts && !$lineItem}
+ {if !empty($amounts) && empty($lineItem)}
{foreach from=$amounts item=amnt key=level}
<tr>
<td colspan="2" {$valueStyle}>
{/foreach}
{/if}
- {if $totalTaxAmount}
+ {if isset($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
{ts}Total Amount{/ts}
</td>
<td {$valueStyle}>
- {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+ {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
</td>
</tr>
- {if $pricesetFieldsCount }
+ {if !empty($pricesetFieldsCount) }
<tr>
<td {$labelStyle}>
{ts}Total Participants{/ts}</td>
</tr>
{/if}
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Transaction Date{/ts}
</tr>
{/if}
- {if $financialTypeName}
+ {if !empty($financialTypeName)}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</tr>
{/if}
- {if $trxn_id}
+ {if !empty($trxn_id)}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</tr>
{/if}
- {if $paidBy}
+ {if !empty($paidBy)}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</tr>
{/if}
- {if $checkNumber}
+ {if !empty($checkNumber)}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</tr>
{/if}
- {if $billingName}
+ {if !empty($billingName)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</tr>
{/if}
- {if $credit_card_type}
+ {if !empty($credit_card_type)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
{/if} {* End of conditional section for Paid events *}
-{if $customPre}
+{if !empty($customPre)}
{foreach from=$customPre item=customPr key=i}
<tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
{foreach from=$customPr item=customValue key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
<tr>
<td {$labelStyle}>{$customName}</td>
<td {$valueStyle}>{$customValue}</td>
{/foreach}
{/if}
-{if $customPost}
+{if !empty($customPost)}
{foreach from=$customPost item=customPos key=j}
<tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
{foreach from=$customPos item=customValue key=customName}
- {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {if (!empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
<tr>
<td {$labelStyle}>{$customName}</td>
<td {$valueStyle}>{$customValue}</td>
{/foreach}
{/if}
-{if $customProfile}
+{if !empty($customProfile)}
{foreach from=$customProfile.profile item=eachParticipant key=participantID}
<tr><th {$headerStyle}>{ts 1=$participantID+2}Participant %1{/ts} </th></tr>
{foreach from=$eachParticipant item=eachProfile key=pid}
{/if}
</table>
- {if $event.allow_selfcancelxfer }
+ {if !empty($event.allow_selfcancelxfer) }
<tr>
<td colspan="2" {$valueStyle}>
- {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}<br />
+ {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}<br />
{capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
<a href="{$selfService}">{ts}Click here to transfer or cancel your registration.{/ts}</a>
</td>
-{if $isOnWaitlist}{ts}Wait List Confirmation{/ts}{elseif $isRequireApproval}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} - {contact.display_name}
+{if !empty($isOnWaitlist)}{ts}Wait List Confirmation{/ts}{elseif !empty($isRequireApproval)}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} - {contact.display_name}
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
{$event.confirm_email_text}
{else}
{ts}Thank you for your registration.{/ts}
{if $participant_status}{ts 1=$participant_status}This is a confirmation that your registration has been received and your status has been updated to %1.{/ts}
- {else}{if $isOnWaitlist}{ts}This is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}
+ {else}{if !empty($isOnWaitlist)}{ts}This is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}
{/if}
{/if}
-{if $isOnWaitlist}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($isOnWaitlist)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts}You have been added to the WAIT LIST for this event.{/ts}
-{if $isPrimary}
+{if !empty($isPrimary)}
{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
-{elseif $isRequireApproval}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{elseif !empty($isRequireApproval)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts}Your registration has been submitted.{/ts}
{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
-{elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
+{elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
-{$pay_later_receipt}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{/if}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts}Event Information and Location{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{$event.event_title}
{$event.event_start_date|date_format:"%A"} {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|date_format:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
-{if $conference_sessions}
+{if !empty($conference_sessions)}
{ts}Your schedule:{/ts}
{/foreach}
{/if}
-{if $event.participant_role neq 'Attendee' and $defaultRole}
+{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
{ts}Participant Role{/ts}: {$event.participant_role}
{/if}
-{if $isShowLocation}
+{if !empty($isShowLocation)}
{$location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
-{if $location.phone.1.phone || $location.email.1.email}
+{if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
{ts}Event Contacts:{/ts}
{foreach from=$location.phone item=phone}
{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
{/if}
-{if $event.is_public}
+{if !empty($event.is_public)}
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
{ts}Download iCalendar File:{/ts} {$icalFeed}
{/if}
-{if $payer.name}
+{if !empty($payer.name)}
You were registered by: {$payer.name}
{/if}
-{if $event.is_monetary and not $isRequireApproval} {* This section for Paid events only.*}
+{if !empty($event.is_monetary) and empty($isRequireApproval)} {* This section for Paid events only.*}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
-{$event.fee_label}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty ($event.fee_label)}{$event.fee_label}{/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
-{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+{if !empty($lineItem)}{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{/if}
{/if}
------------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+-----------------------------------------------------------{if !empty($pricesetFieldsCount)}-----------------------------------------------------{/if}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
-{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
------------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {if !empty($ts_participant_total)}{$ts_participant_total|string_format:"%10s"}{/if}
+-----------------------------------------------------------{if !empty($pricesetFieldsCount)}-----------------------------------------------------{/if}
{foreach from=$value item=line}
-{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
+{if !empty($pricesetFieldsCount) }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{if !empty($ts_participant_count)}{$ts_participant_count|string_format:"%10s"}{/if}
{/foreach}
----------------------------------------------------------------------------------------------------------------
-{if $individual}{ts}Participant Total{/ts} {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%29s"} {$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%33s"} {$individual.$priceset.totalAmtWithTax|crmMoney:$currency|string_format:"%12s"}{/if}
+{if !empty($individual)}{ts}Participant Total{/ts} {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%29s"} {$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%33s"} {$individual.$priceset.totalAmtWithTax|crmMoney:$currency|string_format:"%12s"}{/if}
{/if}
{""|string_format:"%120s"}
{/foreach}
{""|string_format:"%120s"}
-{if $dataArray}
+{if !empty($dataArray)}
{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{/if}
{/if}
-{if $amounts && !$lineItem}
+{if !empty($amounts) && empty($lineItem)}
{foreach from=$amounts item=amnt key=level}{$amnt.amount|crmMoney:$currency} {$amnt.label}
{/foreach}
{/if}
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
-{if $isPrimary }
+{if !empty($isPrimary) }
-{ts}Total Amount{/ts}: {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+{ts}Total Amount{/ts}: {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
-{if $pricesetFieldsCount }
+{if !empty($pricesetFieldsCount) }
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{if $register_date}
{ts}Registration Date{/ts}: {$register_date|crmDate}
{/if}
-{if $receive_date}
+{if !empty($receive_date)}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $financialTypeName}
+{if !empty($financialTypeName)}
{ts}Financial Type{/ts}: {$financialTypeName}
{/if}
-{if $trxn_id}
+{if !empty($trxn_id)}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
-{if $paidBy}
+{if !empty($paidBy)}
{ts}Paid By{/ts}: {$paidBy}
{/if}
-{if $checkNumber}
+{if !empty($checkNumber)}
{ts}Check Number{/ts}: {$checkNumber}
{/if}
-{if $billingName}
+{if !empty($billingName)}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts}Billing Name and Address{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{$billingName}
{$address}
{/if}
-{if $credit_card_type}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+{if !empty($credit_card_type)}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts}Credit Card Information{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{$credit_card_type}
{$credit_card_number}
{/if}
{/if} {* End of conditional section for Paid events *}
-{if $customPre}
+{if !empty($customPre)}
{foreach from=$customPre item=customPr key=i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{$customPre_grouptitle.$i}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{foreach from=$customPr item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
{/foreach}
{/if}
-{if $customPost}
+{if !empty($customPost)}
{foreach from=$customPost item=customPos key=j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{$customPost_grouptitle.$j}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{foreach from=$customPos item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
{/foreach}
{/if}
-{if $customProfile}
+{if !empty($customProfile)}
{foreach from=$customProfile.profile item=eachParticipant key=participantID}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{ts 1=$participantID+2}Participant Information - Participant %1{/ts}
-==========================================================={if $pricesetFieldsCount }===================={/if}
+==========================================================={if !empty($pricesetFieldsCount)}===================={/if}
{foreach from=$eachParticipant item=eachProfile key=pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount)}--------------------{/if}
{$customProfile.title.$pid}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+----------------------------------------------------------{if !empty($pricesetFieldsCount)}--------------------{/if}
{foreach from=$eachProfile item=val key=field}
{foreach from=$val item=v key=f}
{/foreach}
{/if}
-{if $event.allow_selfcancelxfer }
-{ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+{if !empty($event.allow_selfcancelxfer) }
+{ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}
{capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
{ts}Transfer or cancel your registration:{/ts} {$selfService}
{/if}
{/if}
{if $is_pay_later}
- <p>{$pay_later_receipt}</p>
+ <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p>
{/if}
<p>Your order number is #{$transaction_id}. {if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
{/if}
{if $is_pay_later}
- {$pay_later_receipt}
+ {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
{/if}
Your order number is #{$transaction_id}. {if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $formValues.receipt_text_signup}
+ {if !empty($formValues.receipt_text_signup)}
<p>{$formValues.receipt_text_signup|htmlize}</p>
- {elseif $formValues.receipt_text_renewal}
+ {elseif !empty($formValues.receipt_text_renewal)}
<p>{$formValues.receipt_text_renewal|htmlize}</p>
{else}
<p>{ts}Thank you for this contribution.{/ts}</p>
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- {if !$lineItem}
+ {if empty($lineItem)}
<tr>
<th {$headerStyle}>
{ts}Membership Information{/ts}
</td>
</tr>
{/if}
- {if ! $cancelled}
- {if !$lineItem}
+ {if empty($cancelled)}
+ {if empty($lineItem)}
<tr>
<td {$labelStyle}>
{ts}Membership Start Date{/ts}
</tr>
{/if}
- {if $lineItem}
+ {if !empty($lineItem)}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Fee{/ts}</th>
- {if $dataArray}
+ {if !empty($dataArray)}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<td>
{$line.line_total|crmMoney}
</td>
- {if $dataArray}
+ {if !empty($dataArray)}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
- {if $line.tax_rate != "" || $line.tax_amount != ""}
+ {if $line.tax_rate and ($line.tax_rate != "" || $line.tax_amount != "")}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
</td>
</tr>
{/foreach}
- {if $dataArray}
+ {if !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts}Amount Before Tax:{/ts}
{$formValues.total_amount|crmMoney}
</td>
</tr>
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Date Received{/ts}
</td>
</tr>
{/if}
- {if $formValues.paidBy}
+ {if !empty($formValues.paidBy)}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
{$formValues.paidBy}
</td>
</tr>
- {if $formValues.check_number}
+ {if !empty($formValues.check_number)}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</td>
</tr>
- {if $isPrimary}
+ {if !empty($isPrimary)}
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
- {if $billingName}
+ {if !empty($billingName)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</tr>
{/if}
- {if $credit_card_type}
+ {if !empty($credit_card_type)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</tr>
{/if}
- {if $customValues}
+ {if !empty($customValues)}
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $formValues.receipt_text_signup}
+{if !empty($formValues.receipt_text_signup)}
{$formValues.receipt_text_signup}
-{elseif $formValues.receipt_text_renewal}
+{elseif !empty($formValues.receipt_text_renewal)}
{$formValues.receipt_text_renewal}
{else}{ts}Thank you for this contribution.{/ts}{/if}
-{if !$lineItem}
+{if empty($lineItem)}
===========================================================
{ts}Membership Information{/ts}
===========================================================
{ts}Membership Type{/ts}: {$membership_name}
{/if}
-{if ! $cancelled}
-{if !$lineItem}
+{if empty($cancelled)}
+{if empty($lineItem)}
{ts}Membership Start Date{/ts}: {$mem_start_date}
{ts}Membership End Date{/ts}: {$mem_end_date}
{/if}
{if $formValues.contributionType_name}
{ts}Financial Type{/ts}: {$formValues.contributionType_name}
{/if}
-{if $lineItem}
+{if !empty($lineItem)}
{foreach from=$lineItem item=value key=priceset}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
--------------------------------------------------------------------------------------------------
{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
{/foreach}
{/foreach}
-{if $dataArray}
+{if !empty($dataArray)}
{ts}Amount before Tax{/ts}: {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{/if}
{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
-{if $receive_date}
+{if !empty($receive_date)}
{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
-{if $formValues.paidBy}
+{if !empty($formValues.paidBy)}
{ts}Paid By{/ts}: {$formValues.paidBy}
-{if $formValues.check_number}
+{if !empty($formValues.check_number)}
{ts}Check Number{/ts}: {$formValues.check_number}
{/if}
{/if}
{/if}
{/if}
-{if $isPrimary }
-{if $billingName}
+{if !empty($isPrimary) }
+{if !empty($billingName)}
===========================================================
{ts}Billing Name and Address{/ts}
{$address}
{/if}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
===========================================================
{ts}Credit Card Information{/ts}
{/if}
{/if}
-{if $customValues}
+{if !empty($customValues)}
===========================================================
{ts}Membership Options{/ts}
<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
- {if $receipt_text}
+ {if !empty($receipt_text)}
<p>{$receipt_text|htmlize}</p>
{/if}
{if $is_pay_later}
- <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
+ <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
{/if}
</td>
</th>
</tr>
- {if !$useForMember and $membership_amount and $is_quick_config}
+ {if !$useForMember and isset($membership_amount) and !empty($is_quick_config)}
<tr>
<td {$labelStyle}>
</tr>
{/if}
- {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
+ {elseif empty($useForMember) && !empty($lineItem) and $priceSetID and empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
<tr>
</tr>
{else}
- {if $useForMember && $lineItem and !$is_quick_config}
+ {if $useForMember && $lineItem and empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Fee{/ts}</th>
- {if $dataArray}
+ {if !empty($dataArray)}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<td>
{$line.line_total|crmMoney}
</td>
- {if $dataArray}
+ {if !empty($dataArray)}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
- {if $line.tax_rate != "" || $line.tax_amount != ""}
+ {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
</td>
</tr>
{/foreach}
- {if $dataArray}
+ {if !empty($dataArray)}
<tr>
<td {$labelStyle}>
{ts}Amount Before Tax:{/ts}
{/foreach}
{/if}
{/if}
- {if $totalTaxAmount}
+ {if isset($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
{ts}Amount{/ts}
</td>
<td {$valueStyle}>
- {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
+ {$amount|crmMoney} {if isset($amount_level)} - {$amount_level}{/if}
</td>
</tr>
{/if}
- {elseif $membership_amount}
+ {elseif isset($membership_amount)}
<tr>
{/if}
- {if $receive_date}
+ {if !empty($receive_date)}
<tr>
<td {$labelStyle}>
{ts}Date{/ts}
</tr>
{/if}
- {if $is_monetary and $trxn_id}
+ {if !empty($is_monetary) and !empty($trxn_id)}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</tr>
{/if}
- {if $membership_trx_id}
+ {if !empty($membership_trx_id)}
<tr>
<td {$labelStyle}>
{ts}Membership Transaction #{/ts}
</td>
</tr>
{/if}
- {if $is_recur}
+ {if !empty($is_recur)}
<tr>
<td colspan="2" {$labelStyle}>
{ts}This membership will be renewed automatically.{/ts}
{/foreach}
{/if}
- {if $pcpBlock}
+ {if !empty($pcpBlock)}
<tr>
<th {$headerStyle}>
{ts}Personal Campaign Page{/ts}
{/if}
{/if}
- {if $onBehalfProfile}
+ {if !empty($onBehalfProfile)}
<tr>
<th {$headerStyle}>
{$onBehalfProfile_grouptitle}
{/foreach}
{/if}
- {if $billingName}
+ {if !empty($billingName)}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
{$email}
</td>
</tr>
- {elseif $email}
+ {elseif !empty($email)}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</tr>
{/if}
- {if $credit_card_type}
+ {if !empty($credit_card_type)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</tr>
{/if}
- {if $selectPremium}
+ {if !empty($selectPremium)}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
</td>
</tr>
{/if}
- {if $contact_email OR $contact_phone}
+ {if !empty($contact_email) OR !empty($contact_phone)}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts}For information about this premium, contact:{/ts}</p>
- {if $contact_email}
+ {if !empty($contact_email)}
<p>{$contact_email}</p>
{/if}
- {if $contact_phone}
+ {if !empty($contact_phone)}
<p>{$contact_phone}</p>
{/if}
</td>
</tr>
{/if}
- {if $is_deductible AND $price}
+ {if !empty($is_deductible) AND !empty($price)}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
{/if}
{/if}
- {if $customPre}
+ {if !empty($customPre)}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+ {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{/foreach}
{/if}
- {if $customPost}
+ {if !empty($customPost)}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=customValue key=customName}
- {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+ {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
<tr>
<td {$labelStyle}>
{$customName}
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
-{if $receipt_text}
+{if !empty($receipt_text)}
{$receipt_text}
{/if}
{if $is_pay_later}
===========================================================
-{$pay_later_receipt}
+{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
===========================================================
{/if}
{ts}Membership Fee{/ts}
===========================================================
-{if !$useForMember && $membership_amount && $is_quick_config}
+{if !$useForMember && isset($membership_amount) && !empty($is_quick_config)}
{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
{if $amount && !$is_separate_payment }
{ts}Contribution Amount{/ts}: {$amount|crmMoney}
-------------------------------------------
{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
{/if}
-{elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config}
+{elseif !$useForMember && !empty($lineItem) and !empty($priceSetID) & empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
---------------------------------------------------------
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{ts}Total Amount{/ts}: {$amount|crmMoney}
{else}
-{if $useForMember && $lineItem && !$is_quick_config}
+{if $useForMember && $lineItem && empty($is_quick_config)}
{foreach from=$lineItem item=value key=priceset}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_total}{ts}Fee{/ts}{/capture}
-{if $dataArray}
+{if !empty($dataArray)}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
-{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if !empty($dataArray)} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
--------------------------------------------------------------------------------------------------
{foreach from=$value item=line}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if !empty($dataArray)} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
{/foreach}
{/foreach}
-{if $dataArray}
+{if !empty($dataArray)}
{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
--------------------------------------------------------------------------------------------------
{/if}
-{if $totalTaxAmount}
+{if isset($totalTaxAmount)}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
-{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
+{ts}Amount{/ts}: {$amount|crmMoney} {if isset($amount_level) } - {$amount_level} {/if}
{/if}
-{elseif $membership_amount}
+{elseif isset($membership_amount)}
===========================================================
{ts}Membership Fee{/ts}
{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
{/if}
-{if $receive_date}
+{if !empty($receive_date)}
{ts}Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $is_monetary and $trxn_id}
+{if !empty($is_monetary) and !empty($trxn_id)}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
-{if $membership_trx_id}
+{if !empty($membership_trx_id)}
{ts}Membership Transaction #{/ts}: {$membership_trx_id}
{/if}
-{if $is_recur}
+{if !empty($is_recur)}
{ts}This membership will be renewed automatically.{/ts}
{if $cancelSubscriptionUrl}
{/foreach}
{/if}
-{if $pcpBlock}
+{if !empty($pcpBlock)}
===========================================================
{ts}Personal Campaign Page{/ts}
{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
{/if}
-{if $onBehalfProfile}
+{if !empty($onBehalfProfile)}
===========================================================
{ts}On Behalf Of{/ts}
{/foreach}
{/if}
-{if $billingName}
+{if !empty($billingName)}
===========================================================
{ts}Billing Name and Address{/ts}
{$address}
{$email}
-{elseif $email}
+{elseif !empty($email)}
===========================================================
{ts}Registered Email{/ts}
===========================================================
{$email}
{/if} {* End billingName or email *}
-{if $credit_card_type}
+{if !empty($credit_card_type)}
===========================================================
{ts}Credit Card Information{/ts}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
-{if $selectPremium }
+{if !empty($selectPremium)}
===========================================================
{ts}Premium Information{/ts}
{if $end_date}
{ts}End Date{/ts}: {$end_date|crmDate}
{/if}
-{if $contact_email OR $contact_phone}
+{if !empty($contact_email) OR !empty($contact_phone)}
{ts}For information about this premium, contact:{/ts}
-{if $contact_email}
+{if !empty($contact_email)}
{$contact_email}
{/if}
-{if $contact_phone}
+{if !empty($contact_phone)}
{$contact_phone}
{/if}
{/if}
-{if $is_deductible AND $price}
+{if !empty($is_deductible) AND !empty($price)}
{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
{/if}
-{if $customPre}
+{if !empty($customPre)}
===========================================================
{$customPre_grouptitle}
===========================================================
{foreach from=$customPre item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}
-{if $customPost}
+{if !empty($customPost)}
===========================================================
{$customPost_grouptitle}
===========================================================
{foreach from=$customPost item=customValue key=customName}
-{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
{$customName}: {$customValue}
{/if}
{/foreach}
</td>
</tr>
- {if $event.participant_role}
+ {if !empty($event.participant_role)}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</tr>
{/if}
- {if $isShowLocation}
+ {if !empty($isShowLocation)}
<tr>
<td colspan="2" {$valueStyle}>
{$location.address.1.display|nl2br}
</tr>
{/if}
- {if $location.phone.1.phone || $location.email.1.email}
+ {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Event Contacts:{/ts}