kts-component-invoice-operate 3.2.88 → 3.2.89
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
|
@@ -2274,8 +2274,8 @@ function _mergeDiscount() {
|
|
|
2274
2274
|
sum.quantity = good.quantity;
|
|
2275
2275
|
|
|
2276
2276
|
if (sum.quantity) {
|
|
2277
|
-
sum.priceExcludeTax = chain$1(bignumber(
|
|
2278
|
-
sum.priceIncludeTax = chain$1(bignumber(
|
|
2277
|
+
sum.priceExcludeTax = chain$1(bignumber(sum.lineAmountExcludeTax)).divide(bignumber(sum.quantity)).done().toNumber();
|
|
2278
|
+
sum.priceIncludeTax = chain$1(bignumber(sum.lineAmountIncludeTax)).divide(bignumber(sum.quantity)).done().toNumber();
|
|
2279
2279
|
}
|
|
2280
2280
|
|
|
2281
2281
|
goodsList.splice(i, 2, sum);
|
package/dist/index.js
CHANGED
|
@@ -2284,8 +2284,8 @@ function _mergeDiscount() {
|
|
|
2284
2284
|
sum.quantity = good.quantity;
|
|
2285
2285
|
|
|
2286
2286
|
if (sum.quantity) {
|
|
2287
|
-
sum.priceExcludeTax = mathjs.chain(mathjs.bignumber(
|
|
2288
|
-
sum.priceIncludeTax = mathjs.chain(mathjs.bignumber(
|
|
2287
|
+
sum.priceExcludeTax = mathjs.chain(mathjs.bignumber(sum.lineAmountExcludeTax)).divide(mathjs.bignumber(sum.quantity)).done().toNumber();
|
|
2288
|
+
sum.priceIncludeTax = mathjs.chain(mathjs.bignumber(sum.lineAmountIncludeTax)).divide(mathjs.bignumber(sum.quantity)).done().toNumber();
|
|
2289
2289
|
}
|
|
2290
2290
|
|
|
2291
2291
|
goodsList.splice(i, 2, sum);
|
package/package.json
CHANGED
|
@@ -13,13 +13,13 @@ export default async function mergeDiscount(state: InvoiceControllerState) {
|
|
|
13
13
|
if (good.lineAttribute * 1 === LineAttributeType.被折扣行) {
|
|
14
14
|
const sum: IGood = { ...good, $index: idGenerator(), lineAttribute: LineAttributeType.正常, discountGroup: undefined };
|
|
15
15
|
const zk = goodsList[i + 1];
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
sum.lineAmountExcludeTax = chain(bignumber(good.lineAmountExcludeTax)).subtract(bignumber(Math.abs(zk.lineAmountExcludeTax || 0))).done().toNumber();
|
|
18
18
|
sum.lineAmountIncludeTax = chain(bignumber(good.lineAmountIncludeTax)).subtract(bignumber(Math.abs(zk.lineAmountIncludeTax || 0))).done().toNumber();
|
|
19
19
|
sum.quantity = good.quantity;
|
|
20
20
|
if (sum.quantity) {
|
|
21
|
-
sum.priceExcludeTax = chain(bignumber(
|
|
22
|
-
sum.priceIncludeTax = chain(bignumber(
|
|
21
|
+
sum.priceExcludeTax = chain(bignumber(sum.lineAmountExcludeTax)).divide(bignumber(sum.quantity)).done().toNumber();
|
|
22
|
+
sum.priceIncludeTax = chain(bignumber(sum.lineAmountIncludeTax)).divide(bignumber(sum.quantity)).done().toNumber();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
goodsList.splice(i, 2, sum);
|
|
@@ -66,6 +66,7 @@ class MyController1 extends Invoice.InvoiceController {
|
|
|
66
66
|
this.state.model = 'default'
|
|
67
67
|
this.state.goodsListState.isMergeDetails = true;
|
|
68
68
|
this.state.goodsListState.isSalesDiscount = true;
|
|
69
|
+
this.state.goodsListState.isMergeDiscount = true;
|
|
69
70
|
this.state.goodsListState.drag.isStart = true;
|
|
70
71
|
this.state.goodsListState.columnshide = [];
|
|
71
72
|
}
|
|
@@ -94,6 +95,7 @@ class MyController2 extends Invoice.InvoiceController {
|
|
|
94
95
|
this.state.model = 'prefab'
|
|
95
96
|
this.state.goodsListState.isMergeDetails = true;
|
|
96
97
|
this.state.goodsListState.isSalesDiscount = true;
|
|
98
|
+
this.state.goodsListState.isMergeDiscount = true;
|
|
97
99
|
this.state.goodsListState.drag.isStart = true;
|
|
98
100
|
this.state.goodsListState.columnshide = [];
|
|
99
101
|
}
|