feat: subscription row renew link prefill remark quantity
This commit is contained in:
@@ -190,9 +190,12 @@
|
||||
@endphp
|
||||
<a href="{!! $subShowUrl !!}">{{ $subscription->subscription_no }}</a>
|
||||
@php
|
||||
$remarkPrefix = (string) config('saasshop.platform_orders.renewal_order_remark_prefix', '来自订阅:');
|
||||
$q = [
|
||||
'order_type' => 'renewal',
|
||||
'site_subscription_id' => $subscription->id,
|
||||
'quantity' => 1,
|
||||
'remark' => $remarkPrefix . $subscription->subscription_no,
|
||||
'back' => $back,
|
||||
];
|
||||
if ((int) ($subscription->merchant_id ?? 0) > 0) {
|
||||
|
||||
@@ -84,6 +84,8 @@ class AdminSiteSubscriptionIndexRowRenewOrderLinkTest extends TestCase
|
||||
&& (string) ($q['site_subscription_id'] ?? '') === (string) $sub->id
|
||||
&& (string) ($q['merchant_id'] ?? '') === (string) $merchant->id
|
||||
&& (string) ($q['plan_id'] ?? '') === (string) $plan->id
|
||||
&& (string) ($q['quantity'] ?? '') === '1'
|
||||
&& str_contains((string) ($q['remark'] ?? ''), $sub->subscription_no)
|
||||
&& (string) ($q['back'] ?? '') === $selfWithoutBack) {
|
||||
$found = true;
|
||||
// 防 back 嵌套
|
||||
|
||||
Reference in New Issue
Block a user