mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for subscriptions - allow currency id to be passed through
This commit is contained in:
parent
1196ea8122
commit
3a510ffd4a
@ -263,6 +263,17 @@ class BillingPortalPurchase extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('currency_id', $this->request_data)) {
|
||||||
|
|
||||||
|
$currency = Cache::get('currencies')->filter(function ($item){
|
||||||
|
return $item->id == $this->request_data['currency_id'];
|
||||||
|
})->first();
|
||||||
|
|
||||||
|
if($currency)
|
||||||
|
$data['settings']->currency_id = $currency->id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (array_key_exists('locale', $this->request_data)) {
|
if (array_key_exists('locale', $this->request_data)) {
|
||||||
$request = $this->request_data;
|
$request = $this->request_data;
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'inventory_notification_threshold' => (int) $company->inventory_notification_threshold,
|
'inventory_notification_threshold' => (int) $company->inventory_notification_threshold,
|
||||||
'track_inventory' => (bool) $company->track_inventory,
|
'track_inventory' => (bool) $company->track_inventory,
|
||||||
'enable_applying_payments' => (bool) $company->enable_applying_payments,
|
'enable_applying_payments' => (bool) $company->enable_applying_payments,
|
||||||
'enabled_expense_tax_rates' =. (bool) $company->enabled_expense_tax_rates,
|
'enabled_expense_tax_rates' => (bool) $company->enabled_expense_tax_rates,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
@foreach($subscription->service()->products() as $product)
|
@foreach($subscription->service()->products() as $product)
|
||||||
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
|
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-gray-800">{!! $product->notes !!}</p>
|
<p class="text-sm text-gray-800">{!! nl2br($product->notes) !!}</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-ref="price-and-quantity-container">
|
<div data-ref="price-and-quantity-container">
|
||||||
<span
|
<span
|
||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
@foreach($subscription->service()->recurring_products() as $product)
|
@foreach($subscription->service()->recurring_products() as $product)
|
||||||
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
|
<div class="flex items-center justify-between mb-4 bg-white rounded px-6 py-4 shadow-sm border">
|
||||||
<div class="text-sm">{!! $product->notes !!}</div>
|
<div class="text-sm">{!! nl2br($product->notes) !!}</div>
|
||||||
<div data-ref="price-and-quantity-container">
|
<div data-ref="price-and-quantity-container">
|
||||||
<span
|
<span
|
||||||
data-ref="price">{{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }}</span>
|
data-ref="price">{{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user