@pisell/pisellos 0.0.314 → 0.0.315

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.
@@ -3287,8 +3287,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
3287
3287
  return item.status !== 'voided' && item.order_payment_type === 'deposit';
3288
3288
  }).reduce(function (sum, item) {
3289
3289
  var amt = new Decimal(item.amount || '0');
3290
- var rounding = new Decimal(item.rounding_amount || '0').abs();
3291
- return sum.plus(amt).plus(rounding);
3290
+ return sum.plus(amt);
3292
3291
  }, new Decimal(0)).toFixed(2);
3293
3292
  }
3294
3293
  // 如果当前是定金支付,并且定金额度已经大于等于了订单总计,则 finalDepositAmount 为实际付出去的定金金额
@@ -3297,8 +3296,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
3297
3296
  return item.status !== 'voided' && item.order_payment_type === 'deposit';
3298
3297
  }).reduce(function (sum, item) {
3299
3298
  var amt = new Decimal(item.amount || '0');
3300
- var rounding = new Decimal(item.rounding_amount || '0').abs();
3301
- return sum.plus(amt).plus(rounding);
3299
+ return sum.plus(amt);
3302
3300
  }, new Decimal(0)).toFixed(2);
3303
3301
  }
3304
3302
  this.logInfo('定金金额确定结果', {
@@ -2035,15 +2035,13 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
2035
2035
  if (this.store.currentOrder.is_deposit === 0 && processedPaymentItems.some((item) => item.order_payment_type === "deposit")) {
2036
2036
  finalDepositAmount = processedPaymentItems.filter((item) => item.status !== "voided" && item.order_payment_type === "deposit").reduce((sum, item) => {
2037
2037
  const amt = new import_decimal.default(item.amount || "0");
2038
- const rounding = new import_decimal.default(item.rounding_amount || "0").abs();
2039
- return sum.plus(amt).plus(rounding);
2038
+ return sum.plus(amt);
2040
2039
  }, new import_decimal.default(0)).toFixed(2);
2041
2040
  }
2042
2041
  if (this.store.currentOrder.is_deposit === 1 && new import_decimal.default(finalDepositAmount).gte(new import_decimal.default(this.store.currentOrder.total_amount))) {
2043
2042
  finalDepositAmount = processedPaymentItems.filter((item) => item.status !== "voided" && item.order_payment_type === "deposit").reduce((sum, item) => {
2044
2043
  const amt = new import_decimal.default(item.amount || "0");
2045
- const rounding = new import_decimal.default(item.rounding_amount || "0").abs();
2046
- return sum.plus(amt).plus(rounding);
2044
+ return sum.plus(amt);
2047
2045
  }, new import_decimal.default(0)).toFixed(2);
2048
2046
  }
2049
2047
  this.logInfo("定金金额确定结果", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.314",
4
+ "version": "0.0.315",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",