This commit is contained in:
Your Name
2026-06-04 09:25:00 +08:00
parent 6b528c34c8
commit 5ab3be1fdd
7 changed files with 361 additions and 64 deletions
@@ -351,11 +351,17 @@ class PrescriptionOrderController extends BaseAdminController
public function refund()
{
$params = (new PrescriptionOrderValidate())->post()->goCheck('refund');
$rawRefundAmount = $params['refund_amount'] ?? null;
$refundAmount = ($rawRefundAmount === null || $rawRefundAmount === '')
? null
: round((float) $rawRefundAmount, 2);
$result = PrescriptionOrderLogic::refund(
(int) $params['id'],
(string) ($params['reason'] ?? ''),
$this->adminId,
$this->adminInfo
$this->adminInfo,
$refundAmount
);
if ($result === false) {
return $this->fail(PrescriptionOrderLogic::getError());