Add inventory changes ( tax, net purchase price

This commit is contained in:
2017-01-06 18:24:43 +01:00
parent 6de07dac93
commit f3d00953c8
16 changed files with 547 additions and 287 deletions

View File

@@ -123,16 +123,14 @@ class InventoryItemForm extends Model{
$item->price_brutto = $this->product->sale_price;
$item->type = InventoryItem::$TYPE_PRODUCT;
$item->id_product = $this->product->id_product;
$item->tax = $this->product->tax;
$item->purchase_price_net = $this->product->purchase_net_price;
}else{
$item->id_inventory_group = $this->inventoryGroup->id_inventory_group;
$item->type = InventoryItem::$TYPE_INVENTORY_GROUP;
}
$item->id_inventory = $this->inventory->id_inventory;
$item->recalculateTotalPriceBrutto();
if ( !$item->save(false) ){
throw new \Exception("Nem sikerült a leltár végrehajtása");
}