From 8ee18593836b3812ea333c32c0939dec5dc14601 Mon Sep 17 00:00:00 2001 From: vladfo Date: Fri, 11 Oct 2024 16:34:20 +0300 Subject: [PATCH] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5?= =?utf8?q?=D0=BC=20=D1=86=D0=B5=D0=BD=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/MotivationService.php | 5 +++-- erp24/views/motivation/test-self-cost.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index 6e2589f7..371b30ef 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -1960,10 +1960,10 @@ class MotivationService // Находим товары, проданные в выбранных продажах $salesProducts = SalesProducts::find() - ->select(['check_id', 'product_id', 'quantity']) + ->select(['check_id', 'product_id', 'quantity', 'price']) ->where(['check_id' => $salesIds]) //->andWhere(['type_id' => 1]) - ->andWhere(['>', 'price', '0' ]) + // ->andWhere(['>', 'price', '0' ]) ->asArray() ->all(); @@ -2006,6 +2006,7 @@ class MotivationService 'date' => $checkDate, 'quantity' => $quantity, 'check_id' => $product['check_id'], + 'm_price' => $product['price'], ]; } diff --git a/erp24/views/motivation/test-self-cost.php b/erp24/views/motivation/test-self-cost.php index 0ba5d0d8..8e0180ec 100644 --- a/erp24/views/motivation/test-self-cost.php +++ b/erp24/views/motivation/test-self-cost.php @@ -47,6 +47,7 @@ $this->title = 'Себестоимость товаров по магазина ID товара ID чека Название + Себестоимость Цена Кол-во Дата @@ -59,6 +60,7 @@ $this->title = 'Себестоимость товаров по магазина + -- 2.39.5