Merge branch 'akaunting:master' into master
This commit is contained in:
commit
25a694f69d
@ -874,8 +874,8 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideName = setting($this->getSettingKey($type, 'hide_item_name'), false)) {
|
||||
return $hideName;
|
||||
if ($hideItemName = setting($this->getSettingKey($type, 'item_name'), false) && $hideItemName == 'hide') {
|
||||
return $hideItemName;
|
||||
}
|
||||
|
||||
$hide = $this->getHideFromConfig($type, 'name');
|
||||
@ -885,7 +885,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_item_name', $hideName);
|
||||
return setting('invoice.item_name', $hideItemName) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getTextItemName($type, $textItemName)
|
||||
@ -925,7 +925,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideItemDescription = setting($this->getSettingKey($type, 'hide_item_description'), false)) {
|
||||
if ($hideItemDescription = setting($this->getSettingKey($type, 'hide_item_description'), false) && $hideItemDescription == 'hide') {
|
||||
return $hideItemDescription;
|
||||
}
|
||||
|
||||
@ -961,7 +961,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideItemQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false)) {
|
||||
if ($hideItemQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false) && $hideItemQuantity == 'hide') {
|
||||
return $hideItemQuantity;
|
||||
}
|
||||
|
||||
@ -972,7 +972,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_quantity', $hideItemQuantity);
|
||||
return setting('invoice.quantity_name', $hideItemQuantity) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getTextItemQuantity($type, $textItemQuantity)
|
||||
@ -1012,7 +1012,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideItemPrice = setting($this->getSettingKey($type, 'hide_price'), false)) {
|
||||
if ($hideItemPrice = setting($this->getSettingKey($type, 'hide_price'), false) && $hideItemPrice == 'hide') {
|
||||
return $hideItemPrice;
|
||||
}
|
||||
|
||||
@ -1023,7 +1023,7 @@ abstract class Form extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_price', $hideItemPrice);
|
||||
return setting('invoice.price_name', $hideItemPrice) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getTextItemPrice($type, $textItemPrice)
|
||||
|
@ -1253,7 +1253,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideName = setting($this->getSettingKey($type, 'hide_item_name'), false)) {
|
||||
if ($hideName = setting($this->getSettingKey($type, 'item_name'), false) && $hideName == 'hide') {
|
||||
return $hideName;
|
||||
}
|
||||
|
||||
@ -1264,7 +1264,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_item_name', $hideName);
|
||||
return setting('invoice.item_name', $hideName) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHideDescription($type, $hideDescription)
|
||||
@ -1295,7 +1295,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false)) {
|
||||
if ($hideQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false) && $hideQuantity == 'hide') {
|
||||
return $hideQuantity;
|
||||
}
|
||||
|
||||
@ -1306,7 +1306,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_quantity', $hideQuantity);
|
||||
return setting('invoice.quantity_name', $hideQuantity) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHidePrice($type, $hidePrice)
|
||||
@ -1316,7 +1316,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hidePrice = setting($this->getSettingKey($type, 'hide_price'), false)) {
|
||||
if ($hidePrice = setting($this->getSettingKey($type, 'hide_price'), false) && $hidePrice == 'hide') {
|
||||
return $hidePrice;
|
||||
}
|
||||
|
||||
@ -1327,7 +1327,7 @@ abstract class Show extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_price', $hidePrice);
|
||||
return setting('invoice.price_name', $hidePrice) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHideDiscount($type, $hideDiscount)
|
||||
|
@ -559,7 +559,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideName = setting($this->getSettingKey($type, 'hide_item_name'), false)) {
|
||||
if ($hideName = setting($this->getSettingKey($type, 'item_name'), false) && $hideName == 'hide') {
|
||||
return $hideName;
|
||||
}
|
||||
|
||||
@ -570,7 +570,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_item_name', $hideName);
|
||||
return setting('invoice.item_name', $hideName) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHideDescription($type, $hideDescription)
|
||||
@ -601,7 +601,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hideQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false)) {
|
||||
if ($hideQuantity = setting($this->getSettingKey($type, 'hide_quantity'), false) && $hideQuantity == 'hide') {
|
||||
return $hideQuantity;
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_quantity', $hideQuantity);
|
||||
return setting('invoice.quantity_name', $hideQuantity) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHidePrice($type, $hidePrice)
|
||||
@ -622,7 +622,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// if you use settting translation
|
||||
if ($hidePrice = setting($this->getSettingKey($type, 'hide_price'), false)) {
|
||||
if ($hidePrice = setting($this->getSettingKey($type, 'hide_price'), false) && $hidePrice == 'hide') {
|
||||
return $hidePrice;
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ abstract class Template extends Component
|
||||
}
|
||||
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_price', $hidePrice);
|
||||
return setting('invoice.price_name', $hidePrice) == 'hide' ? true : false;
|
||||
}
|
||||
|
||||
protected function getHideDiscount($type, $hideDiscount)
|
||||
|
@ -90,6 +90,7 @@ return [
|
||||
'monthly' => 'Monthly',
|
||||
'quarterly' => 'Quarterly',
|
||||
'yearly' => 'Yearly',
|
||||
'lifetime' => 'Lifetime',
|
||||
'add' => 'Add',
|
||||
'add_new' => 'Add New',
|
||||
'add_income' => 'Add Income',
|
||||
|
@ -28,11 +28,13 @@ return [
|
||||
'yearly_pricing' => 'Yearly Pricing',
|
||||
'monthly_price' => 'from :price',
|
||||
'per_month' => 'per month',
|
||||
'billed_yearly' => 'Billed Yearly',
|
||||
'once' => 'once',
|
||||
'billed_monthly' => 'Billed Monthly',
|
||||
'billed_yearly' => 'Billed Yearly',
|
||||
'billed_once' => 'Billed Once',
|
||||
'save_year' => 'You save <strong>:price</strong> a year!',
|
||||
'if_paid_year' => 'Or <strong>:price/mo</strong> if paid yearly',
|
||||
'information_monthly' => 'This option is valid only for <strong>Cloud Service</strong>',
|
||||
'information_monthly' => 'This option is valid only for <a href=":url" target="_blank" class="to-black-400 hover:bg-full-2 bg-no-repeat bg-0-2 bg-0-full bg-gradient-to-b from-transparent transition-backgroundSize"><strong>Cloud Service</strong></a>',
|
||||
'install' => 'Install',
|
||||
'buy_now' => 'Buy Now',
|
||||
'get_api_key' => '<a href=":url" target="_blank" class="text-green">Click here</a> to get your API key.',
|
||||
|
@ -7,9 +7,10 @@
|
||||
</span>
|
||||
</div>
|
||||
@elseif (in_array('onprime', $module->where_to_use))
|
||||
<div x-show="price_type == false" class="text-center text-sm mt-3">
|
||||
<div x-show="price_type == 'monthly'" class="text-center text-sm mt-3">
|
||||
<span style="font-size: 12px;">
|
||||
<span class="text-red">*</span> <x-link href="https://akaunting.com/features/why-akaunting-cloud?utm_source=software&utm_medium=app_show&utm_campaign={{ str_replace('-', '_', $module->slug) }}" target="_blank" override="class">{!! trans('modules.information_monthly') !!}</x-link>
|
||||
<span class="text-red">*</span>
|
||||
{!! trans('modules.information_monthly', ['url' => 'https://akaunting.com/features/why-akaunting-cloud?utm_source=software&utm_medium=app_show&utm_campaign=' . str_replace('-', '_', $module->slug)]) !!}
|
||||
</span>
|
||||
</div>
|
||||
@else
|
||||
|
@ -1,28 +1,12 @@
|
||||
@props(['module'])
|
||||
|
||||
@if ($module->price != '0.0000')
|
||||
<div class="flex gap-2 items-baseline">
|
||||
<div class="flex gap-2 items-baseline cursor-default">
|
||||
{!! $module->price_prefix !!}
|
||||
|
||||
<div x-show="price_type == true">
|
||||
<div x-show="price_type == 'monthly'">
|
||||
@if (! empty($module->is_discount))
|
||||
<del class="text-red">
|
||||
{!! $module->yearly_per_monthly_price !!}
|
||||
</del>
|
||||
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->yearly_per_monthly_special_price !!}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->yearly_per_monthly_price !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div x-show="price_type == false">
|
||||
@if (! empty($module->is_discount))
|
||||
<del class="text-red">
|
||||
<del class="text-red mr-2">
|
||||
{!! $module->monthly_price !!}
|
||||
</del>
|
||||
|
||||
@ -36,11 +20,47 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div x-show="price_type == 'yearly'">
|
||||
@if (! empty($module->is_discount))
|
||||
<del class="text-red mr-2">
|
||||
{!! $module->yearly_per_monthly_price !!}
|
||||
</del>
|
||||
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->yearly_per_monthly_special_price !!}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->yearly_per_monthly_price !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div x-show="price_type == 'lifetime'">
|
||||
@if (! empty($module->is_discount))
|
||||
<del class="text-red mr-2">
|
||||
{!! $module->lifetime_price !!}
|
||||
</del>
|
||||
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->lifetime_special_price !!}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-5xl font-bold text-purple">
|
||||
{!! $module->lifetime_price !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! $module->price_suffix !!}
|
||||
|
||||
<span class="font-thin">
|
||||
<span x-show="price_type != 'lifetime'" class="font-thin">
|
||||
{{ trans('modules.per_month') }}
|
||||
</span>
|
||||
|
||||
<span x-show="price_type == 'lifetime'" class="font-thin lowercase">
|
||||
{{ trans('modules.once') }}
|
||||
</span>
|
||||
</div>
|
||||
@else
|
||||
<span class="text-4xl font-bold text-purple">
|
||||
|
@ -1,20 +1,30 @@
|
||||
<x-form>
|
||||
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4" x-on:click="price_type = ! price_type">
|
||||
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4">
|
||||
<div class="relative" x-model="price_type">
|
||||
<div class="w-36 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
|
||||
<div class="w-58 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
|
||||
<button type="button"
|
||||
x-on:click="price_type = 'monthly'"
|
||||
class="w-18 flex justify-center px-2"
|
||||
x-bind:class="price_type == true ? 'btn-outline-primary' : 'bg-white rounded-lg'"
|
||||
x-bind:class="price_type == 'monthly' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
|
||||
>
|
||||
{{ trans('general.monthly') }}
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
x-on:click="price_type = 'yearly'"
|
||||
class="w-18 flex justify-center px-2"
|
||||
x-bind:class="price_type == false ? 'btn-outline-primary' : 'bg-white rounded-lg'"
|
||||
x-bind:class="price_type == 'yearly' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
|
||||
>
|
||||
{{ trans('general.yearly') }}
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
x-on:click="price_type = 'lifetime'"
|
||||
class="w-18 flex justify-center px-2"
|
||||
x-bind:class="price_type == 'lifetime' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
|
||||
>
|
||||
{{ trans('general.lifetime') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<div class="flex flex-col space-y-16 py-4">
|
||||
<div class="flex flex-col space-y-16 py-4 cursor-default">
|
||||
<div class="flex flex-col lg:flex-row w-full lg:space-x-16 rtl:space-x-reverse space-y-0">
|
||||
<div class="w-full lg:w-7/12 flex flex-col space-x-2 banner">
|
||||
@foreach ($module->files as $file)
|
||||
@ -54,9 +54,9 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-5/12" x-data="{ price_type : true }">
|
||||
<div class="w-full lg:w-5/12" x-data="{ price_type : 'yearly' }">
|
||||
<div class="flex flex-col space-y-6">
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-col cursor-default">
|
||||
<div class="flex flex-col space-y-4">
|
||||
@if ($module->vote)
|
||||
<div class="flex items-center space-x-4">
|
||||
@ -97,11 +97,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (! in_array('onprime', $module->where_to_use))
|
||||
<div class="text-sm line-clamp-1">
|
||||
<div class="text-sm line-clamp-1 cursor-default">
|
||||
{!! ! empty($module->sort_desc) ? $module->sort_desc : strip_tags($module->description) !!}
|
||||
</div>
|
||||
|
||||
@if (! in_array('onprime', $module->where_to_use))
|
||||
@if (! empty($module->cloud_information))
|
||||
{!! $module->cloud_information !!}
|
||||
@else
|
||||
@ -112,10 +112,6 @@
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="text-sm line-clamp-1">
|
||||
{!! ! empty($module->sort_desc) ? $module->sort_desc : strip_tags($module->description) !!}
|
||||
</div>
|
||||
|
||||
<div class="relative flex items-center space-x-4 justify-between">
|
||||
<x-layouts.modules.show.price :module="$module" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user