element('table', */ /* array('class' => 'item transaction detail', */ /* 'caption' => 'Transaction Detail', */ /* 'rows' => $rows, */ /* 'column_class' => array('field', 'value'))); */ /********************************************************************** * Transaction Info Box */ ?> 'function(ids) { if (ids != null)' . ' {' . // Set the customer id that will be returned with the form ' $("#customer-id").val(ids);' . // Get the customer name from the grid ' $("#payment_customer").html($("#"+$(this).attr("id"))' . ' .getCell(ids, "Customer-name"));' . // Replace that with just the text portion of the hyperlink ' $("#payment_customer").html("Receipt for "+ $("#payment_customer a").html());' . ' } }' ); /* $grid_setup['loadComplete'] = array */ /* ('--special' => */ /* 'function() { ' . */ /* //' $("#"+$(this).attr("id")).setSelection($("#customer-id").val());' . */ /* ' $(\'#customers-list-jqGrid\').setSelection($(\'#customer-id\').val());' . */ /* ' $("#"+$(this).attr("id")).setCaption("Hello");' . */ /* ' alert("Loaded");' . */ /* ' }' */ /* ); */ //pr($customer); //echo ('Get grid code
'); // Customer // Outstanding balance // Balance on each lease // Balance on personal account // Multiple fields for payments (cash, check, charge, etc) // How to apply (even split, oldest charges first, etc) ?> ' . "\n"; echo $this->element('customers', array('caption' => 'Select Customer', 'limit' => 7, 'grid_setup' => $grid_setup, )); echo ('

' . (isset($customer['Customer']['id']) ? 'Receipt for ' . $customer['Customer']['name'] : 'Please select customer') . '

' . "\n"); echo $form->create(null, array('id' => 'payment-form', 'url' => array('controller' => 'transactions', 'action' => 'postReceipt'))); /*************************************************** * Post data should look like this: * * data => Array * ( * [Transaction] => Array * ( * stamp => * through_date => * due_date => * comment => * ) * * [LedgerEntry] => Array * ( * [0] => Array * ( * name => * amount => * debit_ledger_id => * credit_ledger_id => * comment => * * [MonetarySource] => Array * ( * name => * monetary_type_id => * comment => * ) * * REVISIT: Reconciliations will be tricker. * ) * * ) * * ) * ***************************************************/ ?>
Payments
Add Another Payment

' . "\n"; echo 'Comment:
' . "\n"; echo $form->end('Post Payment'); //echo '
' . "\n"; // End of the dialog DIV ?> Clear Debug Output Create Payment */ ?>

Request

Response

Output