add wate to inventory
This commit is contained in:
@@ -17,6 +17,7 @@ use common\components\ProductAwareBehavior;
|
||||
* @property integer $id_inventory
|
||||
* @property integer $count_in
|
||||
* @property integer $count_sold
|
||||
* @property integer $count_waste
|
||||
* @property integer $count
|
||||
* @property integer $count_prev
|
||||
* @property integer $count_system
|
||||
@@ -229,6 +230,7 @@ class InventoryItem extends BaseFitnessActiveRecord
|
||||
$count_prev = 0;
|
||||
$count_in = 0;
|
||||
$count_sold = 0;
|
||||
$count_waste = 0;
|
||||
|
||||
$price = 0;
|
||||
if (isset($price) && is_numeric($price)){
|
||||
@@ -255,10 +257,14 @@ class InventoryItem extends BaseFitnessActiveRecord
|
||||
$count_sold = $this->count_sold;
|
||||
}
|
||||
|
||||
if ( isset($this->count_waste)){
|
||||
$count_waste = $this->count_waste;
|
||||
}
|
||||
|
||||
//netto készlet érték
|
||||
$this->net_stock_money = $count * $purchase_price_net;
|
||||
//leltárhiány db
|
||||
$this->stock_missing_count = $this->count - ($count_prev + $count_in - $count_sold) ;
|
||||
$this->stock_missing_count = $this->count - ($count_prev + $count_in - $count_sold - $count_waste) ;
|
||||
//leltárhiány összeg
|
||||
$this->stock_missing_money = $price * $this->stock_missing_count;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ class Log extends BaseFitnessActiveRecord
|
||||
public static $TYPE_KEY_UNASSIGN = 180;
|
||||
public static $TYPE_TOWEL_IN = 190;
|
||||
public static $TYPE_TOWEL_OUT = 200;
|
||||
public static $TYPE_CRUD = 210;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
||||
Reference in New Issue
Block a user