Просмотр исходного кода

新增对账是增加税率判断,不同税率不能一起对账

hejq 7 лет назад
Родитель
Сommit
a1f9f6b932
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      src/main/webapp/resources/js/index/app.js

+ 11 - 1
src/main/webapp/resources/js/index/app.js

@@ -10678,7 +10678,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 checkAmount: 0,
                 currency: '',
                 rate: '',
-                items: []
+                items: [],
+                taxrate: ''
             };
             //保存来源单据相关信息
             var sourceInfos = [];
@@ -10751,6 +10752,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                         toaster.pop('error', '请选择同一种币别');
                     }
 
+                    //必须是相同税率才能生成对账单,否则提示错误
+                    if (!angular.isNumber($scope.apCheck.taxrate)) {
+                        $scope.apCheck.taxrate = check.taxrate;
+                    } else if ($scope.apCheck.taxrate != check.taxrate) {
+                        $scope.sameCust = false;
+                        $scope.loading = false;
+                        toaster.pop('error', '请选择相同的税率');
+                    }
+
                     //本次对账数量必须小于总对账数量
                     if (check.qty > 0) {
                         $scope.data.maxThisCheckQty = check.qty;