diff --git a/platform/modules/v1/controllers/ErpController.php b/platform/modules/v1/controllers/ErpController.php index 008fd3b..80e4a7f 100644 --- a/platform/modules/v1/controllers/ErpController.php +++ b/platform/modules/v1/controllers/ErpController.php @@ -43,12 +43,15 @@ class ErpController extends Controller $endDate = strtotime($post['endDate']) + 86400; $productOrders = ProductOrder::find()->alias('po')->where([ - 'po.prescription_type' => 2, +// 'po.prescription_type' => 2, 'po.is_sync_erp' => 0, ]) ->andWhere([ 'in','po.status',[1,2,3,6,7] ]) + ->andWhere([ + 'in','po.prescription_type',[2,3,5,6,7] + ]) ->andWhere(['BETWEEN', 'po.created_at', $startDate, $endDate]) // ->joinWith('approvedPrescription') ->with(['orderItems','store', 'prescription'])