mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01: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'),
|
||||
'taxRates' => TaxRate::scope()->whereIsInclusive(false)->get(),
|
||||
'countInvoices' => Invoice::scope()->withTrashed()->count(),
|
||||
'hasInclusiveTaxRates' => TaxRate::scope()->whereIsInclusive(true)->count() ? true : false,
|
||||
];
|
||||
|
||||
return View::make('accounts.tax_rates', $data);
|
||||
|
@ -27,7 +27,7 @@ class TaxRateDatatable extends EntityDatatable
|
||||
'type',
|
||||
function ($model) {
|
||||
if (auth()->user()->account->inclusive_taxes) {
|
||||
return trans('texts.standard');
|
||||
return trans('texts.inclusive');
|
||||
} else {
|
||||
return $model->is_inclusive ? trans('texts.inclusive') : trans('texts.exclusive');
|
||||
}
|
||||
|
@ -2606,7 +2606,6 @@ $LANG = array(
|
||||
'edit_times' => 'Edit Times',
|
||||
'inclusive_taxes_help' => 'Include <b>taxes in the cost</b>',
|
||||
'inclusive_taxes_warning' => 'Warning: existing invoices will need to be resaved',
|
||||
'standard' => 'Standard',
|
||||
|
||||
);
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
->label(' ')
|
||||
->value(1) !!}
|
||||
|
||||
@if ($account->inclusive_taxes || $countInvoices <= 10)
|
||||
@if (! $hasInclusiveTaxRates && ($account->inclusive_taxes || $countInvoices <= 10))
|
||||
{!! Former::checkbox('inclusive_taxes')
|
||||
->text(trans('texts.inclusive_taxes_help'))
|
||||
->label(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user