mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-08 12:58:11 +08:00
fix: 优化支付剩余统计
This commit is contained in:
parent
9d231881d7
commit
10d90e9fb2
@ -442,8 +442,7 @@ abstract class Payment
|
|||||||
*/
|
*/
|
||||||
public static function leaveAmount(string $orderNo, $orderAmount): float
|
public static function leaveAmount(string $orderNo, $orderAmount): float
|
||||||
{
|
{
|
||||||
$diff = round(round(floatval($orderAmount), 2) - self::paidAmount($orderNo, true), 2);
|
return round(max(floatval($orderAmount) - self::paidAmount($orderNo, true), 0), 2);
|
||||||
return $diff > 0 ? $diff : 0.00;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user