diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index f7c9a84c5d1..09b7f66473d 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -145,7 +145,10 @@ if ($action == 'updateMask') { $draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha'); $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0) { + $amounts = GETPOST('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', 'int'); + $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', intval($amounts), 'chaine', 0, '', $conf->entity); + + if (!$res1 > 0 || !$res2 > 0 || !$res3 > 0) { $error++; } @@ -458,6 +461,11 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm print ''; print ''."\n"; +print ''; +print $langs->trans('ForceExpenseReportsLineAmountsIncludingTaxesOnly'); +print ''; +print $form->selectyesno('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? 0 : 1, 1); +print ''; print ''; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index f982b046793..9bc2197055d 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1565,6 +1565,8 @@ if ($action == 'create') { print ''; } else { + $taxlessUnitPriceDisabled = ! empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? ' disabled' : ''; + print dol_get_fiche_head($head, 'card', $langs->trans("ExpenseReport"), -1, 'trip'); // Clone confirmation @@ -2281,7 +2283,7 @@ if ($action == 'create') { // Unit price print ''; - print ''; + print ''; print ''; // Unit price with tax @@ -2460,7 +2462,7 @@ if ($action == 'create') { // Unit price net print ''; - print ''; + print ''; print ''; // Unit price with tax diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 0e8e39e6600..d33aad11c64 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -517,6 +517,7 @@ Field=Field ProductDocumentTemplates=Document templates to generate product document FreeLegalTextOnExpenseReports=Free legal text on expense reports WatermarkOnDraftExpenseReports=Watermark on draft expense reports +ForceExpenseReportsLineAmountsIncludingTaxesOnly=Force expense report amounts to be input only including taxes AttachMainDocByDefault=Set this to 1 if you want to attach main document to email by default (if applicable) FilesAttachedToEmail=Attach file SendEmailsReminders=Send agenda reminders by emails