mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #5411 from beganovich/v5-1004-show-error-from-api-billing
(v5) Billing: Show message from eligible service
This commit is contained in:
commit
b860dde7c6
@ -111,6 +111,7 @@ class BillingPortalPurchase extends Component
|
||||
'discount_applied' => false,
|
||||
'show_loading_bar' => false,
|
||||
'not_eligible' => null,
|
||||
'not_eligible_message' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
@ -327,6 +328,7 @@ class BillingPortalPurchase extends Component
|
||||
|
||||
if (is_array($is_eligible)) {
|
||||
$this->steps['not_eligible'] = true;
|
||||
$this->steps['not_eligible_message'] = $is_eligible['exception'];
|
||||
$this->steps['show_loading_bar'] = false;
|
||||
|
||||
return;
|
||||
|
@ -59,10 +59,12 @@
|
||||
|
||||
<div class="relative flex justify-center text-sm leading-5">
|
||||
<h1 class="text-2xl font-bold tracking-wide bg-gray-50 px-6 py-0">
|
||||
{{ ctrans('texts.total') }}: {{ \App\Utils\Number::formatMoney($price, $subscription->company) }}
|
||||
{{ ctrans('texts.total') }}
|
||||
: {{ \App\Utils\Number::formatMoney($price, $subscription->company) }}
|
||||
|
||||
@if($steps['discount_applied'])
|
||||
<small class="ml-1 line-through text-gray-500">{{ \App\Utils\Number::formatMoney($subscription->price, $subscription->company) }}</small>
|
||||
<small
|
||||
class="ml-1 line-through text-gray-500">{{ \App\Utils\Number::formatMoney($subscription->price, $subscription->company) }}</small>
|
||||
@endif
|
||||
</h1>
|
||||
</div>
|
||||
@ -208,6 +210,10 @@
|
||||
|
||||
@if($steps['not_eligible'] && !is_null($steps['not_eligible']))
|
||||
<h1>{{ ctrans('texts.payment_error') }}</h1>
|
||||
|
||||
@if($steps['not_eligible_message'])
|
||||
<small class="mt-4 block">{{ $steps['not_eligible_message'] }}</small>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user