case 'list':
default:
- // echo '<pre>'.print_r( $_REQUEST, true ).'</pre>';
+ // echo '<pre>'.print_r( $_REQUEST, true ).'</pre>';
+
// Need to get the accounts
$Accounts = new GlmDataAccounts( $this->wpdb, $this->config );
$accounts = $Accounts->getSimpleAccountList();
{/foreach}
]
+ {* accounts for the search *}
$('#account_name').autocomplete({
source: availableAccounts,
select: function( event, ui ){
},
});
+ {* Invoices for the search *}
var availableInvoices = [
{foreach $invoiceList as $m}
{ label: "{$m.id} ( {$m.member_name|unescape:'html'|replace:'"':''} )", value: "{$m.id|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
source: availableInvoices,
select: function( event, ui ){
$('#member-invoice-id').val( ui.item.id );
+ $('#invoice_id').val( ui.item.id );
+ // console.log( 'selected invoice id: ', ui.item.id );
$('#searchForm').submit();
},
change: function( event, ui) {
if( ui.item == null ) {
$('#member-invoice-id').val( '' );
+ // console.log( 'selected invoice id: ', ui );
$('#searchForm').submit();
}
},