More changes. I just can't seem to come up with a solution that works that I like. The problem now, without invoice/receipt, is that one check cannot cleanly pay for two units.
git-svn-id: file:///svn-source/pmgr/branches/single_AR_20090622/site@182 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -344,30 +344,40 @@ class AppController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function jqGridDataOutputRecords(&$params, &$model, &$records) {
|
function jqGridDataOutputRecords(&$params, &$model, &$records) {
|
||||||
$model_alias = $model->alias;
|
$id_field = 'jqGrid_id';
|
||||||
$id = 'jqGrid_id';
|
|
||||||
|
|
||||||
foreach ($records AS $record) {
|
foreach ($records AS $record) {
|
||||||
echo " <row id='{$record[$id]}'>\n";
|
$this->jqGridDataOutputRecord($params, $model, $record,
|
||||||
foreach ($params['fields'] AS $field) {
|
$record[$id_field], $params['fields']);
|
||||||
if (preg_match("/\./", $field)) {
|
|
||||||
list($tbl, $col) = explode(".", $field);
|
|
||||||
$data = $record[$tbl][$col];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$data = $record[$model_alias][$field];
|
|
||||||
}
|
|
||||||
|
|
||||||
// be sure to put text data in CDATA
|
|
||||||
if (preg_match("/^\d*$/", $data))
|
|
||||||
echo " <cell>$data</cell>\n";
|
|
||||||
else
|
|
||||||
echo " <cell><![CDATA[$data]]></cell>\n";
|
|
||||||
}
|
|
||||||
echo " </row>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function jqGridDataOutputRecord(&$params, &$model, &$record, $id, $fields) {
|
||||||
|
echo " <row id='$id'>\n";
|
||||||
|
foreach ($fields AS $field) {
|
||||||
|
$this->jqGridDataOutputRecordField($params, $model, $record, $field);
|
||||||
|
}
|
||||||
|
echo " </row>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function jqGridDataOutputRecordField(&$params, &$model, &$record, $field) {
|
||||||
|
if (preg_match("/\./", $field)) {
|
||||||
|
list($tbl, $col) = explode(".", $field);
|
||||||
|
$data = $record[$tbl][$col];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data = $record[$model->alias][$field];
|
||||||
|
}
|
||||||
|
$this->jqGridDataOutputRecordCell($params, $model, $record, $field, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function jqGridDataOutputRecordCell(&$params, &$model, &$record, $field, $data) {
|
||||||
|
// be sure to put text data in CDATA
|
||||||
|
if (preg_match("/^\d*$/", $data))
|
||||||
|
echo " <cell>$data</cell>\n";
|
||||||
|
else
|
||||||
|
echo " <cell><![CDATA[$data]]></cell>\n";
|
||||||
|
}
|
||||||
|
|
||||||
function jqGridDataFinalize(&$params) {
|
function jqGridDataFinalize(&$params) {
|
||||||
if ($params['debug']) {
|
if ($params['debug']) {
|
||||||
$xml = ob_get_contents();
|
$xml = ob_get_contents();
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ class LedgerEntriesController extends AppController {
|
|||||||
* to jqGrid.
|
* to jqGrid.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function jqGridDataSetup(&$params) {
|
||||||
|
parent::jqGridDataSetup($params);
|
||||||
|
if (isset($params['custom']['ar_account'])) {
|
||||||
|
$params['custom']['account_id'] =
|
||||||
|
$this->LedgerEntry->DebitLedger->Account->accountReceivableAccountID();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function jqGridDataTables(&$params, &$model) {
|
function jqGridDataTables(&$params, &$model) {
|
||||||
$link =
|
$link =
|
||||||
array(// Models
|
array(// Models
|
||||||
@@ -87,6 +95,19 @@ class LedgerEntriesController extends AppController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($params['custom']['account_id'])) {
|
||||||
|
$account_id = $params['custom']['account_id'];
|
||||||
|
$link['Ledger'] =
|
||||||
|
array('fields' => array('id', 'sequence'),
|
||||||
|
'conditions' => ("Ledger.id = IF(DebitLedger.account_id = $account_id," .
|
||||||
|
" LedgerEntry.credit_ledger_id," .
|
||||||
|
" LedgerEntry.debit_ledger_id)"),
|
||||||
|
'Account' => array(
|
||||||
|
'fields' => array('id', 'name'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($params['custom']['reconcile_id'])) {
|
if (isset($params['custom']['reconcile_id'])) {
|
||||||
$ftype = $params['custom']['account_ftype'];
|
$ftype = $params['custom']['account_ftype'];
|
||||||
$ftype = $this->LedgerEntry->DebitLedger->Account->fundamentalOpposite($ftype);
|
$ftype = $this->LedgerEntry->DebitLedger->Account->fundamentalOpposite($ftype);
|
||||||
@@ -102,11 +123,14 @@ class LedgerEntriesController extends AppController {
|
|||||||
$ledger_id = (isset($params['custom']['ledger_id'])
|
$ledger_id = (isset($params['custom']['ledger_id'])
|
||||||
? $params['custom']['ledger_id']
|
? $params['custom']['ledger_id']
|
||||||
: null);
|
: null);
|
||||||
|
$account_id = (isset($params['custom']['account_id'])
|
||||||
|
? $params['custom']['account_id']
|
||||||
|
: null);
|
||||||
$account_type = (isset($params['custom']['account_type'])
|
$account_type = (isset($params['custom']['account_type'])
|
||||||
? $params['custom']['account_type']
|
? $params['custom']['account_type']
|
||||||
: null);
|
: null);
|
||||||
|
|
||||||
return $model->ledgerContextFields2($ledger_id, $account_type);
|
return $model->ledgerContextFields2($ledger_id, $account_id, $account_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
function jqGridDataConditions(&$params, &$model) {
|
function jqGridDataConditions(&$params, &$model) {
|
||||||
@@ -128,6 +152,13 @@ class LedgerEntriesController extends AppController {
|
|||||||
$conditions[] = array('Reconciliation.'.$ftype.'_ledger_entry_id' => $params['custom']['reconcile_id']);
|
$conditions[] = array('Reconciliation.'.$ftype.'_ledger_entry_id' => $params['custom']['reconcile_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($params['custom']['account_id'])) {
|
||||||
|
$conditions[] =
|
||||||
|
array('OR' =>
|
||||||
|
array(array('CreditAccount.id' => $params['custom']['account_id']),
|
||||||
|
array('DebitAccount.id' => $params['custom']['account_id'])));
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($params['custom']['customer_id'])) {
|
if (isset($params['custom']['customer_id'])) {
|
||||||
$conditions[] =
|
$conditions[] =
|
||||||
array('Customer.id' => $params['custom']['customer_id']);
|
array('Customer.id' => $params['custom']['customer_id']);
|
||||||
@@ -208,6 +239,32 @@ class LedgerEntriesController extends AppController {
|
|||||||
return $order;
|
return $order;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function jqGridRecordsPostProcess(&$params, &$model, &$records) {
|
||||||
|
parent::jqGridRecordsPostProcess($params, $model, $records);
|
||||||
|
|
||||||
|
$subtotal = 0;
|
||||||
|
foreach ($records AS &$record) {
|
||||||
|
$amount = (isset($record['LedgerEntry']['balance'])
|
||||||
|
? $record['LedgerEntry']['balance']
|
||||||
|
: $record['LedgerEntry']['amount']);
|
||||||
|
$record['LedgerEntry']['subtotal'] = ($subtotal += $amount);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
// Experiment to minimize columns by putting the monetary source
|
||||||
|
// as the Account, when available
|
||||||
|
if ($record['MonetarySource']['name'])
|
||||||
|
$record['Account']['name'] = $record['MonetarySource']['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function jqGridDataOutputRecordCell(&$params, &$model, &$record, $field, $data) {
|
||||||
|
/* if ($field === 'CreditAccount.name') { */
|
||||||
|
/* $data .= '-OK'; */
|
||||||
|
/* } */
|
||||||
|
|
||||||
|
parent::jqGridDataOutputRecordCell($params, $model, $record, $field, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
@@ -247,6 +304,7 @@ class LedgerEntriesController extends AppController {
|
|||||||
|
|
||||||
'conditions' => array('LedgerEntry.id' => $id),
|
'conditions' => array('LedgerEntry.id' => $id),
|
||||||
));
|
));
|
||||||
|
pr($entry);
|
||||||
|
|
||||||
// Because 'DebitLedger' and 'CreditLedger' both relate to 'Account',
|
// Because 'DebitLedger' and 'CreditLedger' both relate to 'Account',
|
||||||
// CakePHP will not include them in the LedgerEntry->find (or so it
|
// CakePHP will not include them in the LedgerEntry->find (or so it
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class LedgerEntry extends AppModel {
|
|||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ledgerContextFields2($ledger_id = null, $account_type = null) {
|
function ledgerContextFields2($ledger_id = null, $account_id = null, $account_type = null) {
|
||||||
$fields = array('id', 'name', 'comment', 'amount');
|
$fields = array('id', 'name', 'comment', 'amount');
|
||||||
|
|
||||||
if (isset($ledger_id)) {
|
if (isset($ledger_id)) {
|
||||||
@@ -95,20 +95,29 @@ class LedgerEntry extends AppModel {
|
|||||||
$fields[] = ("IF(LedgerEntry.credit_ledger_id = $ledger_id," .
|
$fields[] = ("IF(LedgerEntry.credit_ledger_id = $ledger_id," .
|
||||||
" SUM(LedgerEntry.amount), NULL) AS credit");
|
" SUM(LedgerEntry.amount), NULL) AS credit");
|
||||||
|
|
||||||
if (isset($account_type)) {
|
if (isset($account_id) || isset($account_type)) {
|
||||||
if (in_array($account_type, array('ASSET', 'EXPENSE')))
|
$Account = new Account();
|
||||||
$ledger_type = 'debit';
|
$account_ftype = $Account->fundamentalType($account_id ? $account_id : $account_type);
|
||||||
else
|
$fields[] = ("(IF(LedgerEntry.{$account_ftype}_ledger_id = $ledger_id," .
|
||||||
$ledger_type = 'credit';
|
|
||||||
|
|
||||||
$fields[] = ("(IF(LedgerEntry.{$ledger_type}_ledger_id = $ledger_id," .
|
|
||||||
" 1, -1) * SUM(LedgerEntry.amount)) AS balance");
|
" 1, -1) * SUM(LedgerEntry.amount)) AS balance");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif (isset($account_id)) {
|
||||||
|
$fields[] = ("IF(DebitLedger.account_id = $account_id," .
|
||||||
|
" SUM(LedgerEntry.amount), NULL) AS debit");
|
||||||
|
$fields[] = ("IF(CreditLedger.account_id = $account_id," .
|
||||||
|
" SUM(LedgerEntry.amount), NULL) AS credit");
|
||||||
|
|
||||||
|
$Account = new Account();
|
||||||
|
$account_ftype = ucfirst($Account->fundamentalType($account_id));
|
||||||
|
$fields[] = ("(IF({$account_ftype}Ledger.account_id = $account_id," .
|
||||||
|
" 1, -1) * SUM(LedgerEntry.amount)) AS balance");
|
||||||
|
}
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function ledgerContextConditions($ledger_id, $account_type) {
|
function ledgerContextConditions($ledger_id, $account_type) {
|
||||||
if (isset($ledger_id)) {
|
if (isset($ledger_id)) {
|
||||||
return array
|
return array
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ echo $this->element('leases',
|
|||||||
echo $this->element('ledger_entries',
|
echo $this->element('ledger_entries',
|
||||||
array('caption' => 'Account',
|
array('caption' => 'Account',
|
||||||
'customer_id' => $customer['Customer']['id'],
|
'customer_id' => $customer['Customer']['id'],
|
||||||
|
'ar_account' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -189,10 +189,14 @@ $jqGrid_setup = array_merge
|
|||||||
|
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
currencyFormatter = function(el, cellval, opts) {
|
currencyFormatter = function(el, cellval, opts) {
|
||||||
|
if (!cellval)
|
||||||
|
return;
|
||||||
$(el).html(fmtCurrency(cellval));
|
$(el).html(fmtCurrency(cellval));
|
||||||
}
|
}
|
||||||
|
|
||||||
idFormatter = function(el, cellval, opts) {
|
idFormatter = function(el, cellval, opts) {
|
||||||
|
if (!cellval)
|
||||||
|
return;
|
||||||
$(el).html('#'+cellval);
|
$(el).html('#'+cellval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
<?php /* -*- mode:PHP -*- */
|
<?php /* -*- mode:PHP -*- */
|
||||||
|
|
||||||
|
if (isset($account_ftype) || isset($ledger_id) || isset($account_id) || isset($ar_account)) {
|
||||||
|
$single_account = true;
|
||||||
|
} else {
|
||||||
|
$single_account = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($ledger_id) || isset($account_id) || isset($ar_account)) {
|
||||||
|
$single_amount = false;
|
||||||
|
} else {
|
||||||
|
$single_amount = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($reconcile_id)) {
|
||||||
|
$applied_amount = true;
|
||||||
|
} else {
|
||||||
|
$applied_amount = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($account_ftype)) {
|
||||||
|
$subtotal_amount = false;
|
||||||
|
} else {
|
||||||
|
$subtotal_amount = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Define the table columns
|
// Define the table columns
|
||||||
$cols = array();
|
$cols = array();
|
||||||
if (0) {
|
if (0) {
|
||||||
@@ -8,36 +33,44 @@ if (isset($notxgroup))
|
|||||||
else
|
else
|
||||||
$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
|
$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
|
||||||
} else {
|
} else {
|
||||||
$notxgroup = true;
|
$notxgroup = false;
|
||||||
$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
|
$cols['Transaction'] = array('index' => 'Transaction.id', 'formatter' => 'id');
|
||||||
$cols['Entry'] = array('index' => 'LedgerEntry.id', 'formatter' => 'id');
|
$cols['Entry'] = array('index' => 'LedgerEntry.id', 'formatter' => 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
|
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
|
||||||
if (isset($account_ftype) || isset($ledger_id)) {
|
|
||||||
$cols['Account'] = array('index' => 'Account.name', 'formatter' => 'longname');
|
if ($single_account) {
|
||||||
|
$cols['Account'] = array('index' => 'Account.name', 'formatter' => 'name');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$cols['Debit Account'] = array('index' => 'DebitAccount.name', 'formatter' => 'longname');
|
$cols['Debit Account'] = array('index' => 'DebitAccount.name', 'formatter' => 'name');
|
||||||
$cols['Credit Account'] = array('index' => 'CreditAccount.name', 'formatter' => 'longname');
|
$cols['Credit Account'] = array('index' => 'CreditAccount.name', 'formatter' => 'name');
|
||||||
}
|
}
|
||||||
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'name');
|
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname');
|
||||||
$cols['Lease'] = array('index' => 'Lease.number', 'formatter' => 'id');
|
$cols['Lease'] = array('index' => 'Lease.number', 'formatter' => 'id');
|
||||||
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'name');
|
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'name');
|
||||||
$cols['Source'] = array('index' => 'MonetarySource.name', 'formatter' => 'name');
|
$cols['Source'] = array('index' => 'MonetarySource.name', 'formatter' => 'name');
|
||||||
$cols['Comment'] = array('index' => 'LedgerEntry.comment', 'formatter' => 'comment', 'width'=>150);
|
$cols['Comment'] = array('index' => 'LedgerEntry.comment', 'formatter' => 'comment', 'width'=>150);
|
||||||
if (isset($ledger_id)) {
|
|
||||||
|
if ($single_amount) {
|
||||||
|
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');
|
||||||
|
}
|
||||||
|
else {
|
||||||
$cols['Debit'] = array('index' => 'debit', 'formatter' => 'currency');
|
$cols['Debit'] = array('index' => 'debit', 'formatter' => 'currency');
|
||||||
$cols['Credit'] = array('index' => 'credit', 'formatter' => 'currency');
|
$cols['Credit'] = array('index' => 'credit', 'formatter' => 'currency');
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');
|
if ($applied_amount) {
|
||||||
}
|
|
||||||
if (isset($reconcile_id)) {
|
|
||||||
$cols['Applied'] = array('index' => "Reconciliation.amount", 'formatter' => 'currency');
|
$cols['Applied'] = array('index' => "Reconciliation.amount", 'formatter' => 'currency');
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_post_data = compact('ledger_id', 'account_type', 'account_ftype',
|
if ($subtotal_amount) {
|
||||||
|
$cols['Sub-Total'] = array('index' => 'subtotal', 'formatter' => 'currency', 'sortable' => false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$custom_post_data = compact('ledger_id', 'account_id', 'ar_account',
|
||||||
|
'account_type', 'account_ftype',
|
||||||
'customer_id', 'lease_id', 'transaction_id', 'notxgroup');
|
'customer_id', 'lease_id', 'transaction_id', 'notxgroup');
|
||||||
|
|
||||||
$jqGrid_options = array('jqGridColumns' => $cols,
|
$jqGrid_options = array('jqGridColumns' => $cols,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if (isset($lease['Lease']))
|
|||||||
$rows = array(array('ID', $lease['id']),
|
$rows = array(array('ID', $lease['id']),
|
||||||
array('Number', $lease['number']),
|
array('Number', $lease['number']),
|
||||||
array('Lease Type', $lease_type['name']),
|
array('Lease Type', $lease_type['name']),
|
||||||
array('Unit', $html->link($unit['id'],
|
array('Unit', $html->link($unit['name'],
|
||||||
array('controller' => 'units',
|
array('controller' => 'units',
|
||||||
'action' => 'view',
|
'action' => 'view',
|
||||||
$unit['id']))),
|
$unit['id']))),
|
||||||
@@ -81,6 +81,7 @@ echo '<div CLASS="detail supporting">' . "\n";
|
|||||||
echo $this->element('ledger_entries',
|
echo $this->element('ledger_entries',
|
||||||
array('caption' => 'Account',
|
array('caption' => 'Account',
|
||||||
'lease_id' => $lease['id'],
|
'lease_id' => $lease['id'],
|
||||||
|
'ar_account' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,18 @@ $rows = array(array('ID', $entry['id']),
|
|||||||
'action' => 'view',
|
'action' => 'view',
|
||||||
$transaction['id']))),
|
$transaction['id']))),
|
||||||
array('Timestamp', FormatHelper::datetime($transaction['stamp'])),
|
array('Timestamp', FormatHelper::datetime($transaction['stamp'])),
|
||||||
array('Customer', $html->link($customer['name'],
|
array('Customer', (isset($customer['name'])
|
||||||
array('controller' => 'customers',
|
? $html->link($customer['name'],
|
||||||
'action' => 'view',
|
array('controller' => 'customers',
|
||||||
$customer['id']))),
|
'action' => 'view',
|
||||||
array('Lease', $html->link('#'.$lease['id'],
|
$customer['id']))
|
||||||
array('controller' => 'leases',
|
: null)),
|
||||||
'action' => 'view',
|
array('Lease', (isset($lease['id'])
|
||||||
$lease['id']))),
|
? $html->link('#'.$lease['id'],
|
||||||
|
array('controller' => 'leases',
|
||||||
|
'action' => 'view',
|
||||||
|
$lease['id']))
|
||||||
|
: null)),
|
||||||
array('Monetary Source', (isset($source['name'])
|
array('Monetary Source', (isset($source['name'])
|
||||||
? $html->link($source['name'],
|
? $html->link($source['name'],
|
||||||
array('controller' => 'monetary_sources',
|
array('controller' => 'monetary_sources',
|
||||||
@@ -107,26 +111,25 @@ echo '<div CLASS="detail supporting">' . "\n";
|
|||||||
* Reconciliation Ledger Entries
|
* Reconciliation Ledger Entries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo $this->element('ledger_entries',
|
if ($debit_ledger['Account']['trackable']) {
|
||||||
array('caption' => "Debit Applications",
|
echo $this->element('ledger_entries',
|
||||||
'grid_div_id' => 'debit_reconciliation_ledger_entries',
|
array('caption' => "Payments Received",
|
||||||
//'ledger_id' => $debit_ledger['id'],
|
'grid_div_id' => 'debit_reconciliation_ledger_entries',
|
||||||
//'account_type' => $debit_ledger['Account']['type'],
|
'account_ftype' => 'debit',
|
||||||
'account_ftype' => 'debit',
|
'reconcile_id' => $entry['id'],
|
||||||
'reconcile_id' => $entry['id'],
|
//'ledger_entries' => $reconciled['debit']['entry'],
|
||||||
'ledger_entries' => $reconciled['debit']['entry'],
|
));
|
||||||
));
|
}
|
||||||
|
|
||||||
echo $this->element('ledger_entries',
|
if ($credit_ledger['Account']['trackable']) {
|
||||||
array('caption' => "Credit Applications",
|
echo $this->element('ledger_entries',
|
||||||
'grid_div_id' => 'credit_reconciliation_ledger_entries',
|
array('caption' => "Charges Paid",
|
||||||
//'ledger_id' => $credit_ledger['id'],
|
'grid_div_id' => 'credit_reconciliation_ledger_entries',
|
||||||
//'account_type' => $credit_ledger['Account']['type'],
|
'account_ftype' => 'credit',
|
||||||
//'account_ftype' => 'debit', // Looking for debits to match this credit
|
'reconcile_id' => $entry['id'],
|
||||||
'account_ftype' => 'credit',
|
//'ledger_entries' => $reconciled['credit']['entry'],
|
||||||
'reconcile_id' => $entry['id'],
|
));
|
||||||
'ledger_entries' => $reconciled['credit']['entry'],
|
}
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
/* End "detail supporting" div */
|
/* End "detail supporting" div */
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ echo $this->element('ledger_entries',
|
|||||||
array('caption' => ('Current Lease Account (' .
|
array('caption' => ('Current Lease Account (' .
|
||||||
$unit['CurrentLease']['Customer']['name']
|
$unit['CurrentLease']['Customer']['name']
|
||||||
. ')'),
|
. ')'),
|
||||||
|
'ar_account' => true,
|
||||||
'lease_id' => $unit['CurrentLease']['id'],
|
'lease_id' => $unit['CurrentLease']['id'],
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ tr.evnrow { background: #f4f4f4; }
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
table.detail { width : 60%;
|
table.detail { width : 60%;
|
||||||
float: left; }
|
float : left; }
|
||||||
table.detail td.field { width: 10em; }
|
table.detail td.field { width : 10em; }
|
||||||
|
|
||||||
|
table.item.detail td.value { white-space : normal; }
|
||||||
|
|
||||||
div.detail.supporting { clear : both;
|
div.detail.supporting { clear : both;
|
||||||
padding-top: 1.5em; }
|
padding-top: 1.5em; }
|
||||||
|
|||||||
Reference in New Issue
Block a user