mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don’t allow both types of inclusive tax rates
This commit is contained in:
parent
65369399bb
commit
bc63c2c503
@ -495,6 +495,7 @@ class AccountController extends BaseController
|
|||||||
'title' => trans('texts.tax_rates'),
|
'title' => trans('texts.tax_rates'),
|
||||||
'taxRates' => TaxRate::scope()->whereIsInclusive(false)->get(),
|
'taxRates' => TaxRate::scope()->whereIsInclusive(false)->get(),
|
||||||
'countInvoices' => Invoice::scope()->withTrashed()->count(),
|
'countInvoices' => Invoice::scope()->withTrashed()->count(),
|
||||||
|
'hasInclusiveTaxRates' => TaxRate::scope()->whereIsInclusive(true)->count() ? true : false,
|
||||||
];
|
];
|
||||||
|
|
||||||
return View::make('accounts.tax_rates', $data);
|
return View::make('accounts.tax_rates', $data);
|
||||||
|
@ -27,7 +27,7 @@ class TaxRateDatatable extends EntityDatatable
|
|||||||
'type',
|
'type',
|
||||||
function ($model) {
|
function ($model) {
|
||||||
if (auth()->user()->account->inclusive_taxes) {
|
if (auth()->user()->account->inclusive_taxes) {
|
||||||
return trans('texts.standard');
|
return trans('texts.inclusive');
|
||||||
} else {
|
} else {
|
||||||
return $model->is_inclusive ? trans('texts.inclusive') : trans('texts.exclusive');
|
return $model->is_inclusive ? trans('texts.inclusive') : trans('texts.exclusive');
|
||||||
}
|
}
|
||||||
|
@ -2606,7 +2606,6 @@ $LANG = array(
|
|||||||
'edit_times' => 'Edit Times',
|
'edit_times' => 'Edit Times',
|
||||||
'inclusive_taxes_help' => 'Include <b>taxes in the cost</b>',
|
'inclusive_taxes_help' => 'Include <b>taxes in the cost</b>',
|
||||||
'inclusive_taxes_warning' => 'Warning: existing invoices will need to be resaved',
|
'inclusive_taxes_warning' => 'Warning: existing invoices will need to be resaved',
|
||||||
'standard' => 'Standard',
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
->label(' ')
|
->label(' ')
|
||||||
->value(1) !!}
|
->value(1) !!}
|
||||||
|
|
||||||
@if ($account->inclusive_taxes || $countInvoices <= 10)
|
@if (! $hasInclusiveTaxRates && ($account->inclusive_taxes || $countInvoices <= 10))
|
||||||
{!! Former::checkbox('inclusive_taxes')
|
{!! Former::checkbox('inclusive_taxes')
|
||||||
->text(trans('texts.inclusive_taxes_help'))
|
->text(trans('texts.inclusive_taxes_help'))
|
||||||
->label(' ')
|
->label(' ')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user