Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -1,101 +1,12 @@
{$method->exe("setup_invoice","search_show")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{if $results == 1}
{translate results=$results}search_result_count{/translate}
{else}
{translate results=$results}search_results_count{/translate}
{/if}
<BR>
{literal}
<script language="JavaScript">
<!-- START
var module = 'setup_invoice';
{/literal}
{if $VAR._print == TRUE}
var p = '&_escape=y&_print=y';
{else}
var p = '';
{/if}{literal}
var IMAGE = '{/literal}{$NONSSL_IMAGE}{literal}';
var order = '{/literal}{$order}{literal}';
var sort1 = '{/literal}{$sort}{literal}';
var search_id = '{/literal}{$search_id}{literal}';
var page = {/literal}{$page}{literal};
var pages = '{/literal}{$pages}{literal}';
var results = '{/literal}{$results}{literal}';
var limit = '{/literal}{$limit}{literal}';
record_arr = new Array ({/literal}{$limit}{literal});
var i = 0;
// END -->
</script>
<SCRIPT SRC="themes/{/literal}{$THEME_NAME}{literal}/search.js"></SCRIPT>
{/literal}
<!-- SHOW THE SEARCH NAVIGATION MENU -->
<center><script language="JavaScript">document.write(search_nav_top());</script></center>
<!-- BEGIN THE RESULTS CONTENT AREA -->
<div id="search_results" onKeyPress="key_handler(event);">
<table id="main1" width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<form id="form1" name="form1" method="post" action="">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<!-- DISPLAY THE SEARCH HEADING -->
<tr valign="middle" align="center" class="table_heading">
<td width="5%" class="table_heading">&nbsp;</td>
<td width="20%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=setup_invoice}field_id{/translate}{literal}','id'));
</script>
{/literal}
</td>
<td width="55%" class="table_heading">
{literal}
<script language="JavaScript">
document.write(search_heading('{/literal}{translate module=setup_invoice}field_news{/translate}{literal}','site_name'));
</script>
{/literal}
</td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$setup_invoice item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=setup_invoice:view&id={$record.id},';" onMouseOver="row_mouseover('{$record.id}', 'row_mouse_over_select', 'row_mouse_over');" onMouseOut="row_mouseout('{$record.id}', '{$record._C}', 'row_select');" class="{$record._C}">
<td align="center">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td>{$record.id}</td>
<td>{$record.news}</td>
</tr>
{literal}
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 0, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
{/literal} {/foreach}
<!-- END OF RESULT LOOP -->
</table>
</td>
</tr>
</form>
</table>
{if $VAR._print != TRUE}<br>
<center>
<input type="submit" name="Submit" value="{translate}view_edit{/translate}" onClick="mass_do('', module+':view', limit, module);" class="form_button">
<br>
</center>
{include file='file:../core/search_show_pre.tpl'}
{$method->exe_noauth($meth.0,'tpl_search_show',$search_show)}
{include file='file:../core/search_show_post-1.tpl'}
{include file='file:../core/search_show_post-2.tpl'}
{/if}
{/if}
</div>

View File

@@ -1,189 +1,102 @@
{ $method->exe("setup_invoice","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{literal}
<!-- Define the update delete function -->
<script language="JavaScript">
<!-- START
var module = 'setup_invoice';
var locations = '{/literal}{$VAR.module_id}{literal}';
if (locations != "")
{
refresh(0,'#'+locations)
}
// Mass update, view, and delete controller
function delete_record(id,ids)
{
temp = window.confirm("{/literal}{translate}alert_delete{/translate}{literal}");
if(temp == false) return;
var replace_id = id + ",";
ids = ids.replace(replace_id, '');
if(ids == '') {
var url = '?_page=core:search&module=' + module + '&do[]=' + module + ':delete&delete_id=' + id + COOKIE_URL;
window.location = url;
return;
} else {
var page = 'view&id=' +ids;
}
var doit = 'delete';
var url = '?_page='+ module +':'+ page +'&do[]=' + module + ':' + doit + '&delete_id=' + id + COOKIE_URL;
window.location = url;
}
// END -->
</script>
{/literal}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
<!-- Loop through each record -->
{foreach from=$setup_invoice item=setup_invoice} <a name="{$setup_invoice.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{/if}
<!-- Display each record -->
<form name="setup_invoice_update" method="post" action="">
<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 width="65%" class="table_heading">
<div align="center">
{translate module=setup_invoice}
title_view
{/translate}
</div>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_bill_to_company
{/translate}
</td>
<td width="50%">
{ $list->bool("setup_invoice_bill_to_company", $setup_invoice.bill_to_company, "form_menu") }
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_invoice_currency
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_invoice_currency" value="{$setup_invoice.invoice_currency}" size="32">
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_invoice_decimals
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_invoice_decimals" value="{$setup_invoice.invoice_decimals}" size="32">
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_items_summary_max
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_items_summary_max" value="{$setup_invoice.items_summary_max}" size="32">
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_contact_us_url
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_contact_us_url" value="{$setup_invoice.contact_us_url}" size="32">
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_contact_us_phone
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_contact_us_phone" value="{$setup_invoice.contact_us_phone}" size="32">
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_news
{/translate}
</td>
<td width="50%">
<textarea name="setup_invoice_news" cols="50" rows="4" wrap="Yes" >{$setup_invoice.news}</textarea>
</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">
{translate module=setup_invoice}
field_page_type
{/translate}
</td>
<td width="50%">
<input type="text" name="setup_invoice_page_type" value="{$setup_invoice.page_type}" size="32">
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="50%">{translate module=setup_invoice} field_invoice_delivery {/translate} </td>
<td width="50%"><select name="setup_invoice_invoice_delivery">
<option value="0" {if $setup_invoice.invoice_delivery =="0"}selected{/if}>None</option>
<option value="1" {if $setup_invoice.invoice_delivery =="1"}selected{/if}>E-mail</option>
<option value="2" {if $setup_invoice.invoice_delivery =="2"}selected{/if}>Print</option>
</select>
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=setup_invoice} field_invoice_show_itemized{/translate} </td>
<td>{ $list->bool("setup_invoice_invoice_show_itemized", $setup_invoice.invoice_show_itemized, "form_menu") } </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=setup_invoice} field_invoice_pdf_plugin{/translate} </td>
<td>{html_menu_files path=invoice_pdf field=setup_invoice_invoice_pdf_plugin default=$setup_invoice.invoice_pdf_plugin} </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=setup_invoice} field_invoice_show_service_dates{/translate} </td>
<td>{ $list->bool("setup_invoice_invoice_show_service_dates", $setup_invoice.invoice_show_service_dates, "form_menu") } </td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{translate module=setup_invoice} field_advance_notice{/translate} </td>
<td><input name="setup_invoice_advance_notice" type="text" value="{$setup_invoice.advance_notice}" size="3" maxlength="2"></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td><input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button"></td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="setup_invoice:view">
<input type="hidden" name="setup_invoice_id" value="{$setup_invoice.id}">
<input type="hidden" name="do[]" value="setup_invoice:update">
<input type="hidden" name="id" value="{$VAR.id}">
</form>
{/foreach}
<!-- Display each record -->
<form id="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}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=bill_to_company}</td>
<td width="50%">{$list->bool('setup_invoice_bill_to_company',$record.bill_to_company)}</td>
</tr>
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=invoice_currency}</td>
<td width="50%"><input type="text" name="setup_invoice_invoice_currency" value="{$record.invoice_currency}" size="32"/></td>
</tr>
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=invoice_decimals}</td>
<td width="50%"><input type="text" name="setup_invoice_invoice_decimals" value="{$record.invoice_decimals}" size="32"/></td>
</tr>
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=items_summary_max}</td>
<td width="50%"><input type="text" name="setup_invoice_items_summary_max" value="{$record.items_summary_max}" size="32"/></td>
</tr>
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=news}</td>
<td width="50%"><textarea name="setup_invoice_news" cols="50" rows="4">{$record.news}</textarea></td>
</tr>
<tr class="row0" valign="top">
<td width="50%">{osb f=tf field=page_type}</td>
<td>{osb f=html_menu_files name=setup_invoice_page_type path=invoice_pagetype default=$record.page_type}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td width="50%">{osb f=tf field=invoice_delivery}</td>
<td width="50%">
<select name="setup_invoice_invoice_delivery">
<option value="0" {if $record.invoice_delivery =="0"}selected{/if}>None</option>
<option value="1" {if $record.invoice_delivery =="1"}selected{/if}>E-mail</option>
<option value="2" {if $record.invoice_delivery =="2"}selected{/if}>Print</option>
</select>
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{osb f=tf field=invoice_show_itemized}</td>
<td>{$list->bool('setup_invoice_invoice_show_itemized',$record.invoice_show_itemized)}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{osb f=tf field=invoice_pdf_plugin}</td>
<td>{osb f=html_menu_files name=setup_invoice_invoice_pdf_plugin path=invoice_pdf default=$record.invoice_pdf_plugin}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{osb f=tf field=invoice_show_service_dates}</td>
<td>{$list->bool('setup_invoice_invoice_show_service_dates',$record.invoice_show_service_dates)}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{osb f=tf field=invoice_advance_gen}</td>
<td><input name="setup_invoice_invoice_advance_gen" type="text" value="{$record.invoice_advance_gen}" size="3" maxlength="2"/></td>
</tr>
<tr class="row1" valign="middle" align="left">
<td>{osb f=tf field=advance_notice}</td>
<td><input name="setup_invoice_advance_notice" type="text" value="{$record.advance_notice}" size="3" maxlength="2"/></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="6" cellpadding="1" class="row1">
<tr class="row1">
{include file='file:../core/view_td_submit.tpl'}
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{include file='file:../core/view_post.tpl'}
</form>
{/if}