fix : coupon

This commit is contained in:
2025-03-31 17:53:50 +08:00
parent e6176f6bbd
commit 337da39157

View File

@@ -419,7 +419,7 @@ trait OrderTrait
// min($this->orderRes['coupon']['amount'], $this->orderRes['good_after_discount_price']) :
// $this->orderRes['coupon']['amount'];
// $this->orderRes['good_after_discount_price'] = bcsub((string)$this->orderRes['good_after_discount_price'],(string)$this->orderRes['favorable_good_price'],2);
$this->orderRes['discount_price'] = min($this->orderRes['coupon']['amount'],$this->orderRes['coupon']['actual_price']);
$this->orderRes['discount_price'] = min($this->orderRes['coupon']['amount'],$this->orderRes['actual_price']);
$this->orderRes['actual_price'] = bcsub((string)$this->orderRes['actual_price'],(string)$this->orderRes['discount_price'],2);
}