Look: Améliorations divers sur les listes de contrats
This commit is contained in:
parent
94a80dbb00
commit
936a845d5f
@ -62,7 +62,8 @@ if (! $sortorder) $sortorder="DESC";
|
|||||||
|
|
||||||
|
|
||||||
$sql = "SELECT s.nom, c.rowid as cid, s.idp as sidp, cd.rowid, cd.label, cd.statut, p.rowid as pid,";
|
$sql = "SELECT s.nom, c.rowid as cid, s.idp as sidp, cd.rowid, cd.label, cd.statut, p.rowid as pid,";
|
||||||
$sql .= " ".$db->pdate("cd.date_ouverture")." as date_ouverture";
|
$sql .= " ".$db->pdate("cd.date_ouverture")." as date_ouverture,";
|
||||||
|
$sql .= " ".$db->pdate("cd.date_fin_validite")." as date_fin_validite";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c";
|
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product as p";
|
$sql .= " , ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."contratdet as cd";
|
$sql .= " , ".MAIN_DB_PREFIX."contratdet as cd";
|
||||||
@ -81,16 +82,17 @@ if ($resql)
|
|||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfRunningContractsLines"), $page, "enservice.php", "&sref=$sref&snom=$snom", $sortfield, $sortorder,'',$num);
|
print_barre_liste($langs->trans("ListOfRunningServices"), $page, "enservice.php", "&sref=$sref&snom=$snom", $sortfield, $sortorder,'',$num);
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Contract"),"enservice.php", "c.rowid","","","",$sortfield);
|
print_liste_field_titre($langs->trans("Contract"),"enservice.php", "c.rowid","","","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Status"),"enservice.php", "cd.statut","","","",$sortfield);
|
|
||||||
print_liste_field_titre($langs->trans("Service"),"enservice.php", "p.label","","","",$sortfield);
|
print_liste_field_titre($langs->trans("Service"),"enservice.php", "p.label","","","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Company"),"enservice.php", "s.nom","","","",$sortfield);
|
print_liste_field_titre($langs->trans("Company"),"enservice.php", "s.nom","","","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Date"),"enservice.php", "cd.date_ouverture",'','',' align="center"',$sortfield);
|
print_liste_field_titre($langs->trans("DateStartReal"),"enservice.php", "cd.date_ouverture",'','',' align="center"',$sortfield);
|
||||||
|
print_liste_field_titre($langs->trans("DateEndPlanned"),"enservice.php", "cd.date_fin_validite",'','',' align="center"',$sortfield);
|
||||||
|
print_liste_field_titre($langs->trans("Status"),"enservice.php", "cd.statut","","","",$sortfield);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$now=mktime();
|
$now=mktime();
|
||||||
@ -101,11 +103,11 @@ if ($resql)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="fiche.php?id='.$obj->cid.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a></td>';
|
print '<td><a href="fiche.php?id='.$obj->cid.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a></td>';
|
||||||
print '<td><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></td>';
|
print '<td><a href="../product/fiche.php?id='.$obj->pid.'">'.img_object($langs->trans("ShowService"),"service").' '.dolibarr_trunc($obj->label,20).'</a></td>';
|
||||||
print '<td><a href="../product/fiche.php?id='.$obj->pid.'">'.img_object($langs->trans("ShowService"),"service").' '.$obj->label.'</a></td>';
|
print '<td><a href="../comm/fiche.php?socid='.$obj->sidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>';
|
||||||
print '<td><a href="../comm/fiche.php?socid='.$obj->sidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
|
||||||
print '<td align="center">'.dolibarr_print_date($obj->date_ouverture).'</td>';
|
print '<td align="center">'.dolibarr_print_date($obj->date_ouverture).'</td>';
|
||||||
|
print '<td align="center">'.($obj->date_fin_validite?dolibarr_print_date($obj->date_fin_validite):' ').'</td>';
|
||||||
|
print '<td align="center"><a href="'.DOL_URL_ROOT.'/contrat/ligne.php?id='.$obj->cid.'&ligne='.$obj->rowid.'"><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -650,7 +650,11 @@ else
|
|||||||
if ($objp->fk_product > 0) {
|
if ($objp->fk_product > 0) {
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/contrat/ligne.php?id='.$contrat->id.'&ligne='.$objp->rowid.'">';;
|
print '<a href="'.DOL_URL_ROOT.'/contrat/ligne.php?id='.$contrat->id.'&ligne='.$objp->rowid.'">';;
|
||||||
print '<img src="./statut'.$objp->statut.'.png" border="0" alt="statut"></a></td>';
|
print '<img src="./statut'.$objp->statut.'.png" border="0" alt="statut"></a>';
|
||||||
|
print '</td>';
|
||||||
|
} else {
|
||||||
|
// Si non ligne de service (Ne devrait pas arriver)
|
||||||
|
print '<td> </td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@ -117,8 +117,8 @@ if ( $db->query($sql) )
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->fk_contrat.'</a></td>';
|
print '<td width="50"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->fk_contrat.'</a></td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service").' '.$obj->label.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service").' '.dolibarr_trunc($obj->label,20).'</a></td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->fk_soc.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->fk_soc.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>';
|
||||||
print '<td width="16"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'"><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></a></td>';
|
print '<td width="16"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'"><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
@ -162,8 +162,8 @@ if ( $db->query($sql) )
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->fk_contrat.'</a></td>';
|
print '<td width="50"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->fk_contrat.'</a></td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service").' '.$obj->label.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service").' '.dolibarr_trunc($obj->label,20).'</a></td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->fk_soc.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->fk_soc.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>';
|
||||||
print '<td width="16"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'"><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></a></td>';
|
print '<td width="16"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'"><img src="./statut'.$obj->statut.'.png" border="0" alt="statut"></a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -88,8 +88,8 @@ if ($resql)
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","","",$sortfield);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","",'width="50"',$sortfield);
|
||||||
print_liste_field_titre($langs->trans("NbOfServices"), $_SERVER["PHP_SELF"], "nb","","","",$sortfield);
|
print_liste_field_titre($langs->trans("NbOfServices"), $_SERVER["PHP_SELF"], "nb",'','','width="80"',$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","","",$sortfield);
|
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","","",$sortfield);
|
print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","","",$sortfield);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -103,7 +103,7 @@ if ($resql)
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td><a href=\"fiche.php?id=$obj->cid\">";
|
print "<td><a href=\"fiche.php?id=$obj->cid\">";
|
||||||
print img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a></td>';
|
print img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a></td>';
|
||||||
print '<td>'.$obj->nb.'</td>';
|
print '<td align="center">'.$obj->nb.'</td>';
|
||||||
print '<td><a href="../comm/fiche.php?socid='.$obj->sidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
print '<td><a href="../comm/fiche.php?socid='.$obj->sidp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||||
print '<td>'.dolibarr_print_date($obj->datec).'</td>';
|
print '<td>'.dolibarr_print_date($obj->datec).'</td>';
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ ContractStatusRunning=Running
|
|||||||
ContractStatusClosed=Closed
|
ContractStatusClosed=Closed
|
||||||
Contracts=Contracts
|
Contracts=Contracts
|
||||||
Contract=Contract
|
Contract=Contract
|
||||||
|
MenuRunningServices=Running services
|
||||||
NewContract=New contract
|
NewContract=New contract
|
||||||
AddContract=Add contract
|
AddContract=Add contract
|
||||||
SearchAContract=Search a contract
|
SearchAContract=Search a contract
|
||||||
@ -23,6 +24,7 @@ DateServiceStart=Date for beginning of service
|
|||||||
DateServiceEnd=Date for end of service
|
DateServiceEnd=Date for end of service
|
||||||
ShowContract=Show contract
|
ShowContract=Show contract
|
||||||
ListOfRunningContractsLines=List of running contract lines
|
ListOfRunningContractsLines=List of running contract lines
|
||||||
|
ListOfRunningServices=List of running services
|
||||||
NotActivatedServices=Not activated services
|
NotActivatedServices=Not activated services
|
||||||
LastActivatedServices=Last %s activated services
|
LastActivatedServices=Last %s activated services
|
||||||
EditServiceLine=Edit service line
|
EditServiceLine=Edit service line
|
||||||
|
|||||||
@ -10,6 +10,7 @@ ContractStatusRunning=En service
|
|||||||
ContractStatusClosed=Clôturé
|
ContractStatusClosed=Clôturé
|
||||||
Contracts=Contrats
|
Contracts=Contrats
|
||||||
Contract=Contrat
|
Contract=Contrat
|
||||||
|
MenuRunningServices=Services actifs
|
||||||
NewContract=Nouveau contrat
|
NewContract=Nouveau contrat
|
||||||
AddContract=Créer contrat
|
AddContract=Créer contrat
|
||||||
SearchAContract=Rechercher un contrat
|
SearchAContract=Rechercher un contrat
|
||||||
@ -23,6 +24,7 @@ DateServiceStart=Date d
|
|||||||
DateServiceEnd=Date fin du service
|
DateServiceEnd=Date fin du service
|
||||||
ShowContract=Afficher contrat
|
ShowContract=Afficher contrat
|
||||||
ListOfRunningContractsLines=Liste des lignes de contrats en service
|
ListOfRunningContractsLines=Liste des lignes de contrats en service
|
||||||
|
ListOfRunningServices=Liste des services actifs
|
||||||
NotActivatedServices=Services non activés
|
NotActivatedServices=Services non activés
|
||||||
LastActivatedServices=Les %s derniers services activés
|
LastActivatedServices=Les %s derniers services activés
|
||||||
EditServiceLine=Edition ligne du service
|
EditServiceLine=Edition ligne du service
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user