kts-component-invoice-operate 3.2.109 → 3.2.110
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
|
@@ -1459,12 +1459,14 @@ function countQuantity(amount, price, calculatingDigits) {
|
|
|
1459
1459
|
/** 不用可续计数法 */
|
|
1460
1460
|
|
|
1461
1461
|
function onScientificNotation(e, fractionDigits) {
|
|
1462
|
-
debugger;
|
|
1463
1462
|
var arr = e.toFixed(fractionDigits).split('');
|
|
1464
1463
|
|
|
1465
1464
|
for (; arr.length > 0;) {
|
|
1466
|
-
if (arr[arr.length - 1] === '0'
|
|
1465
|
+
if (arr[arr.length - 1] === '0') {
|
|
1467
1466
|
arr.pop();
|
|
1467
|
+
} else if (arr[arr.length - 1] === '.') {
|
|
1468
|
+
arr.pop();
|
|
1469
|
+
return arr.join('');
|
|
1468
1470
|
} else {
|
|
1469
1471
|
return arr.join('');
|
|
1470
1472
|
}
|
package/dist/index.js
CHANGED
|
@@ -1469,12 +1469,14 @@ function countQuantity(amount, price, calculatingDigits) {
|
|
|
1469
1469
|
/** 不用可续计数法 */
|
|
1470
1470
|
|
|
1471
1471
|
function onScientificNotation(e, fractionDigits) {
|
|
1472
|
-
debugger;
|
|
1473
1472
|
var arr = e.toFixed(fractionDigits).split('');
|
|
1474
1473
|
|
|
1475
1474
|
for (; arr.length > 0;) {
|
|
1476
|
-
if (arr[arr.length - 1] === '0'
|
|
1475
|
+
if (arr[arr.length - 1] === '0') {
|
|
1477
1476
|
arr.pop();
|
|
1477
|
+
} else if (arr[arr.length - 1] === '.') {
|
|
1478
|
+
arr.pop();
|
|
1479
|
+
return arr.join('');
|
|
1478
1480
|
} else {
|
|
1479
1481
|
return arr.join('');
|
|
1480
1482
|
}
|
package/package.json
CHANGED
|
@@ -111,11 +111,12 @@ export function countQuantity(amount: string | number, price: string | number, c
|
|
|
111
111
|
|
|
112
112
|
/** 不用可续计数法 */
|
|
113
113
|
function onScientificNotation(e: number, fractionDigits: number) {
|
|
114
|
-
debugger;
|
|
115
114
|
const arr = e.toFixed(fractionDigits).split('');
|
|
116
115
|
for (; arr.length > 0;) {
|
|
117
|
-
if (arr[arr.length - 1] === '0'
|
|
116
|
+
if (arr[arr.length - 1] === '0') {
|
|
118
117
|
arr.pop();
|
|
118
|
+
} else if (arr[arr.length - 1] === '.') {
|
|
119
|
+
arr.pop(); return arr.join('');
|
|
119
120
|
} else {
|
|
120
121
|
return arr.join('');
|
|
121
122
|
}
|