add inventory to frontend

This commit is contained in:
2016-03-24 07:44:00 +01:00
parent e7b16f20ce
commit ed837d6580
27 changed files with 1259 additions and 71 deletions

View File

@@ -71,7 +71,7 @@ class InventoryItemSearch extends InventoryItem
'inventory.created_at as inventory_created_at',
'inventory_prev.id_inventory as inventory_prev_id_inventory',
'inventory_prev.name as inventory_prev_name',
new Expression('(inventory_item.count - ( inventory_item.count_prev + inventory_item.count_in - inventory_item.count_sold )) as item_difference'),
new Expression('(coalesce(inventory_item.count,0) - ( coalesce(inventory_item.count_prev,0) + coalesce(inventory_item.count_in,0) - coalesce(inventory_item.count_sold,0) )) as item_difference'),
]);
$query->from(InventoryItem::tableName());