Added strikethrough over the tender name in grids when the tender is NSF. This helps really call out the situation with NSF items.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@443 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -40,7 +40,7 @@ class LedgerEntriesController extends AppController {
|
|||||||
),
|
),
|
||||||
|
|
||||||
'Tender' =>
|
'Tender' =>
|
||||||
array('fields' => array('id', 'name'),
|
array('fields' => array('id', 'name', 'nsf_transaction_id'),
|
||||||
),
|
),
|
||||||
|
|
||||||
/* 'DebitEntry', */
|
/* 'DebitEntry', */
|
||||||
@@ -102,6 +102,21 @@ class LedgerEntriesController extends AppController {
|
|||||||
return $order;
|
return $order;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gridDataPostProcessCalculatedFields(&$params, &$model, &$records) {
|
||||||
|
parent::gridDataPostProcessCalculatedFields($params, $model, $records);
|
||||||
|
foreach ($records AS &$record) {
|
||||||
|
// REVISIT <AP>: 20090730
|
||||||
|
// We really need the grid to handle this. We probably need to
|
||||||
|
// either create a hidden column with the nsf id, or pass back
|
||||||
|
// a list of nsf items as user data. We can then add an onload
|
||||||
|
// function to sweep through the nsf items and format them.
|
||||||
|
// For now... this works.
|
||||||
|
if (!empty($record['Tender']['nsf_transaction_id']))
|
||||||
|
$record['Tender']['name'] =
|
||||||
|
'<SPAN class="nsf-tender">' . $record['Tender']['name'] . '</SPAN>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
||||||
$links['LedgerEntry'] = array('id');
|
$links['LedgerEntry'] = array('id');
|
||||||
$links['Transaction'] = array('id');
|
$links['Transaction'] = array('id');
|
||||||
|
|||||||
@@ -57,6 +57,21 @@ class TendersController extends AppController {
|
|||||||
return parent::gridDataRecordsExecute($params, $model, $query);
|
return parent::gridDataRecordsExecute($params, $model, $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gridDataPostProcessCalculatedFields(&$params, &$model, &$records) {
|
||||||
|
parent::gridDataPostProcessCalculatedFields($params, $model, $records);
|
||||||
|
foreach ($records AS &$record) {
|
||||||
|
// REVISIT <AP>: 20090730
|
||||||
|
// We really need the grid to handle this. We probably need to
|
||||||
|
// either create a hidden column with the nsf id, or pass back
|
||||||
|
// a list of nsf items as user data. We can then add an onload
|
||||||
|
// function to sweep through the nsf items and format them.
|
||||||
|
// For now... this works.
|
||||||
|
if (!empty($record['Tender']['nsf_transaction_id']))
|
||||||
|
$record['Tender']['name'] =
|
||||||
|
'<SPAN class="nsf-tender">' . $record['Tender']['name'] . '</SPAN>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
|
||||||
$links['Tender'] = array('name', 'id');
|
$links['Tender'] = array('name', 'id');
|
||||||
$links['Customer'] = array('name');
|
$links['Customer'] = array('name');
|
||||||
|
|||||||
@@ -239,6 +239,10 @@ table.deposit-summary td.quantity { padding-right: 0.8em; }
|
|||||||
form#collected-form input[type=button] { float : left;
|
form#collected-form input[type=button] { float : left;
|
||||||
clear : left; }
|
clear : left; }
|
||||||
|
|
||||||
|
/* NSF items */
|
||||||
|
.nsf-tender { text-decoration: line-through; }
|
||||||
|
|
||||||
|
|
||||||
/************************************************************
|
/************************************************************
|
||||||
************************************************************
|
************************************************************
|
||||||
* jqGrid
|
* jqGrid
|
||||||
|
|||||||
Reference in New Issue
Block a user