]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки пересчета
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 1 Jul 2025 14:01:46 +0000 (17:01 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 1 Jul 2025 14:01:46 +0000 (17:01 +0300)
erp24/web/js/category-plan/index.js

index 38b02a90e159ade8f35db61ecf8e91eb24a6cff6..2e80485fa14fc5973f650633b1137cca86078236 100644 (file)
@@ -66,7 +66,8 @@ function editProcent(zis) {
             throw new Error('Некорректное число');
         }
     });
-
+    const previousValue = zis.dataset.prev || zis.defaultValue;
+    zis.dataset.prev = zis.value;
 
     $.ajax({
         method: "POST",
@@ -99,6 +100,7 @@ function editProcent(zis) {
             $('#rebuild').prop('disabled', false);
         },
         error: function() {
+            zis.value = previousValue;
             alert('Ошибка сохранения! Попробуйте ещё раз.');
         }
     });
@@ -204,7 +206,8 @@ $(document).ready(() => {
             data: {
                 year: $('#dynamicmodel-year').val(),
                 month: $('#dynamicmodel-month').val(),
-                store_id: store_id
+                store_id: store_id,
+                [param26]:      token26
             },
             success: function (data) {
                 if (data.status == 'running') {