mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-10 11:50:37 +00:00
0元退款报错问题修复
This commit is contained in:
parent
21e0723cfd
commit
9ad9f88b8f
@ -57,7 +57,13 @@ class RefundOrder extends AuthController
|
||||
/**
|
||||
* 订单详情
|
||||
* @param $uni
|
||||
* @return mixed
|
||||
* @return \think\Response
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/03/02
|
||||
*/
|
||||
public function getRefundInfo($uni)
|
||||
{
|
||||
@ -163,12 +169,12 @@ class RefundOrder extends AuthController
|
||||
return app('json')->fail(400147);
|
||||
}
|
||||
$refund_price = $data['refund_price'];
|
||||
}
|
||||
|
||||
$data['refunded_price'] = bcadd($data['refund_price'], $orderRefund['refunded_price'], 2);
|
||||
$bj = bccomp((string)$orderRefund['refund_price'], (string)$data['refunded_price'], 2);
|
||||
if ($bj < 0) {
|
||||
return app('json')->fail(400148);
|
||||
}
|
||||
$data['refunded_price'] = bcadd($data['refund_price'], $orderRefund['refunded_price'], 2);
|
||||
$bj = bccomp((string)$orderRefund['refund_price'], (string)$data['refunded_price'], 2);
|
||||
if ($bj < 0) {
|
||||
return app('json')->fail(400148);
|
||||
}
|
||||
|
||||
unset($data['type']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user