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

@@ -45,10 +45,11 @@ class InventoryConsoleController extends Controller{
$query->innerJoin('product','sale.id_product = product.id_product');
$query->andWhere(['transfer.type' => Transfer::TYPE_PRODUCT]);
$query->andWhere(['in', 'transfer.type', [Transfer::STATUS_NOT_PAID, Transfer::STATUS_PAID]]);
$query->andWhere(['in', 'transfer.status', [Transfer::STATUS_NOT_PAID, Transfer::STATUS_PAID]]);
$query->andWhere(['product.id_product' => $prev->id_product]);
$query->andWhere([ '>','transfer.created_at',$start ]);
$query->andWhere([ '<','transfer.created_at',$end ]);
$products = $query->scalar();