kts-component-invoice-operate 3.2.45 → 3.2.46

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
@@ -2073,7 +2073,7 @@ function _checkSameNumber() {
2073
2073
  return _context9.abrupt("return");
2074
2074
 
2075
2075
  case 2:
2076
- if (good.lineAmountExcludeTax) {
2076
+ if (!(!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0)) {
2077
2077
  _context9.next = 5;
2078
2078
  break;
2079
2079
  }
@@ -2082,7 +2082,7 @@ function _checkSameNumber() {
2082
2082
  throw new Error('金额不能为空');
2083
2083
 
2084
2084
  case 5:
2085
- if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2085
+ if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.lineAmountExcludeTax === 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2086
2086
  _context9.next = 9;
2087
2087
  break;
2088
2088
  }
package/dist/index.js CHANGED
@@ -2083,7 +2083,7 @@ function _checkSameNumber() {
2083
2083
  return _context9.abrupt("return");
2084
2084
 
2085
2085
  case 2:
2086
- if (good.lineAmountExcludeTax) {
2086
+ if (!(!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0)) {
2087
2087
  _context9.next = 5;
2088
2088
  break;
2089
2089
  }
@@ -2092,7 +2092,7 @@ function _checkSameNumber() {
2092
2092
  throw new Error('金额不能为空');
2093
2093
 
2094
2094
  case 5:
2095
- if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2095
+ if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.lineAmountExcludeTax === 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2096
2096
  _context9.next = 9;
2097
2097
  break;
2098
2098
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.45",
3
+ "version": "3.2.46",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -119,14 +119,18 @@ async function checkTaxTate(goodsList: IGood[]) {
119
119
  async function checkSameNumber(good: IGood) {
120
120
  if (!good.quantity) return;
121
121
 
122
- if (!good.lineAmountExcludeTax) {
122
+ if (!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0) {
123
123
  message.error('金额不能为空');
124
124
  throw new Error('金额不能为空');
125
125
  }
126
126
 
127
- if (good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0) {
127
+ if (
128
+ good.quantity >= 0 && good.lineAmountExcludeTax >= 0 ||
129
+ good.lineAmountExcludeTax === 0 ||
130
+ good.quantity < 0 && good.lineAmountExcludeTax < 0
131
+ ) {
128
132
  return;
129
- }else{
133
+ } else {
130
134
  message.error('金额和数量需要同号');
131
135
  throw new Error('金额和数量需要同号');
132
136
  }