From: Alexander Smirnov Date: Mon, 2 Dec 2024 13:28:53 +0000 (+0300) Subject: [ERP-242] переделки X-Git-Tag: 1.7~209^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=2d64141d56b3cf09002805f4c07bce2ea93412d3;p=erp24_rep%2Fyii-erp24%2F.git [ERP-242] переделки --- diff --git a/erp24/controllers/ShiftTransferController.php b/erp24/controllers/ShiftTransferController.php index ebd037cc..c41efe7e 100644 --- a/erp24/controllers/ShiftTransferController.php +++ b/erp24/controllers/ShiftTransferController.php @@ -116,6 +116,7 @@ class ShiftTransferController extends Controller $shiftTransfer->goods_transfer_count = array_sum(ArrayHelper::getColumn($shiftTransfer->shiftRemains, 'remains_count')); $shiftTransfer->discrepancy_pieces = array_sum(ArrayHelper::getColumn($shiftTransfer->shiftRemains, 'fact_and_1c_diff')); $shiftTransfer->discrepancy_rubles = array_sum(ArrayHelper::getColumn($shiftTransfer->shiftRemains, 'remains_1c')); + $shiftTransfer->status_id = ShiftTransfer::STATUS_ID_TRANSFER_ACTIONS; $shiftTransfer->save(); return $this->redirect(['/shift-transfer/view', 'id' => $shiftTransfer->id]); } diff --git a/erp24/views/shift-transfer/update.php b/erp24/views/shift-transfer/update.php index 8a694697..b38fe7df 100644 --- a/erp24/views/shift-transfer/update.php +++ b/erp24/views/shift-transfer/update.php @@ -146,11 +146,13 @@ $this->registerCss(' [ 'name' => 'group_label', 'title' => 'Название группы', - 'type' => BaseColumn::TYPE_DROPDOWN, - 'items' => ProductsClass::getHints(), - 'options' => ['readonly' => true], + 'type' => Select2::class, + 'options' => [ + 'data' => ProductsClass::getHints(), + 'readonly' => true + ], 'value' => function($data) { - return ProductsClass::getHints()[$data['group_label'] ?? 'other_items']; + return $data['group_label'] ?? 'other_items'; }, 'headerOptions' => [ 'style' => 'width: 70px;', diff --git a/erp24/web/js/shift-transfer/update.js b/erp24/web/js/shift-transfer/update.js index d8c9171d..e50d2c82 100644 --- a/erp24/web/js/shift-transfer/update.js +++ b/erp24/web/js/shift-transfer/update.js @@ -65,7 +65,7 @@ function setMultipleInputHandlers(currentIndex, row) { data: { productGuid: e.target.value, storeGuid: store.val(), [param24]: token24 }, dataType: 'json', success: (data) => { - if (data.groupLabel) { groupLabel.val(data.groupLabel); } + if (data.groupLabel) { groupLabel.val(data.groupLabel); groupLabel.select2('destroy'); groupLabel.select2(); } if (data.price) { retailPrice.val(data.price); } if (data.selfCost) { selfCost.val(data.selfCost); } if (data.quantity) { remains1c.val(data.quantity); }