forked from Wavyzz/dolibarr
Merge pull request #20536 from atm-jpb/NEW_Add_class_name_on_expensereport_rule
add class name on tds expensereport rule card
This commit is contained in:
@@ -185,31 +185,31 @@ if ($action != 'edit') {
|
||||
|
||||
echo '<table class="noborder centpercent">';
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<th>' . $langs->trans('ExpenseReportApplyTo') . '</th>';
|
||||
echo '<th>' . $langs->trans('Type') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportLimitOn') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportDateStart') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportDateEnd') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportRestrictive') . '</th>';
|
||||
echo '<tr class="liste_titre headerexpensereportrules">';
|
||||
echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>';
|
||||
echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>';
|
||||
echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>';
|
||||
echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>';
|
||||
echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>';
|
||||
echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
|
||||
echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>';
|
||||
echo '<th> </th>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td>';
|
||||
echo '<div class="float">' . $form->selectarray('apply_to', $tab_apply, '', 0) . '</div>';
|
||||
echo '<div id="user" class="float">' . $form->select_dolusers('', 'fk_user') . '</div>';
|
||||
echo '<div id="group" class="float">' . $form->select_dolgroups('', 'fk_usergroup') . '</div>';
|
||||
echo '<div class="float linecolapplyto">' . $form->selectarray('apply_to', $tab_apply, '', 0) . '</div>';
|
||||
echo '<div id="user" class="float linecoluser">' . $form->select_dolusers('', 'fk_user') . '</div>';
|
||||
echo '<div id="group" class="float linecolgroup">' . $form->select_dolgroups('', 'fk_usergroup') . '</div>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td>' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>';
|
||||
echo '<td>' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . '</td>';
|
||||
echo '<td>' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0) . '</td>';
|
||||
echo '<td>' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . '</td>';
|
||||
echo '<td><input type="text" value="" class="maxwidth100" name="amount" class="amount" /> ' . $conf->currency . '</td>';
|
||||
echo '<td>' . $form->selectyesno('restrictive', 0, 1) . '</td>';
|
||||
echo '<td class="right"><input type="submit" class="button button-add" value="' . $langs->trans('Add') . '" /></td>';
|
||||
echo '<td class="linecoltype">' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>';
|
||||
echo '<td class="linecoltyperule">' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . '</td>';
|
||||
echo '<td class="linecoldatestart">' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0) . '</td>';
|
||||
echo '<td class="linecoldateend>' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . '</td>';
|
||||
echo '<td class="linecolamount"><input type="text" value="" class="maxwidth100" name="amount" class="amount" /> ' . $conf->currency . '</td>';
|
||||
echo '<td class="linecolrestrictive">' . $form->selectyesno('restrictive', 0, 1) . '</td>';
|
||||
echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="' . $langs->trans('Add') . '" /></td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '</table>';
|
||||
@@ -227,21 +227,21 @@ if ($action == 'edit') {
|
||||
|
||||
echo '<table class="noborder centpercent">';
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<th>' . $langs->trans('ExpenseReportApplyTo') . '</th>';
|
||||
echo '<th>' . $langs->trans('Type') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportLimitOn') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportDateStart') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportDateEnd') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
|
||||
echo '<th>' . $langs->trans('ExpenseReportRestrictive') . '</th>';
|
||||
echo '<tr class="liste_titre expensereportrules">';
|
||||
echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>';
|
||||
echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>';
|
||||
echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>';
|
||||
echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>';
|
||||
echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>';
|
||||
echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
|
||||
echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>';
|
||||
echo '<th> </th>';
|
||||
echo '</tr>';
|
||||
|
||||
foreach ($rules as $rule) {
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<tr class="oddeven linetrdata" id="'.$rule->id.'">';
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecolusergroup">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
$selected = ($object->is_for_all > 0) ? 'A' : ($object->fk_usergroup > 0 ? 'G' : 'U');
|
||||
echo '<div class="float">' . $form->selectarray('apply_to', $tab_apply, $selected, 0) . '</div>';
|
||||
@@ -259,7 +259,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecoltype">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
echo $form->selectExpense($object->fk_c_type_fees, 'fk_c_type_fees', 0, 1, 1);
|
||||
} else {
|
||||
@@ -278,7 +278,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecoltyperule">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
echo $form->selectarray('code_expense_rules_type', $tab_rules_type, $object->code_expense_rules_type, 0);
|
||||
} else {
|
||||
@@ -287,7 +287,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecoldatestart">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
print $form->selectDate(strtotime(date('Y-m-d', $object->dates)), 'start', '', '', 0, '', 1, 0);
|
||||
} else {
|
||||
@@ -296,7 +296,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecoldateend">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0);
|
||||
} else {
|
||||
@@ -305,7 +305,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecolamount">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
echo '<input type="text" value="' . price2num($object->amount) . '" name="amount" class="amount" />' . $conf->currency;
|
||||
} else {
|
||||
@@ -314,7 +314,7 @@ foreach ($rules as $rule) {
|
||||
echo '</td>';
|
||||
|
||||
|
||||
echo '<td>';
|
||||
echo '<td class="linecolrestrictive">';
|
||||
if ($action == 'edit' && $object->id == $rule->id) {
|
||||
echo $form->selectyesno('restrictive', $object->restrictive, 1);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user