From 1a04a6e3514dde8462bbc4cb99d7036f9b84e0e3 Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Mon, 1 May 2017 22:04:05 +0200 Subject: [PATCH] add waste to invetory gui --- backend/controllers/InventoryItemController.php | 3 ++- backend/models/InventoryItemSearch.php | 3 ++- backend/views/inventory-item/index.php | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/backend/controllers/InventoryItemController.php b/backend/controllers/InventoryItemController.php index aa92a72..52ce156 100644 --- a/backend/controllers/InventoryItemController.php +++ b/backend/controllers/InventoryItemController.php @@ -81,6 +81,7 @@ class InventoryItemController extends Controller ['item_count_sold', 'Eladott mennyiség (db)'], ['item_count_in', 'Beszerzett mennyiség (db)'], ['item_count', 'Leltározott mennyiség (db)'], + ['item_count_waste', 'Selejtezett mennyiség (db)'], ['item_purchase_price_net', 'Nettó beszerezési ár (Ft)'], ['item_net_stock_money', 'Nettó készlet érték (Ft)'], ['item_stock_missing_count', 'Különbség (db)'], @@ -88,7 +89,7 @@ class InventoryItemController extends Controller ['item_stock_missing_money', 'Leltár hiány (Ft)'], ['item_count_system', 'Rendszer szerinti mennyiség (db)'], ]; - $cols = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']; + $cols = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P','Q']; /** @noinspection PhpUndefinedMethodInspection */ $models = $dataProvider->getModels(); diff --git a/backend/models/InventoryItemSearch.php b/backend/models/InventoryItemSearch.php index 5479344..28e16cd 100644 --- a/backend/models/InventoryItemSearch.php +++ b/backend/models/InventoryItemSearch.php @@ -67,6 +67,7 @@ class InventoryItemSearch extends InventoryItem 'coalesce(inventory_item.count_sold,0) as item_count_sold', 'coalesce(inventory_item.count,0) as item_count', 'coalesce(inventory_item.count_system,0) as item_count_system', + 'coalesce(inventory_item.count_waste,0) as item_count_waste', 'inventory.created_at as inventory_created_at', 'inventory_prev.id_inventory as inventory_prev_id_inventory', 'inventory_prev.name as inventory_prev_name', @@ -107,7 +108,7 @@ class InventoryItemSearch extends InventoryItem ['item_count_sold', 'item_count_sold'], ['item_count_in', 'item_count_in'], ['item_count', 'item_count'], - ['item_count', 'item_count'], + ['item_count_waste', 'item_count_waste'], ['item_difference', 'item_difference'], ['item_count_system', 'item_count_system'], ['inventory.id_inventory', 'inventory_id_inventory'], diff --git a/backend/views/inventory-item/index.php b/backend/views/inventory-item/index.php index 6e53cee..abc0882 100644 --- a/backend/views/inventory-item/index.php +++ b/backend/views/inventory-item/index.php @@ -152,6 +152,12 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );'); 'label' => 'Beszerzett mennyiség (db)', 'contentOptions' => ['class' => 'numeric ' ] + ], + [ + 'attribute' => 'item_count_waste', + 'label' => 'Selejtezett mennyiség (db)', + 'contentOptions' => ['class' => 'numeric ' ] + ], [ 'attribute' => 'item_count_sold',