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:
abijah
2009-07-31 01:38:53 +00:00
parent 237b0a901f
commit 777a47a27b
3 changed files with 35 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ class LedgerEntriesController extends AppController {
),
'Tender' =>
array('fields' => array('id', 'name'),
array('fields' => array('id', 'name', 'nsf_transaction_id'),
),
/* 'DebitEntry', */
@@ -102,6 +102,21 @@ class LedgerEntriesController extends AppController {
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) {
$links['LedgerEntry'] = array('id');
$links['Transaction'] = array('id');

View File

@@ -57,6 +57,21 @@ class TendersController extends AppController {
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) {
$links['Tender'] = array('name', 'id');
$links['Customer'] = array('name');

View File

@@ -239,6 +239,10 @@ table.deposit-summary td.quantity { padding-right: 0.8em; }
form#collected-form input[type=button] { float : left;
clear : left; }
/* NSF items */
.nsf-tender { text-decoration: line-through; }
/************************************************************
************************************************************
* jqGrid