Merge pull request #19074 from atm-maxime/fix_expense_report_rules2
Fix expense report warning display + translations
This commit is contained in:
commit
0562744fd3
@ -2196,7 +2196,7 @@ if ($action == 'create') {
|
||||
print '</td>';
|
||||
|
||||
print '<td class="nowrap right">';
|
||||
print !empty($line->rule_warning_message) ? img_info(html_entity_decode($line->rule_warning_message)) : ' ';
|
||||
print !empty($line->rule_warning_message) ? img_warning(html_entity_decode($line->rule_warning_message)) : ' ';
|
||||
print '</td>';
|
||||
|
||||
// Ajout des boutons de modification/suppression
|
||||
|
||||
@ -1912,12 +1912,12 @@ class ExpenseReport extends CommonObject
|
||||
$this->errors[] = $this->error;
|
||||
|
||||
$new_current_total_ttc -= $amount_to_test - $rule->amount; // ex, entered 16€, limit 12€, subtracts 4€;
|
||||
$rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationError', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency), $langs->trans('by'.$rule->code_expense_rules_type, price($new_current_total_ttc, 0, $langs, 1, -1, -1, $conf->currency)));
|
||||
$rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationError', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency));
|
||||
} else {
|
||||
$this->error = 'ExpenseReportConstraintViolationWarning';
|
||||
$this->errors[] = $this->error;
|
||||
|
||||
$rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationWarning', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency), $langs->trans('nolimitby'.$rule->code_expense_rules_type));
|
||||
$rule_warning_message_tab[] = $langs->trans('ExpenseReportConstraintViolationWarning', $rule->id, price($amount_to_test, 0, $langs, 1, -1, -1, $conf->currency), price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency));
|
||||
}
|
||||
|
||||
// No break, we sould test if another rule is violated
|
||||
|
||||
@ -112,7 +112,7 @@ ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ?
|
||||
ExpenseReportsIk=Configuration of mileage charges
|
||||
ExpenseReportsRules=Expense report rules
|
||||
ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. <b>d</b> is the distance in kilometers
|
||||
ExpenseReportRulesDesc=You can create or update any rules of calculation. This part will be used when user will create a new expense report
|
||||
ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report
|
||||
expenseReportOffset=Offset
|
||||
expenseReportCoef=Coefficient
|
||||
expenseReportTotalForFive=Example with <u>d</u> = 5
|
||||
@ -127,19 +127,19 @@ ExpenseReportDomain=Domain to apply
|
||||
ExpenseReportLimitOn=Limit on
|
||||
ExpenseReportDateStart=Date start
|
||||
ExpenseReportDateEnd=Date end
|
||||
ExpenseReportLimitAmount=Limite amount
|
||||
ExpenseReportRestrictive=Restrictive
|
||||
ExpenseReportLimitAmount=Max amount
|
||||
ExpenseReportRestrictive=Exceeding forbidden
|
||||
AllExpenseReport=All type of expense report
|
||||
OnExpense=Expense line
|
||||
ExpenseReportRuleSave=Expense report rule saved
|
||||
ExpenseReportRuleErrorOnSave=Error: %s
|
||||
RangeNum=Range %d
|
||||
ExpenseReportConstraintViolationError=Constraint violation id [%s]: %s is superior to %s %s
|
||||
ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden)
|
||||
byEX_DAY=by day (limitation to %s)
|
||||
byEX_MON=by month (limitation to %s)
|
||||
byEX_YEA=by year (limitation to %s)
|
||||
byEX_EXP=by line (limitation to %s)
|
||||
ExpenseReportConstraintViolationWarning=Constraint violation id [%s]: %s is superior to %s %s
|
||||
ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized)
|
||||
nolimitbyEX_DAY=by day (no limitation)
|
||||
nolimitbyEX_MON=by month (no limitation)
|
||||
nolimitbyEX_YEA=by year (no limitation)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user