$InvoiceTypesObj = new GlmDataInvoiceTypes( $this->wpdb, $this->config );
$invoiceTypes = $InvoiceTypesObj->getList();
$invoiceTypes = $InvoiceTypesObj->sortParentChild($invoiceTypes);
- echo '<pre>$invoiceTypes: ' . print_r( $invoiceTypes, true ) . '</pre>';
+ // echo '<pre>$invoiceTypes: ' . print_r( $invoiceTypes, true ) . '</pre>';
if ( isset( $invoiceTypes ) ) {
foreach ( $invoiceTypes as $invoiceType ) {
$invTypes[$invoiceType['id']] = array(
break;
case 'insert':
+ // Set transaction_time to current time.
+ $_REQUEST['transaction_time'] = date('Y-m-d H:i:s');
+ echo '<pre>' . print_r( $_REQUEST, true ) . '</pre>';
$invoices = $this->insertEntry();
$this->transactionID = $invoices['fieldData']['id'];
$view = 'editInvoice';
<td>
<select name="line_item_type">
<option value="">Select Invoice Type</option>
+ {$parent = 0}
{foreach $invoiceTypes as $inv}
- {if $inv.parent.value == 0 && $inv.amount != '0.00'}
+ {if $inv.parent.value == 0}
<optgroup label="{$inv.name}">
{/if}
- {if $inv.amount}
+ {if $inv.amount != '0.00'}
<option value="{$inv.id}">{$inv.name}</option>
{/if}
- {if $inv.parent.value == 0 && $inv.amount != '0.00'}
+ {if $inv.parent.value == 0}
</optgroup>
{/if}
{/foreach}
'<div class="glm-columns glm-small-1">1</div>' +
'<div class="glm-columns glm-small-4">$' + selectedLineItem.amount + '</div>' +
'</div>');
+ } else {
+ // Code here to add to quantity.
}
dialog.dialog( 'close' );
}