partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit d1df272fc985b9c45c52988ee5bf51f1ce2f35f9
parent 927dfc28068ff981edbfc55ad153888abe627f48
Author: Timo A. Hummel <timo@netraver.de>
Date:   Wed,  8 Jun 2011 22:22:38 +0200

Added average price display

Diffstat:
Mfrontend/js/Components/Part/PartsGrid.js | 1+
Mfrontend/js/Models/Part.js | 1+
Msrc/de/RaumZeitLabor/PartDB2/Part/PartManager.php | 2+-
3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/frontend/js/Components/Part/PartsGrid.js b/frontend/js/Components/Part/PartsGrid.js @@ -17,6 +17,7 @@ Ext.define('PartDB2.PartsGrid', { } }, {header: i18n("Min. Stock"), dataIndex: 'minStockLevel', xtype:'templatecolumn', tpl:'{minStockLevel} {partUnit}'}, + {header: i18n("Avg. Price"), dataIndex: 'averagePrice' }, {header: i18n("Footprint"), dataIndex: 'footprintName'} ], buttonTextMode: 'show', diff --git a/frontend/js/Models/Part.js b/frontend/js/Models/Part.js @@ -10,6 +10,7 @@ PartDB2.Part = Ext.define("Part", { { name: 'storageLocation_id',type: 'int'}, { name: 'storageLocationName',type: 'string'}, { name: 'partUnit',type: 'string'}, + { name: 'averagePrice',type: 'float'}, /* * The partUnitDefault would belong into an association. Unless we know how to diff --git a/src/de/RaumZeitLabor/PartDB2/Part/PartManager.php b/src/de/RaumZeitLabor/PartDB2/Part/PartManager.php @@ -89,7 +89,7 @@ class PartManager extends Singleton { - $qb->select("p.name, p.id, p.stockLevel, p.minStockLevel, p.comment, st.id AS storageLocation_id, st.name as storageLocationName, f.id AS footprint_id, f.footprint AS footprintName, c.id AS category_id, c.name AS categoryName, pu.name AS partUnit, pu.is_default AS partUnitDefault"); + $qb->select("p.averagePrice, p.name, p.id, p.stockLevel, p.minStockLevel, p.comment, st.id AS storageLocation_id, st.name as storageLocationName, f.id AS footprint_id, f.footprint AS footprintName, c.id AS category_id, c.name AS categoryName, pu.name AS partUnit, pu.is_default AS partUnitDefault"); if ($limit > -1) { $qb->setMaxResults($limit);