Layout manipulation to the collected page.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@337 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-15 07:13:41 +00:00
parent b1914f7cca
commit 8a36b441de
2 changed files with 43 additions and 14 deletions

View File

@@ -41,6 +41,8 @@ function updateEntriesGrid() {
$('#collected-entries-jqGrid')
.setGridParam({ page: 1 })
.trigger("reloadGrid");
//$('#collected-entries .HeaderButton').click();
}
@@ -75,22 +77,34 @@ echo '</div>' . "\n";
* User Configuration
*/
echo $form->create(null, array('id' => 'receipt-form',
//'onsubmit' => 'updateEntriesGrid(); return false',
'url' => array('controller' => 'transactions',
'action' => 'postReceipt')));
echo $form->create(null, array('id' => 'collected-form',
'onsubmit' => 'return false',
'url' => null));
echo $form->input("id",
array('id' => 'account-id',
'type' => 'hidden',
'value' => 0));
/* echo '<fieldset class="account collected entry">'; */
/* echo ' <legend>Payment Account</legend>'; */
/* echo $form->input('Tx.account_id', */
/* array(//'label' => 'Payment<BR>Account', */
/* 'label' => false, */
/* 'type' => 'select', */
/* 'multiple' => 'checkbox', */
/* 'options' => $paymentAccounts, */
/* 'selected' => array_keys($defaultAccounts), */
/* ) */
/* ); */
/* echo '</fieldset>'; */
echo $this->element('form_table',
array('class' => "item account collected entry",
//'with_name_after' => ':',
'field_prefix' => 'Tx.',
'fields' => array
("account_id" => array('name' => 'Account',
("account_id" => array('name' => 'Payment<BR>Account',
'opts' =>
array('type' => 'select',
'multiple' => 'checkbox',
@@ -98,14 +112,22 @@ echo $this->element('form_table',
'selected' => array_keys($defaultAccounts),
),
),
"from_date" => array('opts' =>
array('type' => 'text'),
'between' => '<A HREF="#" ONCLICK="datepickerBOM(null,\'TxFromDate\'); return false;">BOM</A>',
),
"through_date" => array('opts' =>
array('type' => 'text'),
'between' => '<A HREF="#" ONCLICK="datepickerEOM(\'TxFromDate\',\'TxThroughDate\'); return false;">EOM</A>',
),
),
));
echo $this->element('form_table',
array('class' => "item account collected entry",
//'with_name_after' => ':',
'field_prefix' => 'Tx.',
'fields' => array
("from_date" => array('opts' =>
array('type' => 'text'),
'between' => '<A HREF="#" ONCLICK="datepickerBOM(null,\'TxFromDate\'); return false;">BOM</A>',
),
"through_date" => array('opts' =>
array('type' => 'text'),
'between' => '<A HREF="#" ONCLICK="datepickerEOM(\'TxFromDate\',\'TxThroughDate\'); return false;">EOM</A>',
),
),
));
@@ -133,7 +155,6 @@ echo '<div CLASS="detail supporting">' . "\n";
echo $this->element('ledger_entries', array
(// Element configuration
'collected_account_id' => $account['id'],
'collected_payment_accounts' => array_keys($defaultAccounts),
// Grid configuration
'config' => array
@@ -141,6 +162,7 @@ echo $this->element('ledger_entries', array
'grid_div_id' => 'collected-entries',
'grid_div_class' => 'text-below',
'grid_events' => array('loadComplete' => 'onGridLoadComplete()'),
//'grid_setup' => array('hiddengrid' => true),
//'caption' => '<SPAN id="receipt-charges-caption"></SPAN>',
'caption' => 'Collected ' . Inflector::pluralize($account['name'])
),

View File

@@ -217,6 +217,13 @@ table.deposit-summary td span.dollar-amount { float: right; }
table.deposit-summary td.account { padding-right: 0.8em; }
table.deposit-summary td.quantity { padding-right: 0.8em; }
/* Collected Income */
.account.collected.entry { float : left;
clear : none; }
form#collected-form input[type=button] { float : left;
clear : left; }
/************************************************************
************************************************************
* jqGrid