Merge pull request #5 from aljawaid/aljawaid-override_vat_expense_report

NEW: Add Hidden Config 'OVERRIDE_VAT_FOR_EXPENSE_REPORT'
This commit is contained in:
IJ 2018-12-05 12:37:52 +00:00 committed by GitHub
commit afca4f558a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.= '<select class="flat minwidth75imp" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$title.'>';