PlatformOrder create: default renewal remark from subscription
This commit is contained in:
@@ -65,6 +65,12 @@ class PlatformOrderController extends Controller
|
||||
if ((int) ($defaults['plan_id'] ?? 0) <= 0) {
|
||||
$defaults['plan_id'] = (int) ($siteSubscription->plan_id ?? 0);
|
||||
}
|
||||
|
||||
// 续费默认备注:若未显式传 remark,自动补齐“来自订阅:{subscription_no}”用于追溯/检索。
|
||||
if ((string) ($defaults['order_type'] ?? '') === 'renewal' && trim((string) ($defaults['remark'] ?? '')) === '') {
|
||||
$remarkPrefix = (string) config('saasshop.platform_orders.renewal_order_remark_prefix', '来自订阅:');
|
||||
$defaults['remark'] = $remarkPrefix . (string) $siteSubscription->subscription_no;
|
||||
}
|
||||
}
|
||||
|
||||
return view('admin.platform_orders.form', [
|
||||
|
||||
Reference in New Issue
Block a user