Last active
August 29, 2015 14:05
-
-
Save jalcine/e053098415cf294a5a19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** The '<?=' is the same as '<?php echo'. A shortcut. */ | |
$record_text = __('Viewing {0} - {1} of {2}'); | |
$invoices_url = url_for('account_billing/getInvoices') . '?year='; | |
$vat_entries = <<<VAT_INFO | |
{name:'invoice_amount', index:'invoice_amount', width:150, sortable:false, resizable:false, align:'right'}, | |
{name:'vat_amount', index:'vat_amount', width:150, sortable:false, resizable:false, align:'right'}, | |
VAT_INFO; | |
?> | |
<script type='text/javascript'> | |
function showgrid() { | |
/* jqGrid */ | |
var recordtext = '<?= $record_text ?>'; | |
var selectYear = $('#accountBillingYearSelect').val(); | |
initGrid( $('#InvoiceList'), | |
"<?= $invoices_url ?>"+ selectYear, | |
[ {name:'invoice_date', index:'invoice_date', width:150, sortable:false, resizable:false, align:'center'}, | |
{name:'invoice_no', index:'invoice_no', width:150, sortable:false, resizable:false, align:'center'}, | |
{name:'invoice_type', index:'invoice_type', width:150, sortable:false, resizable:false, align:'left'}, | |
<?= ($show_vat) ? $vat_text : '' ?> | |
{name:'total', index:'total', width:150, sortable:false, resizable:false, align:'right'}, | |
{name:'due_date', index:'due_date', width:150, sortable:false, resizable:false, align:'center'}, | |
{name:'status', index:'status', width:150, sortable:false, resizable:false, align:'center'} | |
<?= ($status == "Unpaid") ? '{name: 'card_pay', index: 'card_pay', width:150 }' : '' ?> | |
], | |
['<?= __('Invoice Date') ?>', | |
'<?= __('Invoice Number') ?>', | |
'<?= __('Invoice Type') ?>', | |
<? if ($show_vat) : ?> | |
'<?= __('Amount') ?>', | |
<?= ($sf_user->getNid() == BL_Network::AU_NID) ? __('GST Amount') : __('VAT Amount') ?>', | |
<?php endif;?> | |
<?php endif; ?> | |
'<?=__('Total') ?>', | |
'<?= __('Due Date') ?>', | |
'<?= __('Status') ?>'], | |
'<?= sfConfig::get('app_cpi_cookie_name') ?>', | |
recordtext | |
); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment