|
|
|
@ -9,8 +9,7 @@
|
|
|
|
|
[%PROCESS 'helpers/modal.tt' -%]
|
|
|
|
|
[%mf_helper = {
|
|
|
|
|
ajax_load => 1,
|
|
|
|
|
ajax_list_refresh => 'template',
|
|
|
|
|
}%]
|
|
|
|
|
}%]
|
|
|
|
|
[%modal_script( m = mf_helper )%]
|
|
|
|
|
|
|
|
|
|
[% site_config.title = c.loc('Invoices for [_1]', provider.name ) -%]
|
|
|
|
@ -85,8 +84,8 @@ function applyClientFilter(table,tr,contact_id){
|
|
|
|
|
{ name => 'contracts.status', title => c.loc('Status'), search => 1 },
|
|
|
|
|
];
|
|
|
|
|
helper.dt_buttons = [
|
|
|
|
|
{ name => c.loc('Generate invoice'), uri => 'javascript:void(0);', onclick => "fetch_into(\\'invoice_generate_form\\', \\'" _ c.uri_for_action('/invoice/invoice_generate', [ provider.id]) _ "\\',\\'item=invoice_generate&client_contract_id='+full.contracts_id+'\\',function(){modalFormScript();});void(0);", class => 'btn-small btn-primary', icon => 'icon-star' },
|
|
|
|
|
{ name => c.loc('Filter invoices'), uri=>'javascript:void(0);', onclick => "applyClientFilter(\\'\\',\$(this).closest(\\'tr\\'),'+full.id+');", class => 'btn-small btn-primary', icon => 'icon-glass', tooltip => 'Click twice to clear client filter.' },
|
|
|
|
|
{ name => c.loc('Generate invoice'), uri => 'javascript:void(0);', onclick => "fetch_into(\\'invoice_generate_form\\', \\'" _ c.uri_for_action('/invoice/invoice_generate', [ provider.id]) _ "\\',\\'item=invoice_generate&client_contract_id='+full.contracts_id+'\\',function(){modalFormScript();});void(0);", class => 'btn-small btn-primary', icon => 'icon-star' },
|
|
|
|
|
];
|
|
|
|
|
helper.identifier = 'provider_client_list_ajax';
|
|
|
|
|
helper.ajax_uri = c.uri_for_action( '/invoice/ajax_datatables_data', [ provider.id, 'provider_client_list' ] ) ;
|
|
|
|
@ -121,7 +120,8 @@ function applyClientFilter(table,tr,contact_id){
|
|
|
|
|
{ name => 'contract_balances.contract.contact.reseller.name'},
|
|
|
|
|
{ name => 'contract_balances.contract.contact.id', title => c.loc('Client'), search => 1},
|
|
|
|
|
{ name => 'contract_balances.contract.id', title => c.loc('Contract'), search => 1},
|
|
|
|
|
{ name => 'contract_balances.invoice_id', title => c.loc('Invoice #'), search => 1},
|
|
|
|
|
{ name => 'contract_balances.invoice_id', title => c.loc('Invoice Id'), search => 1},
|
|
|
|
|
{ name => 'contract_balances.invoice.serial', title => c.loc('Invoice #'), search => 1},
|
|
|
|
|
{ name => 'contract_balances.start', title => c.loc('Period Start'), search_from_epoch => 1, search_to_epoch => 1, search_use_datetime => 1 },
|
|
|
|
|
{ name => 'contract_balances.end', title => c.loc('Period End')},
|
|
|
|
|
{ name => 'contract_balances.cash_balance', title => c.loc('Cash balance')},
|
|
|
|
|