From: Vladimir Fomichev Date: Tue, 5 Aug 2025 12:05:29 +0000 (+0300) Subject: Правки по max-min вычисление значений для экспорта X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=feb38d2b00249f167f96649397cb94a326d95c4b;p=erp24_rep%2Fyii-erp24%2F.git Правки по max-min вычисление значений для экспорта --- diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index da5cec50..3d500720 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -1549,7 +1549,7 @@ class AutoPlannogrammaController extends BaseController 'type_pm' => $filters['capacity_type'] == 'max' ? 'max' : 'min', 'shop' => "{$product['store_id']} {$product['store_name']}", 'group_name' => 'Корректировка', - 'quantity' => $product['modify'], + 'quantity' => $filters['capacity_type'] == 'max' ? $product['modify'] : $product['modify'] * 0.3, 'value_type' => 'Корректировка', ]; continue; @@ -1571,7 +1571,7 @@ class AutoPlannogrammaController extends BaseController 'type_pm' => $filters['capacity_type'] == 'max' ? 'max' : 'min', 'shop' => "{$product['store_id']} {$product['store_name']}", 'group_name' => 'Оффлайн', - 'quantity' => $product['calculate'], + 'quantity' => $filters['capacity_type'] == 'max' ? $product['calculate'] : $product['calculate'] * 0.3, 'value_type' => AutoPlannogrammaService::TYPE_OFFLINE, ]; // группы offline @@ -1588,7 +1588,7 @@ class AutoPlannogrammaController extends BaseController 'type_pm' => $filters['capacity_type'] == 'max' ? 'max' : 'min', 'shop' => "{$product['store_id']} {$product['store_name']}", 'group_name' => $groupKey, - 'quantity' => $qty, + 'quantity' => $filters['capacity_type'] == 'max' ? $qty : $qty * 0.3, 'value_type' => AutoPlannogrammaService::TYPE_OFFLINE, ]; } @@ -1609,7 +1609,7 @@ class AutoPlannogrammaController extends BaseController 'type_pm' => $filters['capacity_type'] == 'max' ? 'max' : 'min', 'shop' => "{$product['store_id']} {$product['store_name']}", 'group_name' => 'Списание', - 'quantity' => $typeArr['quantity'], + 'quantity' => $filters['capacity_type'] == 'max' ? $typeArr['quantity'] : $typeArr['quantity'] * 0.3, 'value_type' => AutoPlannogrammaService::TYPE_WRITE_OFFS, ]; continue; @@ -1629,7 +1629,7 @@ class AutoPlannogrammaController extends BaseController 'type_pm' => $filters['capacity_type'] == 'max' ? 'max' : 'min', 'shop' => "{$product['store_id']} {$product['store_name']}", 'group_name' => $groupKey, - 'quantity' => $qty, + 'quantity' => $filters['capacity_type'] == 'max' ? $qty : $qty * 0.3, 'value_type' => $type, ]; }