Uniformize code
This commit is contained in:
parent
e22e243bc5
commit
87c49366d8
@ -738,30 +738,37 @@ if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
$warnornote='';
|
||||
if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote.=img_warning($langs->trans("Late"));
|
||||
if (! empty($obj->note_private))
|
||||
{
|
||||
print ' <span class="note">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/propal/note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
|
||||
print '</span>';
|
||||
$warnornote.=($warnornote?' ':'');
|
||||
$warnornote.= '<span class="note">';
|
||||
$warnornote.= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
|
||||
$warnornote.= '</span>';
|
||||
}
|
||||
if ($warnornote)
|
||||
{
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
print $warnornote;
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
@ -134,13 +135,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$interventionstatic=new Fichinter($db);
|
||||
$formfile = new FormFile($db);
|
||||
$objectstatic=new Fichinter($db);
|
||||
|
||||
llxHeader('', $langs->trans("Intervention"));
|
||||
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql.= " f.ref, f.rowid as fichid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update,";
|
||||
$sql.= " f.ref, f.rowid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,";
|
||||
if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " fd.description as descriptiondetail, fd.date as dp, fd.duree,";
|
||||
$sql.= " s.nom as name, s.rowid as socid, s.client";
|
||||
// Add fields from extrafields
|
||||
@ -352,7 +354,7 @@ if ($result)
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$liststatus=$interventionstatic->statuts_short;
|
||||
$liststatus=$objectstatic->statuts_short;
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
@ -372,16 +374,45 @@ if ($result)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$interventionstatic->id=$obj->fichid;
|
||||
$interventionstatic->ref=$obj->ref;
|
||||
$interventionstatic->statut=$obj->fk_statut;
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
$objectstatic->statut=$obj->fk_statut;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
if (! empty($arrayfields['f.ref']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $interventionstatic->getNomUrl(1);
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
$warnornote='';
|
||||
//if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->fichinter->warning_delay)) $warnornote.=img_warning($langs->trans("Late"));
|
||||
if (! empty($obj->note_private))
|
||||
{
|
||||
$warnornote.=($warnornote?' ':'');
|
||||
$warnornote.= '<span class="note">';
|
||||
$warnornote.= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
|
||||
$warnornote.= '</span>';
|
||||
}
|
||||
if ($warnornote)
|
||||
{
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
print $warnornote;
|
||||
print '</td>';
|
||||
}
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->fichinter->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
@ -460,7 +491,7 @@ if ($result)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td align="right">'.$interventionstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '<td align="right">'.$objectstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
|
||||
@ -195,8 +195,8 @@ $companystatic=new Societe($db);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = 'SELECT s.rowid, s.nom as name, s.town, s.client, s.code_client,';
|
||||
$sql.= ' p.rowid as supplier_proposalid, p.note_private, p.total_ht, p.ref, p.fk_statut, p.fk_user_author, p.date_valid, p.date_livraison as dp,';
|
||||
$sql = 'SELECT s.rowid as socid, s.nom as name, s.town, s.client, s.code_client,';
|
||||
$sql.= ' p.rowid, p.note_private, p.total_ht, p.ref, p.fk_statut, p.fk_user_author, p.date_valid, p.date_livraison as dp,';
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
$sql.= ' u.login';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'supplier_proposal as p';
|
||||
@ -402,78 +402,85 @@ if ($result)
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
$now = dol_now();
|
||||
$var=!$var;
|
||||
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td class="nowrap">';
|
||||
|
||||
$objectstatic->id=$objp->supplier_proposalid;
|
||||
$objectstatic->ref=$objp->ref;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
if ($objp->fk_statut == 1 && $db->jdate($objp->dfv) < ($now - $conf->supplier_proposal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
if (! empty($objp->note_private))
|
||||
// Warning
|
||||
$warnornote='';
|
||||
if ($obj->fk_statut == 1 && $db->jdate($obj->date_valid) < ($now - $conf->supplier_proposal->warning_delay)) $warnornote.=img_warning($langs->trans("Late"));
|
||||
if (! empty($obj->note_private))
|
||||
{
|
||||
print ' <span class="note">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$objp->supplier_proposalid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
|
||||
print '</span>';
|
||||
$warnornote.=($warnornote?' ':'');
|
||||
$warnornote.= '<span class="note">';
|
||||
$warnornote.= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
|
||||
$warnornote.= '</span>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Ref
|
||||
if ($warnornote)
|
||||
{
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
print $warnornote;
|
||||
print '</td>';
|
||||
}
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->supplier_proposal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->supplier_proposalid;
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->supplier_proposal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
$url = DOL_URL_ROOT.'/comm/card.php?socid='.$objp->rowid;
|
||||
$url = DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid;
|
||||
|
||||
// Company
|
||||
$companystatic->id=$objp->rowid;
|
||||
$companystatic->name=$objp->name;
|
||||
$companystatic->client=$objp->client;
|
||||
$companystatic->code_client=$objp->code_client;
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->code_client=$obj->code_client;
|
||||
print '<td>';
|
||||
print $companystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->date_valid), 'day');
|
||||
print dol_print_date($db->jdate($obj->date_valid), 'day');
|
||||
print "</td>\n";
|
||||
|
||||
// Date delivery
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->dp), 'day');
|
||||
print dol_print_date($db->jdate($obj->dp), 'day');
|
||||
print "</td>\n";
|
||||
|
||||
print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.price($obj->total_ht)."</td>\n";
|
||||
|
||||
$userstatic->id=$objp->fk_user_author;
|
||||
$userstatic->login=$objp->login;
|
||||
$userstatic->id=$obj->fk_user_author;
|
||||
$userstatic->login=$obj->login;
|
||||
print '<td align="center">';
|
||||
if ($userstatic->id) print $userstatic->getLoginUrl(1);
|
||||
else print ' ';
|
||||
print "</td>\n";
|
||||
|
||||
print '<td align="right">'.$objectstatic->LibStatut($objp->fk_statut,5)."</td>\n";
|
||||
print '<td align="right">'.$objectstatic->LibStatut($obj->fk_statut,5)."</td>\n";
|
||||
|
||||
print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$total += $objp->total_ht;
|
||||
$subtotal += $objp->total_ht;
|
||||
$total += $obj->total_ht;
|
||||
$subtotal += $obj->total_ht;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -1911,12 +1911,11 @@ div.tabsAction > a {
|
||||
|
||||
a.tabTitle {
|
||||
color:rgba(0,0,0,.5) !important;
|
||||
margin-right:10px;
|
||||
text-shadow:1px 1px 1px #ffffff;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal !important;
|
||||
padding: 4px 6px 2px 6px;
|
||||
margin: 0px 6px;
|
||||
padding: 4px 6px 2px 0px;
|
||||
margin-right: 10px;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@ -2829,7 +2828,7 @@ div.tabBar .noborder {
|
||||
margin-bottom: 8px !important;*/
|
||||
border: 1px solid #CCC;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.boxstats:hover {
|
||||
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
||||
@ -3364,9 +3363,6 @@ li.cal_event { border: none; list-style-type: none; }
|
||||
.cal_event_busy { }
|
||||
.cal_peruserviewname { max-width: 100px; height: 22px; }
|
||||
|
||||
.topmenuimage {
|
||||
background-size: 28px auto;
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Ajax - Liste deroulante de l'autocompletion */
|
||||
@ -4094,10 +4090,13 @@ dl.dropdown {
|
||||
.dropdown dd ul li input[type="checkbox"] {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.dropdown dd ul li a {
|
||||
.dropdown dd ul li a, .dropdown dd ul li span {
|
||||
padding:5px;
|
||||
display:block;
|
||||
}
|
||||
.dropdown dd ul li span {
|
||||
color: #888;
|
||||
}
|
||||
.dropdown dd ul li a:hover {
|
||||
background-color:#fff;
|
||||
}
|
||||
@ -4378,6 +4377,10 @@ img.demothumb {
|
||||
/* CSS style used for small screen */
|
||||
/* ============================================================================== */
|
||||
|
||||
.topmenuimage {
|
||||
background-size: 22px auto;
|
||||
top: 2px;
|
||||
}
|
||||
.imgopensurveywizard
|
||||
{
|
||||
padding: 0 4px 0 4px;
|
||||
@ -4415,7 +4418,7 @@ img.demothumb {
|
||||
font-size: 10px;
|
||||
}
|
||||
.topmenuimage {
|
||||
background-size: 26px auto;
|
||||
background-size: 22px auto;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@ -3990,10 +3990,13 @@ dl.dropdown {
|
||||
.dropdown dd ul li input[type="checkbox"] {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.dropdown dd ul li a {
|
||||
.dropdown dd ul li a, .dropdown dd ul li span {
|
||||
padding:5px;
|
||||
display:block;
|
||||
}
|
||||
.dropdown dd ul li span {
|
||||
color: #888;
|
||||
}
|
||||
.dropdown dd ul li a:hover {
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user