Merge pull request #5318 from beganovich/v5-0104-billing-portal

(v5) Billing portal: Show OG price when discount is applied
This commit is contained in:
Benjamin Beganović 2021-04-01 17:03:43 +02:00 committed by GitHub
commit 9ce4a787e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -107,6 +107,7 @@ class BillingPortalPurchase extends Component
'show_start_trial' => false,
'passwordless_login_sent' => false,
'started_payment' => false,
'discount_applied' => false,
];
/**
@ -364,6 +365,7 @@ class BillingPortalPurchase extends Component
{
if ($this->coupon == $this->subscription->promo_code) {
$this->price = $this->subscription->promo_price;
$this->steps['discount_applied'] = true;
}
}

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=696e8203d5e8e7cf5ff5",
"/css/app.css": "/css/app.css?id=9525909664b98602bd2a",
"/css/app.css": "/css/app.css?id=773c78b0cad68d2f1f2e",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=a09bb529b8e1826f13b4",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=8ce8955ba775ea5f47d1",
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=0dc8c34010d09195d2f7",

View File

@ -59,6 +59,10 @@
<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) }}
@if($steps['discount_applied'])
<small class="ml-1 line-through text-gray-500">{{ \App\Utils\Number::formatMoney($subscription->price, $subscription->company) }}</small>
@endif
</h1>
</div>
</div>