]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки по max-min вычисление значений для экспорта origin/feature_fomichev_erp-362_export_to_excel_autoplannogram
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 5 Aug 2025 12:05:29 +0000 (15:05 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 5 Aug 2025 12:05:29 +0000 (15:05 +0300)
erp24/controllers/AutoPlannogrammaController.php

index da5cec50c491a657160f298da7e5fc3a6fe5510f..3d5007201d285f1f3734fefdcbf3a470b88f0552 100644 (file)
@@ -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,
                         ];
                     }