Debug split of payment salary into salary + payment
This commit is contained in:
parent
aee6d78928
commit
dfb791837c
@ -122,6 +122,10 @@ foreach ($object->fields as $key => $val) {
|
|||||||
if (GETPOST('search_'.$key, 'alpha') !== '') {
|
if (GETPOST('search_'.$key, 'alpha') !== '') {
|
||||||
$search[$key] = GETPOST('search_'.$key, 'alpha');
|
$search[$key] = GETPOST('search_'.$key, 'alpha');
|
||||||
}
|
}
|
||||||
|
if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||||
|
$search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int'));
|
||||||
|
$search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of fields to search into when doing a "search in all"
|
// List of fields to search into when doing a "search in all"
|
||||||
@ -132,6 +136,27 @@ foreach ($object->fields as $key => $val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Definition of array of fields for columns
|
||||||
|
$arrayfields = array();
|
||||||
|
foreach ($object->fields as $key => $val) {
|
||||||
|
// If $val['visible']==0, then we never show the field
|
||||||
|
if (!empty($val['visible'])) {
|
||||||
|
$visible = (int) dol_eval($val['visible'], 1);
|
||||||
|
$arrayfields['t.'.$key] = array(
|
||||||
|
'label'=>$val['label'],
|
||||||
|
'checked'=>(($visible < 0) ? 0 : 1),
|
||||||
|
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
|
||||||
|
'position'=>$val['position'],
|
||||||
|
'help'=>$val['help']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Extra fields
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||||
|
|
||||||
|
$object->fields = dol_sort_array($object->fields, 'position');
|
||||||
|
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||||
|
|
||||||
$permissiontoread = $user->rights->salaries->read;
|
$permissiontoread = $user->rights->salaries->read;
|
||||||
$permissiontoadd = $user->rights->salaries->write;
|
$permissiontoadd = $user->rights->salaries->write;
|
||||||
$permissiontodelete = $user->rights->salaries->delete;
|
$permissiontodelete = $user->rights->salaries->delete;
|
||||||
@ -624,12 +649,14 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
|||||||
|
|
||||||
// If no record found
|
// If no record found
|
||||||
if ($num == 0) {
|
if ($num == 0) {
|
||||||
$colspan = 1;
|
/*$colspan = 1;
|
||||||
foreach ($arrayfields as $key => $val) {
|
foreach ($arrayfields as $key => $val) {
|
||||||
if (!empty($val['checked'])) {
|
if (!empty($val['checked'])) {
|
||||||
$colspan++;
|
$colspan++;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
$colspan = 9;
|
||||||
|
if (!empty($conf->banque->enabled)) { $colspan++; }
|
||||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user