Fix Detsta Import -> Transfer type cash , when unsuccessful

This commit is contained in:
2016-09-07 21:31:17 +02:00
parent 179b47c454
commit 2828a6f236
4 changed files with 29 additions and 10 deletions

View File

@@ -151,7 +151,10 @@ class InventoryItemForm extends Model{
if ( isset($this->last_inventory_item ) ){
$query->andWhere([ '>', 'procurement.created_at' ,$this->last_inventory_item->created_at]);
}
//$query->andWhere([ '>', 'procurement.created_at' ,$this->inventory->created_at]);
if ( $this->type == 'product') {
$query->andWhere(['product.id_product' => $this->product->id_product]);
}else{