Debug v16

This commit is contained in:
Laurent Destailleur 2022-04-07 18:16:06 +02:00
parent cbae64f9aa
commit baa4608812
3 changed files with 16 additions and 15 deletions

View File

@ -505,7 +505,7 @@ if (GETPOSTISSET("search_status")) {
if ($search_type > 0) {
$membertype = new AdherentType($db);
$result = $membertype->fetch(GETPOST("type", 'int'));
$result = $membertype->fetch($search_type);
$titre .= " (".$membertype->label.")";
}
@ -767,7 +767,7 @@ if (!empty($arrayfields['d.email']['checked'])) {
}
// End of subscription date
if (!empty($arrayfields['d.datefin']['checked'])) {
print '<td class="liste_titre left">';
print '<td class="liste_titre center">';
$selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
print $form->selectarray('search_filter', $selectarray, $search_filter);
print '</td>';
@ -858,7 +858,7 @@ if (!empty($arrayfields['state.nom']['checked'])) {
print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
}
if (!empty($arrayfields['country.code_iso']['checked'])) {
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (!empty($arrayfields['d.phone']['checked'])) {
print_liste_field_titre($arrayfields['d.phone']['label'], $_SERVER["PHP_SELF"], 'd.phone', '', $param, '', $sortfield, $sortorder);
@ -873,7 +873,7 @@ if (!empty($arrayfields['d.email']['checked'])) {
print_liste_field_titre($arrayfields['d.email']['label'], $_SERVER["PHP_SELF"], 'd.email', '', $param, '', $sortfield, $sortorder);
}
if (!empty($arrayfields['d.datefin']['checked'])) {
print_liste_field_titre($arrayfields['d.datefin']['label'], $_SERVER["PHP_SELF"], 'd.datefin', '', $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['d.datefin']['label'], $_SERVER["PHP_SELF"], 'd.datefin', '', $param, '', $sortfield, $sortorder, 'center ');
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -1110,16 +1110,14 @@ while ($i < min($num, $limit)) {
// End of subscription date
$datefin = $db->jdate($obj->datefin);
if (!empty($arrayfields['d.datefin']['checked'])) {
print '<td class="nowrap center">';
if ($datefin) {
print '<td class="nowrap center">';
print dol_print_date($datefin, 'day');
if ($memberstatic->hasDelay()) {
$textlate = ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')';
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
}
print '</td>';
} else {
print '<td class="nowrap left">';
if (!empty($obj->subscription)) {
print $langs->trans("SubscriptionNotReceived");
if ($obj->statut > 0) {
@ -1128,8 +1126,8 @@ while ($i < min($num, $limit)) {
} else {
print '&nbsp;';
}
print '</td>';
}
print '</td>';
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';

View File

@ -721,7 +721,7 @@ if ($resql) {
if (!empty($arrayfields['cp.statut']['checked'])) {
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
print "</tr>\n";
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
@ -789,21 +789,23 @@ if ($resql) {
}
}
if (!empty($arrayfields['cp.fk_user']['checked'])) {
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td class="tdoverflowmax125">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['cp.fk_validator']['checked'])) {
print '<td class="tdoverflowmax150">'.$approbatorstatic->getNomUrl(-1).'</td>';
print '<td class="tdoverflowmax125">'.$approbatorstatic->getNomUrl(-1).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['cp.fk_type']['checked'])) {
print '<td class="minwidth100">';
$labeltypeleavetoshow = ($langs->trans($typeleaves[$obj->fk_type]['code']) != $typeleaves[$obj->fk_type]['code'] ? $langs->trans($typeleaves[$obj->fk_type]['code']) : $typeleaves[$obj->fk_type]['label']);
print empty($typeleaves[$obj->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved", $obj->fk_type) : $labeltypeleavetoshow;
$labeltypeleavetoshow = empty($typeleaves[$obj->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved", $obj->fk_type) : $labeltypeleavetoshow;
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($labeltypeleavetoshow).'">';
print $labeltypeleavetoshow;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -813,7 +815,8 @@ if ($resql) {
print '<td class="right">';
$nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday); // user jdate(..., 1) because num_open_day need UTC dates
$totalduration += $nbopenedday;
print $nbopenedday.' '.$langs->trans('DurationDays');
print $nbopenedday;
//print ' '.$langs->trans('DurationDays');
print '</td>';
if (!$i) {
$totalarray['nbfield']++;

View File

@ -235,7 +235,7 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) {
print '<tr class="oddeven">';
print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
print '<td class="tdoverflowmax125">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($langs->trans($typeleaves[$obj->fk_type]['code'])).'">'.dol_escape_htmltag($langs->trans($typeleaves[$obj->fk_type]['code'])).'</td>';
$starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';