diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index 13cad8c64a3..adc95454bf5 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -252,23 +252,28 @@ if ($_socid > 0)
print '
| '.$langs->trans('Zip').' | '.$objsoc->cp." | ";
print ''.$langs->trans('Town').' | '.$objsoc->ville." |
";
-
- print '| '.$langs->trans('Country').' | '.$objsoc->pays.' | ';
+ if ($objsoc->pays) {
+ print '
| '.$langs->trans('Country').' | '.$objsoc->pays.' |
';
+ }
print '| '.$langs->trans('Phone').' | '.dolibarr_print_phone($objsoc->tel,$objsoc->pays_code).' | ';
print ''.$langs->trans('Fax').' | '.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code).' |
';
print '| '.$langs->trans("Web")." | url\" target=\"_blank\">".$objsoc->url." |
";
-
- print "| ".$langs->transcountry("ProfId1",$objsoc->pays_code)." | siren."\" target=\"_blank\">".$objsoc->siren." | ";
+ if ($objsoc->siren || $objsoc->siret) {
+ print "
| ".$langs->transcountry("ProfId1",$objsoc->pays_code)." | siren."\" target=\"_blank\">".$objsoc->siren." | ";
print ''.$langs->transcountry('ProfId2',$objsoc->pays_code).' | '.$objsoc->siret.' |
';
-
- print '| '.$langs->transcountry('ProfId3',$objsoc->pays_code).' | '.$objsoc->ape.' | |
';
+ }
+ if ($objsoc->ape) {
+ print '| '.$langs->transcountry('ProfId3',$objsoc->pays_code).' | '.$objsoc->ape.' | |
';
+ }
// Type + Staff
$arr = $objsoc->typent_array($objsoc->typent_id);
$objsoc->typent= $arr[$objsoc->typent_id];
- print '| '.$langs->trans("Type").' | '.$objsoc->typent.' | '.$langs->trans("Staff").' | '.$objsoc->effectif.' |
';
+ if ($objsoc->typent || $objsoc->effectif) {
+ print '| '.$langs->trans("Type").' | '.$objsoc->typent.' | '.$langs->trans("Staff").' | '.$objsoc->effectif.' |
';
+ }
// Remise permanente
print '';
@@ -683,9 +688,9 @@ if ($_socid > 0)
*
*/
print '';
- print '| '.$langs->trans("ActionsToDo").' | | ';
+ print '| '.$langs->trans("ActionsToDo").' | | ';
- $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
+ $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql .= " WHERE a.fk_soc = $objsoc->id ";
$sql .= " AND u.rowid = a.fk_user_author";
@@ -708,7 +713,7 @@ if ($_socid > 0)
if ($oldyear == strftime("%Y",$obj->da) )
{
- print ''.strftime("%Y",$obj->da)." | \n";
+ print '| | ';
}
else
{
@@ -718,7 +723,7 @@ if ($_socid > 0)
if ($oldmonth == strftime("%Y%b",$obj->da) )
{
- print '' .strftime("%b",$obj->da)." | \n";
+ print '| | ';
}
else
{
@@ -728,6 +733,10 @@ if ($_socid > 0)
print ''.strftime("%d",$obj->da)." | \n";
print ''.strftime("%H:%M",$obj->da)." | \n";
+ if (date("U",$obj->da) < time())
+ {
+ print "".img_warning("Late")." | ";
+ }
// Status/Percent
print ' | ';
@@ -748,7 +757,8 @@ if ($_socid > 0)
print $libelle;
print '';
}
-
+ print "$obj->label | ";
+
// Contact pour cette action
if ($obj->fk_contact) {
$contact = new Contact($db);
@@ -775,9 +785,9 @@ if ($_socid > 0)
* Listes des actions effectuees
*/
print '';
- print '| '.$langs->trans("ActionsDone").' | ';
+ print '| '.$langs->trans("ActionsDone").' | ';
- $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
+ $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql .= " WHERE a.fk_soc = $objsoc->id ";
$sql .= " AND u.rowid = a.fk_user_author";
@@ -822,6 +832,10 @@ if ($_socid > 0)
}
print ''.strftime("%d",$obj->da)." | \n";
print ''.strftime("%H:%M",$obj->da)." | \n";
+ if (date("U",$obj->da) < time())
+ {
+ print " | ";
+ }
// Statut/Percent
print ' | ';
@@ -843,6 +857,7 @@ if ($_socid > 0)
print '';
}
+ print "$obj->label | ";
// Contact pour cette action
if ($obj->fk_contact)
{
|