From: vladfo Date: Fri, 11 Oct 2024 13:34:20 +0000 (+0300) Subject: Добавляем цену X-Git-Tag: 1.6~31^2~8 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=8ee18593836b3812ea333c32c0939dec5dc14601;p=erp24_rep%2Fyii-erp24%2F.git Добавляем цену --- 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 = 'Себестоимость товаров по магазина +