From 589b90c676bc8a652c8f982c436f58e81858f9c1 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 31 Oct 2016 09:44:41 +1300 Subject: [PATCH] Reformat lineitem.tpl. whitspace only --- templates/CRM/Price/Form/LineItem.tpl | 204 +++++++++++++------------- 1 file changed, 106 insertions(+), 98 deletions(-) diff --git a/templates/CRM/Price/Form/LineItem.tpl b/templates/CRM/Price/Form/LineItem.tpl index 77775b87d6..f386f9ab7c 100644 --- a/templates/CRM/Price/Form/LineItem.tpl +++ b/templates/CRM/Price/Form/LineItem.tpl @@ -26,127 +26,135 @@ {* Displays contribution/event fees when price set is used. *} {foreach from=$lineItem item=value key=priceset} - {if $value neq 'skip'} + {if $value neq 'skip'} {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *} - {if $priceset GT 0}
{/if} - {ts}Participant {$priceset+1}{/ts} {$part.$priceset.info} + {if $priceset GT 0}
{/if} + {ts}Participant {$priceset+1}{/ts} + {$part.$priceset.info} {/if} - + {if $context EQ "Membership"} - - {else} - - - - - {if $context EQ "Contribution" && $action eq 2} - - - + + {else} + + + + {if $context EQ "Contribution" && $action eq 2} + + + + {/if} {/if} - {/if} - - {if $pricesetFieldsCount} - {/if} - - {foreach from=$value item=line} - - - {if $context NEQ "Membership"} - - - {/if} - - {if $pricesetFieldsCount} {/if} - {if $context EQ "Contribution" && $action eq 2} - - - - {/if} - - {/foreach} - {if $context EQ "Contribution" && $action eq 2} - {/if} + + {foreach from=$value item=line} + + + {if $context NEQ "Membership"} + + + {/if} + + {if $pricesetFieldsCount} + {/if} + {if $context EQ "Contribution" && $action eq 2} + + - - - - - - - - - - - - {/if} + + + + + + + {/if}
{ts}Item{/ts}{ts}Fee{/ts}{ts}Qty{/ts}{ts}Unit Price{/ts}{ts}Total Price{/ts}{ts}Paid{/ts}{ts}Owing{/ts}{ts}Amount of
Current Payment {/ts}
{ts}Fee{/ts}{ts}Qty{/ts}{ts}Unit Price{/ts}{ts}Total Price{/ts}{ts}Paid{/ts}{ts}Owing{/ts}{ts}Amount of
Current Payment {/ts}
{ts}Total Participants{/ts}
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description}
{/if}
{$line.qty}{$line.unit_price|crmMoney}{$line.line_total|crmMoney}{$line.participant_count}{$pricefildTotal.LineItems[$line.price_field_value_id]|crmMoney} - {assign var="fildTotal" value=$line.line_total-$pricefildTotal[$pricefildTotal.id][$line.price_field_value_id]} - {$fildTotal|crmMoney} - $ 
- {ts}Contribution Total{/ts}: + {if $pricesetFieldsCount} + {ts}Total Participants{/ts}
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} +
{$line.description}
{/if}
{$line.qty}{$line.unit_price|crmMoney}{$line.line_total|crmMoney}{$line.participant_count}{$pricefildTotal.LineItems[$line.price_field_value_id]|crmMoney} + {assign var="fildTotal" value=$line.line_total-$pricefildTotal[$pricefildTotal.id][$line.price_field_value_id]} + {$fildTotal|crmMoney} {$totalAmount|crmMoney}{$pricefildTotal.total|crmMoney}{assign var="total" value= $totalAmount-$pricefildTotal.total}{$total|crmMoney}
-{literal} - -{/literal} + $('.editPayment').text('$ ' + totalAmount); + var unlocateAmount = '{/literal}{$total}{literal}'; + $('.unlocateAmount').text('$ ' + (unlocateAmount - totalAmount)); + }); + }); + + {/literal} -
Unallocated Amount
{$total|crmMoney}
Unallocated Amount
{$total|crmMoney}
- {/if} + {/if} {/foreach}
-
- {if $context EQ "Contribution"} - {ts}Contribution Total{/ts}: - {elseif $context EQ "Event"} - {ts}Event Total{/ts}: - {elseif $context EQ "Membership"} - {ts}Membership Fee Total{/ts}: - {else} - {ts}Total Amount{/ts}: - {/if} +
+ {if $context EQ "Contribution"} + {ts}Contribution Total{/ts}: + {elseif $context EQ "Event"} + {ts}Event Total{/ts}: + {elseif $context EQ "Membership"} + {ts}Membership Fee Total{/ts}: + {else} + {ts}Total Amount{/ts}: + {/if} {$totalAmount|crmMoney} -
-
- {if $pricesetFieldsCount} +
+
+ {if $pricesetFieldsCount} {ts}Total Participants{/ts}: {foreach from=$lineItem item=pcount} {if $pcount neq 'skip'} - {assign var="lineItemCount" value=0} + {assign var="lineItemCount" value=0} - {foreach from=$pcount item=p_count} - {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count} - {/foreach} - {if $lineItemCount < 1 } - {assign var="lineItemCount" value=1} - {/if} - {assign var="totalcount" value=$totalcount+$lineItemCount} + {foreach from=$pcount item=p_count} + {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count} + {/foreach} + {if $lineItemCount < 1 } + {assign var="lineItemCount" value=1} + {/if} + {assign var="totalcount" value=$totalcount+$lineItemCount} {/if} {/foreach} {$totalcount} - {/if} -
+ {/if} +
{if $hookDiscount.message} -
- ({$hookDiscount.message}) -
+
+ ({$hookDiscount.message}) +
{/if} -- 2.25.1