]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-259 Доработка второго шага передачи смен
authormarina <m.zozirova@gmail.com>
Tue, 17 Dec 2024 09:35:35 +0000 (12:35 +0300)
committermarina <m.zozirova@gmail.com>
Tue, 17 Dec 2024 09:35:35 +0000 (12:35 +0300)
erp24/views/shift-transfer/_replacement.php
erp24/web/js/shift-transfer/replacement.js

index a12cfcc00b8c629df803fb7bbdea16fbde91b456..69ed6106c4eabb81f61b8eaf960c4ee480b05ebe 100644 (file)
@@ -80,9 +80,9 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO
             ],
             [
                 'name' => 'product_self_cost',
-                'type' => BaseColumn::TYPE_HIDDEN_INPUT,
-                'options' => ['step' => 0.01, 'readonly' => true,],
-                'title' => 'Себестоимость товара',
+                'type' => BaseColumn::TYPE_TEXT_INPUT,
+                'options' => ['type' => 'hidden', 'step' => 0.01, 'readonly' => true,],
+//                'title' => 'Себестоимость товара',
                 'value' => function ($data) {
                     return $data['product_self_cost'] ?? '';
                 },
@@ -135,9 +135,9 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO
             ],
             [
                 'name' => 'product_replacement_self_cost',
-                'type' => BaseColumn::TYPE_HIDDEN_INPUT,
-                'options' => ['step' => 0.01, 'readonly' => true,],
-                'title' => 'Себестоимость замещаемого товара',
+                'type' => BaseColumn::TYPE_TEXT_INPUT,
+                'options' => ['type' => 'hidden', 'step' => 0.01, 'readonly' => true,],
+//                'title' => 'Себестоимость замещаемого товара',
                 'value' => function ($data) {
                     return $data['product_replacement_self_cost'] ?? '';
                 },
@@ -162,9 +162,9 @@ if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIO
             ],
             [
                 'name' => 'balance_self_cost',
-                'title' => 'Разница в сумме (Себестоиомость)',
-                'type' => BaseColumn::TYPE_HIDDEN_INPUT,
-                'options' => ['step' => 0.01, 'readonly' => true,],
+//                'title' => 'Разница в сумме (Себестоиомость)',
+                'type' => BaseColumn::TYPE_TEXT_INPUT,
+                'options' => ['type' => 'hidden', 'step' => 0.01, 'readonly' => true,],
                 'value' => function ($data) {
                     return $data['balance_self_cost'] ?? '';
                 },
index 06c2c0a27c155b1ba41493f438f34381b1c46392..125a735186ec48b065993c381e515bdd41f3f2ac 100644 (file)
@@ -78,6 +78,7 @@ function clearFields($this) {
         '#shifttransfer-equalizationremains-' + index + '-product_replacement_price',
         '#shifttransfer-equalizationremains-' + index + '-product_replacement_self_cost',
         '#shifttransfer-equalizationremains-' + index + '-product_replacement_count',
+        '#shifttransfer-equalizationremains-' + index + '-product_count',
         '#shifttransfer-equalizationremains-' + index + '-balance',
         '#shifttransfer-equalizationremains-' + index + '-balance_self_cost'
     ];
@@ -123,6 +124,7 @@ function setReplacementPriceData() {
             }
 
             if (!data.success) {
+                clearFields($this);
                 alert('Ошибка: ' + data.message);
                 return;
             }