$admins = ArrayHelper::map(Admin::find()->all(), 'id', 'name');
- $products = ArrayHelper::map(Products1c::findAll(['id' => ShiftRemains::find()->where(['shift_transfer_id' => $id])->select('product_guid')->column()]), 'id', 'name');
+ $products = ArrayHelper::map(
+ Products1c::findAll(['id' =>
+ ShiftRemains::find()
+ ->andWhere(['shift_transfer_id' => $id])
+ ->andWhere(['<', 'fact_and_1c_diff', 0])
+ ->select('product_guid')->column()]),
+ 'id', 'name');
return $this->render('view',
compact('shiftTransfer', 'storeNameById', 'admins', 'products'));
->andWhere(['guid' => $productGuid])
->andWhere(['guid_replacement' => ShiftRemains::find()
->andWhere(['shift_transfer_id' => $shiftTransferId])
- ->andWhere(['<>', 'fact_and_1c_diff', 0])
+ ->andWhere(['>', 'fact_and_1c_diff', 0])
->select('product_guid')
->column()])
->select(['guid_replacement'])