Add inventory changes ( tax, net purchase price
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user