kts-component-invoice-operate 3.2.181-15 → 3.2.181-16
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
|
@@ -8614,7 +8614,7 @@ var onChangeQuantity = lazyFn(function (controller, form, record) {
|
|
|
8614
8614
|
}
|
|
8615
8615
|
|
|
8616
8616
|
lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
|
|
8617
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)),
|
|
8617
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), 8);
|
|
8618
8618
|
form.setFieldsValue({
|
|
8619
8619
|
priceIncludeTax: priceIncludeTax
|
|
8620
8620
|
});
|
|
@@ -8638,7 +8638,7 @@ var onChangeQuantity = lazyFn(function (controller, form, record) {
|
|
|
8638
8638
|
}
|
|
8639
8639
|
|
|
8640
8640
|
lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
|
|
8641
|
-
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)),
|
|
8641
|
+
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), 8);
|
|
8642
8642
|
form.setFieldsValue({
|
|
8643
8643
|
priceExcludeTax: priceExcludeTax
|
|
8644
8644
|
});
|
|
@@ -8713,7 +8713,7 @@ var onChangePriceIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8713
8713
|
|
|
8714
8714
|
case 11:
|
|
8715
8715
|
calculatingDigits = controller.state.calculatingDigits;
|
|
8716
|
-
priceIncludeTax = format15(values.priceIncludeTax,
|
|
8716
|
+
priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
8717
8717
|
_context4.next = 15;
|
|
8718
8718
|
return controller.setEditGood({
|
|
8719
8719
|
priceIncludeTax: priceIncludeTax
|
|
@@ -8825,7 +8825,7 @@ var onChangePriceExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
8825
8825
|
|
|
8826
8826
|
case 11:
|
|
8827
8827
|
calculatingDigits = controller.state.calculatingDigits;
|
|
8828
|
-
priceExcludeTax = format15(values.priceExcludeTax,
|
|
8828
|
+
priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
8829
8829
|
_context5.next = 15;
|
|
8830
8830
|
return controller.setEditGood({
|
|
8831
8831
|
priceExcludeTax: priceExcludeTax
|
|
@@ -8946,7 +8946,7 @@ var onChangeLineAmountIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8946
8946
|
}
|
|
8947
8947
|
|
|
8948
8948
|
quantity = format15(values.quantity, calculatingDigits);
|
|
8949
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)),
|
|
8949
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), 8);
|
|
8950
8950
|
form.setFieldsValue({
|
|
8951
8951
|
priceIncludeTax: priceIncludeTax
|
|
8952
8952
|
});
|
|
@@ -8965,7 +8965,7 @@ var onChangeLineAmountIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8965
8965
|
break;
|
|
8966
8966
|
}
|
|
8967
8967
|
|
|
8968
|
-
_priceIncludeTax = format15(values.priceIncludeTax,
|
|
8968
|
+
_priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
8969
8969
|
_quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax)), calculatingDigits);
|
|
8970
8970
|
form.setFieldsValue({
|
|
8971
8971
|
quantity: _quantity3
|
|
@@ -9050,7 +9050,7 @@ var onChangeLineAmountExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
9050
9050
|
}
|
|
9051
9051
|
|
|
9052
9052
|
quantity = format15(values.quantity, calculatingDigits);
|
|
9053
|
-
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)),
|
|
9053
|
+
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), 8);
|
|
9054
9054
|
form.setFieldsValue({
|
|
9055
9055
|
priceExcludeTax: priceExcludeTax
|
|
9056
9056
|
});
|
|
@@ -9069,7 +9069,7 @@ var onChangeLineAmountExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
9069
9069
|
break;
|
|
9070
9070
|
}
|
|
9071
9071
|
|
|
9072
|
-
_priceExcludeTax = format15(values.priceExcludeTax,
|
|
9072
|
+
_priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
9073
9073
|
_quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax)), calculatingDigits);
|
|
9074
9074
|
form.setFieldsValue({
|
|
9075
9075
|
quantity: _quantity4
|
|
@@ -9354,7 +9354,7 @@ var updateUnitPriceTax = /*#__PURE__*/function () {
|
|
|
9354
9354
|
break;
|
|
9355
9355
|
}
|
|
9356
9356
|
|
|
9357
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(values.quantity)),
|
|
9357
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(values.quantity)), 8);
|
|
9358
9358
|
_context11.next = 11;
|
|
9359
9359
|
return controller.setEditGood({
|
|
9360
9360
|
priceIncludeTax: priceIncludeTax
|
|
@@ -9792,7 +9792,7 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
|
|
|
9792
9792
|
}
|
|
9793
9793
|
|
|
9794
9794
|
var quantity = format15(sourceQuantity, calculatingDigits);
|
|
9795
|
-
var priceIncludeTax = format15(sourcePriceIncludeTax,
|
|
9795
|
+
var priceIncludeTax = format15(sourcePriceIncludeTax, 8);
|
|
9796
9796
|
var lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
|
|
9797
9797
|
var taxAmount = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate);
|
|
9798
9798
|
var lineAmountExcludeTax = countAmountExcludeTax(lineAmountIncludeTax, taxAmount);
|
|
@@ -9816,13 +9816,13 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
|
|
|
9816
9816
|
|
|
9817
9817
|
var _quantity5 = format15(sourceQuantity, calculatingDigits);
|
|
9818
9818
|
|
|
9819
|
-
var _priceExcludeTax2 = format15(sourcePriceExcludeTax,
|
|
9819
|
+
var _priceExcludeTax2 = format15(sourcePriceExcludeTax, 8);
|
|
9820
9820
|
|
|
9821
9821
|
var _lineAmountExcludeTax2 = format2(evaluate("".concat(_priceExcludeTax2, " * ").concat(_quantity5)));
|
|
9822
9822
|
|
|
9823
9823
|
var _lineAmountIncludeTax2 = format2(evaluate("".concat(_lineAmountExcludeTax2, " * (1+(").concat(taxRate, "/100))")));
|
|
9824
9824
|
|
|
9825
|
-
var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)),
|
|
9825
|
+
var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)), 8);
|
|
9826
9826
|
|
|
9827
9827
|
var _taxAmount = evaluate("".concat(_lineAmountIncludeTax2, " - ").concat(_lineAmountExcludeTax2));
|
|
9828
9828
|
|
|
@@ -26929,8 +26929,8 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
26929
26929
|
});
|
|
26930
26930
|
}, [controller]);
|
|
26931
26931
|
|
|
26932
|
-
var
|
|
26933
|
-
return Math.round(num *
|
|
26932
|
+
var roundTo8Decimals = function roundTo8Decimals(num) {
|
|
26933
|
+
return Math.round(num * 1e8) / 1e8;
|
|
26934
26934
|
};
|
|
26935
26935
|
|
|
26936
26936
|
return /*#__PURE__*/React.createElement(Table$1, {
|
|
@@ -27004,8 +27004,8 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
27004
27004
|
itemModelNameSelf: (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.itemModelNameSelf) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : between.itemModelNameSelf,
|
|
27005
27005
|
lineAmountExcludeTax: (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.lineAmountExcludeTax) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : between.lineAmountExcludeTax,
|
|
27006
27006
|
lineAmountIncludeTax: (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.lineAmountIncludeTax) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : between.lineAmountIncludeTax,
|
|
27007
|
-
priceExcludeTax:
|
|
27008
|
-
priceIncludeTax:
|
|
27007
|
+
priceExcludeTax: roundTo8Decimals((_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.priceExcludeTax) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : between.priceExcludeTax),
|
|
27008
|
+
priceIncludeTax: roundTo8Decimals((_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.priceIncludeTax) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : between.priceIncludeTax),
|
|
27009
27009
|
quantity: (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.quantity) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : between.quantity,
|
|
27010
27010
|
unit: (_s$goodsListState$edi15 = (_s$goodsListState$edi16 = s.goodsListState.editGood) === null || _s$goodsListState$edi16 === void 0 ? void 0 : _s$goodsListState$edi16.unit) !== null && _s$goodsListState$edi15 !== void 0 ? _s$goodsListState$edi15 : between.unit // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
|
|
27011
27011
|
// taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
|
package/dist/index.js
CHANGED
|
@@ -8624,7 +8624,7 @@ var onChangeQuantity = lazyFn(function (controller, form, record) {
|
|
|
8624
8624
|
}
|
|
8625
8625
|
|
|
8626
8626
|
lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
|
|
8627
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)),
|
|
8627
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), 8);
|
|
8628
8628
|
form.setFieldsValue({
|
|
8629
8629
|
priceIncludeTax: priceIncludeTax
|
|
8630
8630
|
});
|
|
@@ -8648,7 +8648,7 @@ var onChangeQuantity = lazyFn(function (controller, form, record) {
|
|
|
8648
8648
|
}
|
|
8649
8649
|
|
|
8650
8650
|
lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
|
|
8651
|
-
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)),
|
|
8651
|
+
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), 8);
|
|
8652
8652
|
form.setFieldsValue({
|
|
8653
8653
|
priceExcludeTax: priceExcludeTax
|
|
8654
8654
|
});
|
|
@@ -8723,7 +8723,7 @@ var onChangePriceIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8723
8723
|
|
|
8724
8724
|
case 11:
|
|
8725
8725
|
calculatingDigits = controller.state.calculatingDigits;
|
|
8726
|
-
priceIncludeTax = format15(values.priceIncludeTax,
|
|
8726
|
+
priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
8727
8727
|
_context4.next = 15;
|
|
8728
8728
|
return controller.setEditGood({
|
|
8729
8729
|
priceIncludeTax: priceIncludeTax
|
|
@@ -8835,7 +8835,7 @@ var onChangePriceExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
8835
8835
|
|
|
8836
8836
|
case 11:
|
|
8837
8837
|
calculatingDigits = controller.state.calculatingDigits;
|
|
8838
|
-
priceExcludeTax = format15(values.priceExcludeTax,
|
|
8838
|
+
priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
8839
8839
|
_context5.next = 15;
|
|
8840
8840
|
return controller.setEditGood({
|
|
8841
8841
|
priceExcludeTax: priceExcludeTax
|
|
@@ -8956,7 +8956,7 @@ var onChangeLineAmountIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8956
8956
|
}
|
|
8957
8957
|
|
|
8958
8958
|
quantity = format15(values.quantity, calculatingDigits);
|
|
8959
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)),
|
|
8959
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), 8);
|
|
8960
8960
|
form.setFieldsValue({
|
|
8961
8961
|
priceIncludeTax: priceIncludeTax
|
|
8962
8962
|
});
|
|
@@ -8975,7 +8975,7 @@ var onChangeLineAmountIncludeTax = lazyFn(function (controller, form, record) {
|
|
|
8975
8975
|
break;
|
|
8976
8976
|
}
|
|
8977
8977
|
|
|
8978
|
-
_priceIncludeTax = format15(values.priceIncludeTax,
|
|
8978
|
+
_priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
8979
8979
|
_quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax)), calculatingDigits);
|
|
8980
8980
|
form.setFieldsValue({
|
|
8981
8981
|
quantity: _quantity3
|
|
@@ -9060,7 +9060,7 @@ var onChangeLineAmountExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
9060
9060
|
}
|
|
9061
9061
|
|
|
9062
9062
|
quantity = format15(values.quantity, calculatingDigits);
|
|
9063
|
-
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)),
|
|
9063
|
+
priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), 8);
|
|
9064
9064
|
form.setFieldsValue({
|
|
9065
9065
|
priceExcludeTax: priceExcludeTax
|
|
9066
9066
|
});
|
|
@@ -9079,7 +9079,7 @@ var onChangeLineAmountExcludeTax = lazyFn(function (controller, form, record) {
|
|
|
9079
9079
|
break;
|
|
9080
9080
|
}
|
|
9081
9081
|
|
|
9082
|
-
_priceExcludeTax = format15(values.priceExcludeTax,
|
|
9082
|
+
_priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
9083
9083
|
_quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax)), calculatingDigits);
|
|
9084
9084
|
form.setFieldsValue({
|
|
9085
9085
|
quantity: _quantity4
|
|
@@ -9364,7 +9364,7 @@ var updateUnitPriceTax = /*#__PURE__*/function () {
|
|
|
9364
9364
|
break;
|
|
9365
9365
|
}
|
|
9366
9366
|
|
|
9367
|
-
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(values.quantity)),
|
|
9367
|
+
priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(values.quantity)), 8);
|
|
9368
9368
|
_context11.next = 11;
|
|
9369
9369
|
return controller.setEditGood({
|
|
9370
9370
|
priceIncludeTax: priceIncludeTax
|
|
@@ -9802,7 +9802,7 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
|
|
|
9802
9802
|
}
|
|
9803
9803
|
|
|
9804
9804
|
var quantity = format15(sourceQuantity, calculatingDigits);
|
|
9805
|
-
var priceIncludeTax = format15(sourcePriceIncludeTax,
|
|
9805
|
+
var priceIncludeTax = format15(sourcePriceIncludeTax, 8);
|
|
9806
9806
|
var lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
|
|
9807
9807
|
var taxAmount = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate);
|
|
9808
9808
|
var lineAmountExcludeTax = countAmountExcludeTax(lineAmountIncludeTax, taxAmount);
|
|
@@ -9826,13 +9826,13 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
|
|
|
9826
9826
|
|
|
9827
9827
|
var _quantity5 = format15(sourceQuantity, calculatingDigits);
|
|
9828
9828
|
|
|
9829
|
-
var _priceExcludeTax2 = format15(sourcePriceExcludeTax,
|
|
9829
|
+
var _priceExcludeTax2 = format15(sourcePriceExcludeTax, 8);
|
|
9830
9830
|
|
|
9831
9831
|
var _lineAmountExcludeTax2 = format2(evaluate("".concat(_priceExcludeTax2, " * ").concat(_quantity5)));
|
|
9832
9832
|
|
|
9833
9833
|
var _lineAmountIncludeTax2 = format2(evaluate("".concat(_lineAmountExcludeTax2, " * (1+(").concat(taxRate, "/100))")));
|
|
9834
9834
|
|
|
9835
|
-
var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)),
|
|
9835
|
+
var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)), 8);
|
|
9836
9836
|
|
|
9837
9837
|
var _taxAmount = evaluate("".concat(_lineAmountIncludeTax2, " - ").concat(_lineAmountExcludeTax2));
|
|
9838
9838
|
|
|
@@ -26939,8 +26939,8 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
26939
26939
|
});
|
|
26940
26940
|
}, [controller]);
|
|
26941
26941
|
|
|
26942
|
-
var
|
|
26943
|
-
return Math.round(num *
|
|
26942
|
+
var roundTo8Decimals = function roundTo8Decimals(num) {
|
|
26943
|
+
return Math.round(num * 1e8) / 1e8;
|
|
26944
26944
|
};
|
|
26945
26945
|
|
|
26946
26946
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Table, {
|
|
@@ -27014,8 +27014,8 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
27014
27014
|
itemModelNameSelf: (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.itemModelNameSelf) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : between.itemModelNameSelf,
|
|
27015
27015
|
lineAmountExcludeTax: (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.lineAmountExcludeTax) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : between.lineAmountExcludeTax,
|
|
27016
27016
|
lineAmountIncludeTax: (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.lineAmountIncludeTax) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : between.lineAmountIncludeTax,
|
|
27017
|
-
priceExcludeTax:
|
|
27018
|
-
priceIncludeTax:
|
|
27017
|
+
priceExcludeTax: roundTo8Decimals((_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.priceExcludeTax) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : between.priceExcludeTax),
|
|
27018
|
+
priceIncludeTax: roundTo8Decimals((_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.priceIncludeTax) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : between.priceIncludeTax),
|
|
27019
27019
|
quantity: (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.quantity) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : between.quantity,
|
|
27020
27020
|
unit: (_s$goodsListState$edi15 = (_s$goodsListState$edi16 = s.goodsListState.editGood) === null || _s$goodsListState$edi16 === void 0 ? void 0 : _s$goodsListState$edi16.unit) !== null && _s$goodsListState$edi15 !== void 0 ? _s$goodsListState$edi15 : between.unit // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
|
|
27021
27021
|
// taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
|
package/package.json
CHANGED
|
@@ -141,7 +141,7 @@ export const onChangeQuantity = lazyFn(
|
|
|
141
141
|
const lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
|
|
142
142
|
const priceIncludeTax = format15(
|
|
143
143
|
evaluate(`${lineAmountIncludeTax} / ${quantity}`),
|
|
144
|
-
|
|
144
|
+
8
|
|
145
145
|
);
|
|
146
146
|
form.setFieldsValue({ priceIncludeTax });
|
|
147
147
|
await controller.setEditGood({ priceIncludeTax });
|
|
@@ -156,7 +156,7 @@ export const onChangeQuantity = lazyFn(
|
|
|
156
156
|
const lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
|
|
157
157
|
const priceExcludeTax = format15(
|
|
158
158
|
evaluate(`${lineAmountExcludeTax} / ${quantity}`),
|
|
159
|
-
|
|
159
|
+
8
|
|
160
160
|
);
|
|
161
161
|
form.setFieldsValue({ priceExcludeTax });
|
|
162
162
|
await controller.setEditGood({ priceExcludeTax });
|
|
@@ -188,7 +188,7 @@ export const onChangePriceIncludeTax = lazyFn(
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
const calculatingDigits = controller.state.calculatingDigits;
|
|
191
|
-
const priceIncludeTax = format15(values.priceIncludeTax,
|
|
191
|
+
const priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
192
192
|
await controller.setEditGood({ priceIncludeTax });
|
|
193
193
|
form.setFieldsValue({ priceIncludeTax });
|
|
194
194
|
|
|
@@ -232,7 +232,7 @@ export const onChangePriceExcludeTax = lazyFn(
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
const calculatingDigits = controller.state.calculatingDigits;
|
|
235
|
-
const priceExcludeTax = format15(values.priceExcludeTax,
|
|
235
|
+
const priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
236
236
|
await controller.setEditGood({ priceExcludeTax });
|
|
237
237
|
form.setFieldsValue({ priceExcludeTax });
|
|
238
238
|
|
|
@@ -284,11 +284,11 @@ export const onChangeLineAmountIncludeTax = lazyFn(
|
|
|
284
284
|
// 是否有数量
|
|
285
285
|
if (!err.quantity && values.quantity) {
|
|
286
286
|
const quantity = format15(values.quantity, calculatingDigits);
|
|
287
|
-
const priceIncludeTax = format15(evaluate(`${lineAmountIncludeTax} / ${quantity}`),
|
|
287
|
+
const priceIncludeTax = format15(evaluate(`${lineAmountIncludeTax} / ${quantity}`), 8);
|
|
288
288
|
form.setFieldsValue({ priceIncludeTax });
|
|
289
289
|
await controller.setEditGood({ priceIncludeTax });
|
|
290
290
|
} else if (!err.priceIncludeTax && (values.priceIncludeTax || values.priceIncludeTax === 0)) {
|
|
291
|
-
const priceIncludeTax = format15(values.priceIncludeTax,
|
|
291
|
+
const priceIncludeTax = format15(values.priceIncludeTax, 8);
|
|
292
292
|
const quantity = format15(evaluate(`${lineAmountIncludeTax} / ${priceIncludeTax}`), calculatingDigits);
|
|
293
293
|
form.setFieldsValue({ quantity });
|
|
294
294
|
await controller.setEditGood({ quantity });
|
|
@@ -324,11 +324,11 @@ export const onChangeLineAmountExcludeTax = lazyFn(
|
|
|
324
324
|
// 是否有数量
|
|
325
325
|
if (!err.quantity && values.quantity) {
|
|
326
326
|
const quantity = format15(values.quantity, calculatingDigits);
|
|
327
|
-
const priceExcludeTax = format15(evaluate(`${lineAmountExcludeTax} / ${quantity}`),
|
|
327
|
+
const priceExcludeTax = format15(evaluate(`${lineAmountExcludeTax} / ${quantity}`), 8);
|
|
328
328
|
form.setFieldsValue({ priceExcludeTax });
|
|
329
329
|
await controller.setEditGood({ priceExcludeTax });
|
|
330
330
|
} else if (!err.priceExcludeTax && values.priceExcludeTax) {
|
|
331
|
-
const priceExcludeTax = format15(values.priceExcludeTax,
|
|
331
|
+
const priceExcludeTax = format15(values.priceExcludeTax, 8);
|
|
332
332
|
const quantity = format15(evaluate(`${lineAmountExcludeTax} / ${priceExcludeTax}`), calculatingDigits);
|
|
333
333
|
form.setFieldsValue({ quantity });
|
|
334
334
|
await controller.setEditGood({ quantity });
|
|
@@ -491,7 +491,7 @@ export const updateUnitPriceTax = async (controller: InvoiceController, form: Wr
|
|
|
491
491
|
// 单价(含税) = 金额(含税) / (數量)
|
|
492
492
|
// 是否有数量
|
|
493
493
|
if (!err.quantity && values.quantity) {
|
|
494
|
-
const priceIncludeTax = format15(evaluate(`${lineAmountIncludeTax} / ${values.quantity}`),
|
|
494
|
+
const priceIncludeTax = format15(evaluate(`${lineAmountIncludeTax} / ${values.quantity}`), 8);
|
|
495
495
|
await controller.setEditGood({ priceIncludeTax });
|
|
496
496
|
}
|
|
497
497
|
|
|
@@ -649,7 +649,7 @@ export const onChangeSwitchTax = async (controller: InvoiceController, isTaxIncl
|
|
|
649
649
|
needRefresh = true;
|
|
650
650
|
}
|
|
651
651
|
const quantity: any = format15(sourceQuantity, calculatingDigits);
|
|
652
|
-
const priceIncludeTax: any = format15(sourcePriceIncludeTax,
|
|
652
|
+
const priceIncludeTax: any = format15(sourcePriceIncludeTax, 8);
|
|
653
653
|
|
|
654
654
|
const lineAmountIncludeTax: any = format2(evaluate(`${priceIncludeTax} * ${quantity}`));
|
|
655
655
|
const taxAmount: any = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate as any);
|
|
@@ -674,11 +674,11 @@ export const onChangeSwitchTax = async (controller: InvoiceController, isTaxIncl
|
|
|
674
674
|
needRefresh = true;
|
|
675
675
|
}
|
|
676
676
|
const quantity: any = format15(sourceQuantity, calculatingDigits);
|
|
677
|
-
const priceExcludeTax: any = format15(sourcePriceExcludeTax,
|
|
677
|
+
const priceExcludeTax: any = format15(sourcePriceExcludeTax, 8);
|
|
678
678
|
|
|
679
679
|
const lineAmountExcludeTax: any = format2(evaluate(`${priceExcludeTax} * ${quantity}`));
|
|
680
680
|
const lineAmountIncludeTax: any = format2(evaluate(`${lineAmountExcludeTax} * (1+(${taxRate}/100))`));
|
|
681
|
-
const priceIncludeTax: any = format15(evaluate(`${lineAmountIncludeTax} / ${quantity}`),
|
|
681
|
+
const priceIncludeTax: any = format15(evaluate(`${lineAmountIncludeTax} / ${quantity}`), 8);
|
|
682
682
|
const taxAmount: any = evaluate(`${lineAmountIncludeTax} - ${lineAmountExcludeTax}`);
|
|
683
683
|
|
|
684
684
|
return {
|
|
@@ -49,8 +49,8 @@ const DrawerBody = () => {
|
|
|
49
49
|
|
|
50
50
|
// const [editGood] = React.useState(controller.state.goodsListState.editGood);
|
|
51
51
|
|
|
52
|
-
React.useEffect(() => { controller.getGoodsList && controller.getGoodsList({ pagination: { current: 1 } }) }, [controller]);
|
|
53
|
-
const
|
|
52
|
+
React.useEffect(() => { controller.getGoodsList && controller.getGoodsList({ pagination: { current: 1 } }) }, [controller]);
|
|
53
|
+
const roundTo8Decimals = (num:number) => Math.round(num * 1e8) / 1e8;
|
|
54
54
|
return (
|
|
55
55
|
<Table
|
|
56
56
|
bordered
|
|
@@ -96,8 +96,8 @@ const DrawerBody = () => {
|
|
|
96
96
|
itemModelNameSelf:s.goodsListState.editGood?.itemModelNameSelf ?? between.itemModelNameSelf,
|
|
97
97
|
lineAmountExcludeTax:s.goodsListState.editGood?.lineAmountExcludeTax ?? between.lineAmountExcludeTax,
|
|
98
98
|
lineAmountIncludeTax:s.goodsListState.editGood?.lineAmountIncludeTax ?? between.lineAmountIncludeTax,
|
|
99
|
-
priceExcludeTax:
|
|
100
|
-
priceIncludeTax:
|
|
99
|
+
priceExcludeTax:roundTo8Decimals(s.goodsListState.editGood?.priceExcludeTax ?? between.priceExcludeTax),
|
|
100
|
+
priceIncludeTax:roundTo8Decimals(s.goodsListState.editGood?.priceIncludeTax ?? between.priceIncludeTax),
|
|
101
101
|
quantity:s.goodsListState.editGood?.quantity ?? between.quantity,
|
|
102
102
|
unit:s.goodsListState.editGood?.unit ?? between.unit,
|
|
103
103
|
// serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
|