From: marina Date: Tue, 10 Jun 2025 12:34:20 +0000 (+0300) Subject: ERP-426 Расширение тестовой группы магазинов при редактировании списания X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=fa7322a8a904c233eddb68789ea055606177fcc9;p=erp24_rep%2Fyii-erp24%2F.git ERP-426 Расширение тестовой группы магазинов при редактировании списания --- diff --git a/erp24/controllers/WriteOffsErpController.php b/erp24/controllers/WriteOffsErpController.php index 655f8545..9ba70fd5 100644 --- a/erp24/controllers/WriteOffsErpController.php +++ b/erp24/controllers/WriteOffsErpController.php @@ -933,7 +933,7 @@ class WriteOffsErpController extends Controller ->one(); - if (in_array($model->store_id, [1, 9, 28]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { + if (in_array($model->store_id, [1, 9, 28, 30, 15, 44, 8]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { return 'У вас нет прав для согласования списаний!'; } diff --git a/erp24/views/write_offs_erp/view.php b/erp24/views/write_offs_erp/view.php index 06e80e7a..30b8e06f 100644 --- a/erp24/views/write_offs_erp/view.php +++ b/erp24/views/write_offs_erp/view.php @@ -193,7 +193,7 @@ $this->registerCssFile('/css/write-offs-erp.css', ['position' => \yii\web\View:: store_id, [1, 9, 28]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { + if (in_array($model->store_id, [1, 9, 28, 30, 15, 44, 8]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { $class .= ' disabled'; } echo Html::tag('span', diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index 8dfa5d86..8798e542 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -3,7 +3,7 @@ let initialCommentValue = ''; function updateCommentReadonly() { const currentUser = $('.admin-name').text().trim(); const selectedStoreId = $('#writeoffserp-store_id').val(); - const specialStoreIds = ['1', '9', '28']; + const specialStoreIds = ['1', '9', '28', '30', '15', '44', '8']; const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алёна', 'Ольга Цветкова']; const isReadonly = specialStoreIds.includes(selectedStoreId) && !allowedCommentUsers.includes(currentUser); @@ -65,7 +65,7 @@ $(".form-validate button").click(function (e) { const selectedStoreId = $('#writeoffserp-store_id').val(); const commentValue = $('#writeoffserp-comment').val().trim(); - const specialStoreIds = ['1', '9', '28']; + const specialStoreIds = ['1', '9', '28', '30', '15', '44', '8']; const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алёна', 'Ольга Цветкова']; if (specialStoreIds.includes(selectedStoreId)) {