From 8bd2efe6488ce5195b4ba62cede99945ec60899c Mon Sep 17 00:00:00 2001 From: IJ Date: Wed, 5 Dec 2018 12:36:46 +0000 Subject: [PATCH 1/2] NEW: Add Hidden Config 'OVERRIDE_VAT_FOR_EXPENSE_REPORT' - Setting constant `OVERRIDE_VAT_FOR_EXPENSE_REPORT` to `1` will allow expense reports to show VAT even if the global VAT setting is off --- htdocs/core/class/html.form.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8ba38b81edb..cb9e9860c46 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4894,8 +4894,11 @@ class Form $disabled=false; $title=''; if (is_object($societe_vendeuse) && $societe_vendeuse->id == $mysoc->id && $societe_vendeuse->tva_assuj == "0") { - $title=' title="'.$langs->trans('VATIsNotUsed').'"'; - $disabled=true; + // Override/enable VAT for expense report regardless of global setting - needed if expense report used for business expenses + if (empty ($conf->global->OVERRIDE_VAT_FOR_EXPENSE_REPORT)) { + $title=' title="'.$langs->trans('VATIsNotUsed').'"'; + $disabled=true; + } } if (! $options_only) $return.= '