This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/invoice/user_view.tpl
2011-05-03 09:49:01 +10:00

428 lines
20 KiB
Smarty

{if $smarty.const.SESS_LOGGED == false}
{$block->display('account:user_login')}
{else}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{* Since this page can also be rendered via a checkout plugin, we need to change the $meth.0/1 to be account/user_view *}
{assign var=meth value=','|explode:'invoice,user_view'}
{if $SESS_LOGGED == '1'}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/user_view_pre.tpl'}
<!-- prototype -->
<script src="includes/javascript/prototype.js" type="text/javascript"></script>
<script src="includes/javascript/effects.js" type="text/javascript"></script>
<script src="includes/javascript/dragdrop.js" type="text/javascript"></script>
<script src="includes/javascript/controls.js" type="text/javascript"></script>
<!-- checkout options -->
{if $record.billing_status == '0'}
{$block->display('invoice:checkoutoptions')}
{/if}
{if $record}
<form id="user_view" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="table_heading">{osb f=tt} {$record.id}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row1">
<td style="width: 33%;"><b>{osb f=tf field=date_orig}</b></td>
<td style="width: 33%;"><b>{osb f=tf field=due_date}</b></td>
<td style="width: 33%;"><b>{osb f=tf field=total_amt}</b></td>
</tr>
<tr valign="top" class="row2">
<td style="width: 33%;">{$list->date($record.date_orig)}</td>
<td style="width: 33%;">{$list->date($record.due_date)}</td>
<td style="width: 33%;">{$list->format_currency_num($record.total_amt,$record.actual_billed_currency_id)}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row1">
<td style="width: 33%;"><b>{osb f=tf field=billed_amt}</b></td>
<td style="width: 33%;"><b><a href="?_page=invoice:pdf&amp;id={$record.id}&amp;_escape=true" onclick="target='_blank';">{t}Print Invoice{/t}</a></b></td>
<td style="width: 33%; color: #990000;"><b>{osb f=tf field=billing_status}</b></td>
</tr>
<tr valign="top" class="row2">
<td style="width: 33%;">{$list->format_currency_num($record.billed_amt,$record.actual_billed_currency_id)}</td>
<td style="width: 33%;"><a href="?_page=invoice:pdf&amp;id={$record.id}&amp;_escape=true" onclick="target='_blank';"><img src="themes/{$THEME_NAME}/images/icons/print_16.gif" alt="Print" style="border: 0px;"/></a></td>
<td style="width: 33%;">
<b>
{if $record.balance == 0}
{t}Paid{/t}
{else}
{$list->format_currency_num($record.balance,$record.actual_billed_currency_id)}
{/if}
</b>
</td>
</tr>
</table>
</td>
</tr>
{* show discount details *}
{if $record.discount_arr != '' && $record.discount_amt > 0}
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row2">
<td style="width: 33%;"><b>{osb f=tf field=discount_amt}</b></td>
<td style="width: 33%;">
{assign var=discount_details value=$record.discount_popup}
<a href="#" {popup capcolor="ffffff" textcolor="333333" bgcolor="506DC7" fgcolor="FFFFFF" sticky=false width="250" caption="Discount Details" text="$discount_details" snapx=1 snapy=1 sticky=1}>{$list->format_currency_num($record.discount_amt,$record.actual_billed_currency_id)}</a></td>
<td style="width: 33%;">&nbsp;</td>
</tr>
</table>
</td>
</tr>
{/if}
{* show checkout/payment plugin details *}
<!-- billing details -->
{assign var=cc_user value=true}
{if $record.checkout_plugin_id != '0'}
{assign var=sql1 value=" AND id='"}
{assign var=sql2 value="' "}
{assign var=sql3 value=$record.checkout_plugin_id}
{assign var=sql value=$sql1$sql3$sql2}
{if $list->smarty_array('checkout','checkout_plugin',$sql,'checkout')}
{assign var=checkout_plugin value=$checkout[0].checkout_plugin}
{assign var='ablock' value='checkout_plugin:plugin_inv_'}
{assign var='blockfile' value="$ablock$checkout_plugin"}
{$block->display($blockfile)}
{/if}
{/if}
<!-- end billing details -->
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top" class="row1">
<td style="width: 33%;"><b>{osb f=tf field=tax_amt}</b></td>
<td style="width: 33%;"><b>{osb f=tf field=discount_amt}</b></td>
<td style="width: 33%;">&nbsp;</td>
</tr>
<tr valign="top" class="row2">
<td style="width: 33%;">{$list->format_currency_num($record.tax_amt,$record.actual_billed_currency_id)}</td>
<td style="width: 33%;">
{if $record.discount_amt > 0}
<div id="taxpanel1" style="display:none"> {$record.discount_popup_user} </div>
<div id="taxpanel"> <a href="#" onclick="{literal} new Effect.Fade('taxpanel',{duration: 0}); new Effect.Appear('taxpanel1',{duration: .5}); return false;" {/literal}>{$list->format_currency_num($record.discount_amt,$record.actual_billed_currency_id)}</a> </div>
{else}---{/if}
</td>
<td style="width: 33%;">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<br/>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top" class="table_background">
<td class="table_heading">{t}Products Ordered{/t}</td>
</tr>
<tr valign="top">
<td class="row1">
<!-- Loop through each invoice item record -->
{foreach from=$cart item=cart}
<br/>
{if $cart.item_type == '2'}
{* include file='file:../cart/cart_table_type_2.tpl' disable=true *}
<!-- Show domain -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="70%" class="row2" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td><div style="font-weight: bold; text-decoration: underline;">{$cart.domain_name|upper}.{$cart.domain_tld|upper}</div></td>
<td>&nbsp;</td>
<td style="width: 5%;">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
{if $cart.sku=='DOMAIN-REGISTER'}
{t}Register{/t}
{elseif $cart.sku=='DOMAIN-TRANSFER'}
{t}Transfer{/t}
{elseif $cart.sku=='DOMAIN-PARK'}
{t}Park{/t}
{elseif $cart.sku=='DOMAIN-RENEW'}
{t}Renew{/t}
{/if}
</td>
</tr>
</table>
</td>
<td width="30%" class="row1" valign="top" align="right">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td width="43%">{t}Base Price{/t}</td>
<td width="57%" valign="middle" align="right">
<div id="def_base_price_{$cart_assoc.id}">
<div id="def_base_price_{$cart.id}">{$list->format_currency($cart.price_base,$record.actual_billed_currency_id)}</div>
<div id="base_price_{$cart.id}"></div>
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
</table>
{if $cart.sku != 'DOMAIN-PARK'}
<select id="quantity_{$cart.id}" name="select" disabled="disabled">
<option value="">{$cart.domain_term} Year</option>
</select>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
{elseif $cart.item_type == '3'}
{* include file='file:../cart/cart_table_type_3.tpl' disable=true *}
<!-- Show ad-hoc -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td><div style="font-weight: bold; text-decoration: underline;">{$cart.product_name}</div></td>
<td style="text-align: right;">(<a href="?_page=product:details&amp;id={$cart.product_id}">{$cart.sku}</a>)</td>
<td style="width: 5%; text-align: right;">
{if $cart.attribute_popup != ''}
<div id="attr_panell_1_{$cart.id}" style="display:none">
<a href="#" onclick=" new Effect.Fade('attr_panel_1_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Fade('attr_panell_1_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Appear('attr_panel_2_{$cart.id}',{literal}{duration: .5}{/literal});
new Effect.Appear('attr_panell_2_{$cart.id}',{literal}{duration: .5}{/literal});
return false;">
<img src="themes/{$THEME_NAME}/images/icons/edit_16.gif" alt="Details" width="16" height="16" style="border: 0px;"/>
</a>
</div>
<div id="attr_panell_2_{$cart.id}" >
<a href="#" onclick=" new Effect.Fade('attr_panel_2_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Fade('attr_panell_2_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Appear('attr_panel_1_{$cart.id}',{literal}{duration: .5}{/literal});
new Effect.Appear('attr_panell_1_{$cart.id}',{literal}{duration: .5}{/literal});
return false;">
<img src="themes/{$THEME_NAME}/images/icons/edit_16.gif" alt="Details" width="16" height="16" style="border: 0px;"/>
</a>
</div>
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>{t}One-time Charge{/t}</td>
</tr>
</table>
</td>
<td style="width: 30%;" class="row1" valign="top">
<div id="attr_panel_1_{$cart.id}" style="display:none">{$cart.attribute_popup}</div>
<div id="attr_panel_2_{$cart.id}">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{t}Base Price{/t}</td>
<td style="width: 30%; text-align: right;">
<div id="def_base_price_{$cart_assoc.id}">
<div id="def_base_price_{$cart.id}">{$list->format_currency($cart.price_base,$record.billed_currency_id)}</div>
<div id="base_price_{$cart.id}"></div>
</div>
<div id="base_price_{$cart_assoc.id}"></div>
</td>
</tr>
<tr>
<td>{t}Quantity{/t}</td>
<td style="width: 30%; text-align: right;">{$cart.quantity}</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
{else}
{* include file='file:../cart/cart_table_type_x.tpl' disable=true *}
<!-- Show product -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td style="width: 70%;" class="row1" valign="top">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td><b>{if $list->translate('product_translate','name','product_id',$cart.product_id,'translate_product')}{/if}</b><div style="font-weight: bold; text-decoration: underline;">{$translate_product.name}</div></td>
<td style="text-align: right;">(<a href="?_page=product:details&amp;id={$cart.product_id}">{$cart.sku}</a>)</td>
<td style="width: 5%; text-align: right;">
{if $cart.attribute_popup != ''}
<div id="attr_panell_1_{$cart.id}" style="display:none">
<a href="#" onclick=" new Effect.Fade('attr_panel_1_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Fade('attr_panell_1_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Appear('attr_panel_2_{$cart.id}',{literal}{duration: .5}{/literal});
new Effect.Appear('attr_panell_2_{$cart.id}',{literal}{duration: .5}{/literal});
return false;">
<img src="themes/{$THEME_NAME}/images/icons/edit_16.gif" alt="Details" width="16" height="16" style="border: 0px;"/>
</a>
</div>
<div id="attr_panell_2_{$cart.id}" >
<a href="#" onclick=" new Effect.Fade('attr_panel_2_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Fade('attr_panell_2_{$cart.id}',{literal}{duration: 0}{/literal});
new Effect.Appear('attr_panel_1_{$cart.id}',{literal}{duration: .5}{/literal});
new Effect.Appear('attr_panell_1_{$cart.id}',{literal}{duration: .5}{/literal});
return false;">
<img src="themes/{$THEME_NAME}/images/icons/edit_16.gif" alt="Details" width="16" height="16" style="border: 0px;"/>
</a>
</div>
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
{if $cart.range != ''}
{$cart.range}
{else}
{$list->menu_staticlist('pricetype','','',$cart.price_type,'form_menu')}
{/if}
</td>
</tr>
<tr>
<td>
{if $cart.price_type == "1"}
{$list->format_currency_num($cart.price_base,$record.actual_billed_currency_id)}
{$list->menu_staticlist('recur_schedule','','',$cart.recurring_schedule,'form_menu')}
+
{$list->format_currency_num($cart.price_setup,$record.actual_billed_currency_id)}
{t}Setup{/t}
{/if}
</td>
</tr>
{if $record.type != '1' && $cart.service_id > 0}
<tr>
<td>{translate module=cart service=$cart.service_id}service_upgrade{/translate}</td>
</tr>
{/if}
{if $cart.item_type == '1'}
{if $cart.domain_type == 'ns_transfer'}
<tr>
<td>{translate module=cart}host_type_domain{/translate} - <u>{$cart.domain_name}. {$cart.domain_tld}</u></td>
</tr>
{/if}
{if $cart.domain_type == 'ip'}
<tr>
<td>{translate module=cart}host_type_ip{/translate}</td>
</tr>
{/if}
{/if}
</table>
</td>
<td style="width: 30%;" class="row1" valign="top">
<div id="attr_panel_1_{$cart.id}" style="display:none">{$cart.attribute_popup}</div>
<div id="attr_panel_2_{$cart.id}">
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="row1">
<tr>
<td style="width: 70%;">{t}Base Price{/t}</td>
<td style="width: 30%; text-align: right;">
<div id="def_base_price_{$cart.id}">{$list->format_currency($cart.price_base,$record.billed_currency_id)}</div>
<div id="base_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td>{t}Setup Price{/t}</td>
<td style="width: 30%; text-align: right;">
<div id="def_setup_price_{$cart.id}">{$list->format_currency($cart.price_setup,$record.billed_currency_id)}</div>
<div id="setup_price_{$cart.id}"></div>
</td>
</tr>
<tr>
<td>{t}Quantity{/t}</td>
<td style="width: 30%; text-align: right;">{$cart.quantity}</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
{/if}
{/foreach}
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if}
{/if}
{else}
{$block->display('account:login')}
{/if}
<!-- custom tracking code -->
{$method->exe('invoice','custom_tracking')}
{/if}