2009-08-03 04:10:16 +00:00
|
|
|
{assign var=meth value=':'|explode:$VAR._page}
|
|
|
|
<!-- {$meth.0}:{$meth.1} -->
|
|
|
|
|
2008-11-26 22:50:40 +00:00
|
|
|
<!-- Display the form to collect the input values -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<form id="add" 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}</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
|
|
|
<td class="row1">
|
|
|
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
|
|
|
<tr valign="top">
|
|
|
|
<td style="width: 35%;">{osb f=tf field=account_id}</td>
|
|
|
|
<td style="width: 65%;">{osb f=autoselect module=account return=id field=invoice_account_id default=$VAR.invoice_account_id}</td>
|
|
|
|
</tr>
|
|
|
|
{if $list->is_installed('affiliate') == 1}
|
|
|
|
<tr valign="top">
|
|
|
|
<td style="width: 35%;">{osb f=tf field=affiliate_id}</td>
|
|
|
|
<td style="width: 65%;">{osb f=html_select_affiliate name='aid' default=$VAR.aid}</td>
|
|
|
|
</tr>
|
|
|
|
{/if}
|
|
|
|
{if $VAR.invoice_account_id}
|
|
|
|
<tr valign="top">
|
|
|
|
<td style="width: 35%;">{osb f=tf field=product_id}</td>
|
|
|
|
<td style="width: 65%;">{$list->menu('no','invoice_product_id','product','sku','','" onchange="showProduct(this.value)',true)}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td style="width: 65%;" class="row1">
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="body">
|
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<a href="javascript:addAdHoc();">{t}Add adhoc item to Invoice{/t}</a>
|
|
|
|
{if $list->is_installed('host_tld')}
|
|
|
|
| <a href="javascript:domainSearch();">{t}Add a Domain to Invoice{/t}</a>
|
|
|
|
<input type="hidden" name="domain_name" id="domain_name"/>
|
|
|
|
<input type="hidden" name="domain_tld" id="domain_tld"/>
|
|
|
|
{/if}
|
|
|
|
| <a href="javascript:showDiscount()">{t}Discount User{/t}</a>
|
|
|
|
| <a href="javascript:showCart()">{t}View Items{/t}</a>
|
|
|
|
| <a href="javascript:showCheckout()">{t}Finalise Invoice{/t}</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{else}
|
|
|
|
<tr valign="top">
|
|
|
|
<td> </td>
|
|
|
|
{include file='file:../core/view_td_submit.tpl'}
|
|
|
|
</tr>
|
|
|
|
{/if}
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2008-11-26 22:50:40 +00:00
|
|
|
</form>
|
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
{if $VAR.invoice_account_id}
|
|
|
|
<iframe name="iframe" id="iframe" style="border:0px; width:0px; height:0px;" scrolling="auto" allowtransparency="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
<!--
|
|
|
|
var account_id = '{$VAR.invoice_account_id}';
|
|
|
|
|
|
|
|
{literal}
|
|
|
|
function showCart() {
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'?_page=cart:admin_view&account_id='+account_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
function showCheckout() {
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'{/literal}{$SSL_URL}{literal}admin.php?_page=checkout:admin_checkout&account_id='+account_id+'&s='+SESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
function showProduct(product_id) {
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'?_page=product:admin_details&id='+product_id+'&account_id='+account_id);
|
|
|
|
}
|
2008-11-26 22:50:40 +00:00
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
function showDiscount() {
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'?_page=discount:add&discount_avail_account_id={/literal}{$VAR.invoice_account_id}{literal}');
|
|
|
|
}
|
2008-11-26 22:50:40 +00:00
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
function domainSearch() {
|
|
|
|
var domain = document.getElementById('domain_name').value;
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'?_page=host_tld:admin_search&domain='+domain+'&account_id='+account_id);
|
|
|
|
}
|
2008-11-26 22:50:40 +00:00
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
function addAdHoc() {
|
|
|
|
showIFrame('iframe',getPageWidth(600),500,'?_page=cart:ad_hoc&account_id='+account_id);
|
|
|
|
}
|
2008-11-26 22:50:40 +00:00
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
function domainUpdate() {
|
|
|
|
}
|
|
|
|
{/literal}
|
2008-11-26 22:50:40 +00:00
|
|
|
|
2009-08-03 04:10:16 +00:00
|
|
|
showCart();
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
{/if}
|