kts-component-invoice-operate 3.0.10 → 3.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -8855,22 +8855,23 @@ var onChangeTaxRate = lazyFn(function (controller, form, record) {
8855
8855
  switch (_context6.prev = _context6.next) {
8856
8856
  case 0:
8857
8857
  err = err || {};
8858
+ debugger;
8858
8859
 
8859
8860
  if (!(promptErr(err.taxRate) || !values.taxRate && values.taxRate !== 0)) {
8860
- _context6.next = 3;
8861
+ _context6.next = 4;
8861
8862
  break;
8862
8863
  }
8863
8864
 
8864
8865
  return _context6.abrupt("return");
8865
8866
 
8866
- case 3:
8867
+ case 4:
8867
8868
  taxRate = parseFloat(values.taxRate);
8868
- _context6.next = 6;
8869
+ _context6.next = 7;
8869
8870
  return controller.setEditGood({
8870
8871
  taxRate: taxRate
8871
8872
  });
8872
8873
 
8873
- case 6:
8874
+ case 7:
8874
8875
  // 去掉赋码
8875
8876
  (function () {
8876
8877
  var cache = controller.state.goodsListState.endowCode.cache;
@@ -8891,7 +8892,7 @@ var onChangeTaxRate = lazyFn(function (controller, form, record) {
8891
8892
  updateUnitPriceTax(controller, form);
8892
8893
  }
8893
8894
 
8894
- case 8:
8895
+ case 9:
8895
8896
  case "end":
8896
8897
  return _context6.stop();
8897
8898
  }
@@ -8962,7 +8963,7 @@ var updateUnitPriceExcludingTax = function updateUnitPriceExcludingTax(controlle
8962
8963
 
8963
8964
  case 5:
8964
8965
  // 计算 金额(不含税)
8965
- if (taxAmount && !promptErr(err.lineAmountIncludeTax)) {
8966
+ if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
8966
8967
  lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax, taxAmount);
8967
8968
  }
8968
8969
 
package/dist/index.js CHANGED
@@ -8865,22 +8865,23 @@ var onChangeTaxRate = lazyFn(function (controller, form, record) {
8865
8865
  switch (_context6.prev = _context6.next) {
8866
8866
  case 0:
8867
8867
  err = err || {};
8868
+ debugger;
8868
8869
 
8869
8870
  if (!(promptErr(err.taxRate) || !values.taxRate && values.taxRate !== 0)) {
8870
- _context6.next = 3;
8871
+ _context6.next = 4;
8871
8872
  break;
8872
8873
  }
8873
8874
 
8874
8875
  return _context6.abrupt("return");
8875
8876
 
8876
- case 3:
8877
+ case 4:
8877
8878
  taxRate = parseFloat(values.taxRate);
8878
- _context6.next = 6;
8879
+ _context6.next = 7;
8879
8880
  return controller.setEditGood({
8880
8881
  taxRate: taxRate
8881
8882
  });
8882
8883
 
8883
- case 6:
8884
+ case 7:
8884
8885
  // 去掉赋码
8885
8886
  (function () {
8886
8887
  var cache = controller.state.goodsListState.endowCode.cache;
@@ -8901,7 +8902,7 @@ var onChangeTaxRate = lazyFn(function (controller, form, record) {
8901
8902
  updateUnitPriceTax(controller, form);
8902
8903
  }
8903
8904
 
8904
- case 8:
8905
+ case 9:
8905
8906
  case "end":
8906
8907
  return _context6.stop();
8907
8908
  }
@@ -8972,7 +8973,7 @@ var updateUnitPriceExcludingTax = function updateUnitPriceExcludingTax(controlle
8972
8973
 
8973
8974
  case 5:
8974
8975
  // 计算 金额(不含税)
8975
- if (taxAmount && !promptErr(err.lineAmountIncludeTax)) {
8976
+ if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
8976
8977
  lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax, taxAmount);
8977
8978
  }
8978
8979
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -257,6 +257,7 @@ export const onChangeTaxRate = lazyFn(
257
257
 
258
258
  form.validateFields(async (err, values) => {
259
259
  err = err || {};
260
+ debugger;
260
261
  if (promptErr(err.taxRate) || (!values.taxRate && values.taxRate !== 0)) return;
261
262
 
262
263
  let taxRate = parseFloat(values.taxRate);
@@ -338,7 +339,7 @@ export const updateUnitPriceExcludingTax = (controller: InvoiceController, form:
338
339
  await controller.setEditGood({ taxAmount });
339
340
 
340
341
  // 计算 金额(不含税)
341
- if (taxAmount && !promptErr(err.lineAmountIncludeTax)) {
342
+ if ((taxAmount || taxAmount===0) && !promptErr(err.lineAmountIncludeTax)) {
342
343
  lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax, taxAmount);
343
344
  }
344
345
  form.setFieldsValue({ lineAmountExcludeTax });