]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-426 Расширение тестовой группы магазинов при редактировании списания
authormarina <m.zozirova@gmail.com>
Tue, 10 Jun 2025 12:34:20 +0000 (15:34 +0300)
committermarina <m.zozirova@gmail.com>
Tue, 10 Jun 2025 12:34:20 +0000 (15:34 +0300)
erp24/controllers/WriteOffsErpController.php
erp24/views/write_offs_erp/view.php
erp24/web/js/validate/validateForm.js

index 655f8545d531781a4343e0ef1a1ea6c3fe917fa3..9ba70fd5d265dd8620176e6d570d80d97d015d7e 100644 (file)
@@ -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 'У вас нет прав для согласования списаний!';
             }
 
index 06e80e7acf23f9b46ed42c0346772dfb93199c19..30b8e06ff662e46fb0d334ef0d9d985697facaae 100644 (file)
@@ -193,7 +193,7 @@ $this->registerCssFile('/css/write-offs-erp.css', ['position' => \yii\web\View::
                 <?php
                 $class = 'btn btn-success btn-lg';
 
-                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])) {
                     $class .= ' disabled';
                 }
                 echo Html::tag('span',
index 8dfa5d8609e9bb3d418fdbceb4c9a76fa06d3c6d..8798e542405c6a70f8b57acebfe786727346027f 100755 (executable)
@@ -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)) {