|
|
@@ -262,6 +262,7 @@ class ForwardService extends BaseService
|
|
|
|
|
|
// 资金分支(原单 actPrice/tkPrice 不动)
|
|
|
$thirdRefundNo = '';
|
|
|
+ $customBalance = bcadd((string)($custom->balance ?? '0'), '0', 2);
|
|
|
if ($fundType === ForwardClass::FUND_ORIGINAL) {
|
|
|
if (empty($cg)) {
|
|
|
util::fail('无原采购单,无法原路退回');
|
|
|
@@ -270,7 +271,8 @@ class ForwardService extends BaseService
|
|
|
$ghsForward->thirdRefundNo = $thirdRefundNo;
|
|
|
$ghsForward->save(false, ['thirdRefundNo']);
|
|
|
} elseif ($fundType === ForwardClass::FUND_BALANCE) {
|
|
|
- CustomClass::forwardReturnBalance($custom, $ghsForward, $amount);
|
|
|
+ // 返充后最新余额,供前端退款凭证海报展示
|
|
|
+ $customBalance = CustomClass::forwardReturnBalance($custom, $ghsForward, $amount);
|
|
|
}
|
|
|
// FUND_NONE:仅记账,不动作
|
|
|
|
|
|
@@ -338,6 +340,8 @@ class ForwardService extends BaseService
|
|
|
'fundType' => $fundType,
|
|
|
'amount' => $amount,
|
|
|
'customId' => $customId,
|
|
|
+ 'customName' => $custom->name ?? '',
|
|
|
+ 'customBalance' => $customBalance,
|
|
|
'thirdRefundNo' => $thirdRefundNo,
|
|
|
];
|
|
|
}
|