@pisell/pisellos 0.0.308 → 0.0.309

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.
@@ -795,7 +795,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
795
795
  // 需要减去已经同步给后端的支付过的钱
796
796
  syncedAmount = activePayments.reduce(function (sum, p) {
797
797
  var amt = new Decimal(p.amount || '0');
798
- var rounding = new Decimal(p.rounding_amount || '0');
798
+ var rounding = new Decimal(p.rounding_amount || '0').abs();
799
799
  return sum.plus(amt).plus(rounding);
800
800
  }, new Decimal(0));
801
801
  remainingExpectAmount = Decimal.max(0, totalAmount.minus(syncedAmount)).toFixed(2);
@@ -524,7 +524,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
524
524
  });
525
525
  const syncedAmount = activePayments.reduce((sum, p) => {
526
526
  const amt = new import_decimal.default(p.amount || "0");
527
- const rounding = new import_decimal.default(p.rounding_amount || "0");
527
+ const rounding = new import_decimal.default(p.rounding_amount || "0").abs();
528
528
  return sum.plus(amt).plus(rounding);
529
529
  }, new import_decimal.default(0));
530
530
  const remainingExpectAmount = import_decimal.default.max(0, totalAmount.minus(syncedAmount)).toFixed(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.308",
4
+ "version": "0.0.309",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",