namespace app\controllers;
+use Yii;
+use yii_app\records\ExportImportTable;
use yii_app\records\MarketplaceOrders;
use yii_app\records\MarketplaceStatus;
}
public function actionGetNewOrderCount() {
+ $eit = ExportImportTable::find()->select(['entity_id'])->where(['entity' => 'city_store', 'export_id' => 1,
+ 'export_val' => Yii::$app->request->post('store_guid')])->one();
+ if (!$eit) {
+ return ['error' => 'Не найден магазин по store_guid'];
+ }
+ $storeId = $eit->entity_id;
return ['response' => MarketplaceOrders::find()
->where([
'status_1c' => 1,
'status_id' => 1,
+ 'store_id' => $storeId,
])->andWhere([
'between',
'creation_date',