diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index e815ca8438d..76bcccd936d 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -728,244 +728,12 @@ if ($socid > 0) /* * Listes des actions a faire */ - if ($conf->agenda->enabled) - { - print_titre($langs->trans("ActionsOnCompany")); - - print '
| '.$langs->trans("ActionsToDoShort").' | '; - print ' | ||||||||||||
| '.strftime("%Y",$obj->dp)." | \n"; - $oldyear = strftime("%Y",$obj->dp); - - print '' .strftime("%b",$obj->dp)." | \n"; - $oldmonth = strftime("%Y%b",$obj->dp); - - print ''.strftime("%d",$obj->dp)." | \n"; - print ''.strftime("%H:%M",$obj->dp).' | '; - - // Picto warning - print ''; - if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); - else print ' '; - print ' | '; - - // Status/Percent - print ''; - - if ($obj->propalrowid) - { - print ' | '.img_object($langs->trans("ShowAction"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ' | '; - } - else - { - $actionstatic->code=$obj->acode; - $actionstatic->libelle=$obj->libelle; - $actionstatic->id=$obj->id; - print ''.$actionstatic->getNomUrl(1,16).' | '; - } - print ''.$obj->label.' | '; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - print ' | '; - $userstatic->id=$obj->fk_user_author; - $userstatic->login=$obj->login; - print $userstatic->getLoginUrl(1); - print ' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "|
| '.$langs->trans("ActionsDoneShort").' | '; - print '||||||||||||
| '.strftime("%Y",$obj->da)." | \n"; - $oldyear = strftime("%Y",$obj->da); - print ''.strftime("%b",$obj->da)." | \n"; - $oldmonth = strftime("%Y%b",$obj->da); - print ''.strftime("%d",$obj->da)." | \n"; - print ''.strftime("%H:%M",$obj->da)." | \n"; - - // Picto - print ''; - - // Espace - print ' | '; - - // Action - print ' | '; - $actionstatic->code=$obj->acode; - $actionstatic->libelle=$obj->libelle; - $actionstatic->id=$obj->id; - print $actionstatic->getNomUrl(1,16); - print ' | '; - - // Objet lie - print ''; - if ($obj->propalrowid) - { - print ''.img_object($langs->trans("ShowPropal"),"propal"); - print $langs->trans("Propal"); - print ''; - } - if ($obj->fk_facture) - { - $facturestatic->ref=$langs->trans("Invoice"); - $facturestatic->id=$obj->fk_facture; - $facturestatic->type=$obj->type; - print $facturestatic->getNomUrl(1,'compta'); - } - else print ' '; - print ' | '; - - // Libelle - print ''.$obj->label.' | '; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - // Auteur - print ' | '; - $userstatic->id=$obj->rowid; - $userstatic->login=$obj->login; - print $userstatic->getLoginUrl(1); - print ' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "
| '.$langs->trans("ActionsToDoShort").' | '; - print ' | ||||||||||||||
| | | '; - } - else - { - print ''.strftime("%Y",$obj->dp)." | \n"; - $oldyear = strftime("%Y",$obj->dp); - } - - if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) - { - print '| | '; - } - else - { - print '' .strftime("%b",$obj->dp)." | \n"; - $oldmonth = strftime("%Y%b",$obj->dp); - } - - print ''.strftime("%d",$obj->dp)." | \n"; - print ''.strftime("%H:%M",$obj->dp).' | '; - - // Picto warning - print ''; - if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); - else print ' '; - print ' | '; - - // Status/Percent - print ''; - - if ($obj->propalrowid) - { - print ' | '.img_object($langs->trans("ShowAction"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ' | '; - } - else - { - $actionstatic->code=$obj->acode; - $actionstatic->libelle=$obj->libelle; - $actionstatic->id=$obj->id; - print ''.$actionstatic->getNomUrl(1,16).' | '; - } - - print ''.$obj->label.' | '; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - // Auteur - print ' | '.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "|
| '.$langs->trans("ActionsDoneShort").''; - print ' | ||||||||||||||
| | | '; - } else { - print ''.strftime("%Y",$obj->da)." | \n"; - $oldyear = strftime("%Y",$obj->da); - } - - if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { - print '| | '; - } else { - print ''.strftime("%b",$obj->da)." | \n"; - $oldmonth = strftime("%Y%b",$obj->da); - } - - print ''.strftime("%d",$obj->da)." | \n"; - print ''.strftime("%H:%M",$obj->da)." | \n"; - - // Picto - print ''; - - // Espace - print ' | '; - - // Action - print ' | '; - $actionstatic->code=$obj->acode; - $actionstatic->libelle=$obj->libelle; - $actionstatic->id=$obj->id; - print $actionstatic->getNomUrl(1,16); - print ' | '; - - // Objet li� - print ''; - if ($obj->propalrowid) - { - print ''.img_object($langs->trans("ShowPropal"),"propal"); - print $langs->trans("Propal"); - print ''; - } - if ($obj->fk_facture) - { - $facturestatic->ref=$langs->trans("Invoice"); - $facturestatic->id=$obj->rowid; - $facturestatic->type=$obj->type; - print $facturestatic->getNomUrl(1,'compta'); - } - else print ' '; - print ' | '; - - // Libell� - print "$obj->label | "; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - // Auteur - print ' | '.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "
| '.$langs->trans("ActionsToDoShort").' | |||||||||||||||
| | | '; - } - else - { - print ''.strftime("%Y",$obj->dp)." | \n"; - $oldyear = strftime("%Y",$obj->dp); - } - - if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) - { - print '| | '; - } - else - { - print '' .strftime("%b",$obj->dp)." | \n"; - $oldmonth = strftime("%Y%b",$obj->dp); - } - - print ''.strftime("%d",$obj->dp)." | \n"; - print ''.strftime("%H:%M",$obj->dp).' | '; - - // Picto warning - print ''; - if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); - else print ' '; - print ' | '; - - // Status/Percent - print ''; - - if ($obj->propalrowid) - { - print ' | '.img_object($langs->trans("ShowAction"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ' | '; - } - else - { - print ''.img_object($langs->trans("ShowAction"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ' | '; - } - - print ''.$obj->label.' | '; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - // Auteur - print ' | '.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "|
| '.$langs->trans("ActionsDoneShort").' | ||||||||||||||
| | | '; - } else { - print ''.strftime("%Y",$obj->da)." | \n"; - $oldyear = strftime("%Y",$obj->da); - } - - if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) - { - print '| | '; - } else { - print ''.strftime("%b",$obj->da)." | \n"; - $oldmonth = strftime("%Y%b",$obj->da); - } - - print ''.strftime("%d",$obj->da)." | \n"; - print ''.strftime("%H:%M",$obj->da)." | \n"; - - // Picto - print ''; - - // Espace - print ' | '; - - // Action - print ' | '; - print ''.img_object($langs->trans("ShowTask"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ''; - print ' | '; - - // Objet lie - print ''; - if ($obj->propalrowid) - { - print ''.img_object($langs->trans("ShowPropal"),"propal"); - print $langs->trans("Propal"); - print ''; - } - if ($obj->fk_facture) - { - print ''.img_object($langs->trans("ShowBill"),"bill"); - print $langs->trans("Invoice"); - print ''; - } - else print ' '; - print ' | '; - - // Libelle - print "$obj->label | "; - - // Contact pour cette action - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print ''.$contactstatic->getNomUrl(1).' | '; - } - else - { - print ''; - } - - // Auteur - print ' | '.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.' | '; - - // Statut - print ''.$actionstatic->LibStatut($obj->percent,3).' | '; - - print "
| '.$langs->trans("ActionsToDoShort").' | '; + print ' | ||||||||||||
| '.strftime("%Y",$obj->dp)." | \n"; + $oldyear = strftime("%Y",$obj->dp); + + print '' .strftime("%b",$obj->dp)." | \n"; + $oldmonth = strftime("%Y%b",$obj->dp); + + print ''.strftime("%d",$obj->dp)." | \n"; + print ''.strftime("%H:%M",$obj->dp).' | '; + + // Picto warning + print ''; + if (date("U",$obj->dp) < time()) print ' '.img_warning("Late"); + else print ' '; + print ' | '; + + // Status/Percent + print ''; + + if ($obj->propalrowid) + { + print ' | '.img_object($langs->trans("ShowAction"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print ' | '; + } + else + { + $actionstatic->code=$obj->acode; + $actionstatic->libelle=$obj->libelle; + $actionstatic->id=$obj->id; + print ''.$actionstatic->getNomUrl(1,16).' | '; + } + print ''.$obj->label.' | '; + + // Contact pour cette action + if ($obj->fk_contact > 0) + { + $contactstatic->name=$obj->name; + $contactstatic->firstname=$obj->firstname; + $contactstatic->id=$obj->fk_contact; + print ''.$contactstatic->getNomUrl(1).' | '; + } + else + { + print ''; + } + + print ' | '; + $userstatic->id=$obj->fk_user_author; + $userstatic->login=$obj->login; + print $userstatic->getLoginUrl(1); + print ' | '; + + // Statut + print ''.$actionstatic->LibStatut($obj->percent,3).' | '; + + print "|
| '.$langs->trans("ActionsDoneShort").' | '; + print '||||||||||||
| '.strftime("%Y",$obj->da)." | \n"; + $oldyear = strftime("%Y",$obj->da); + print ''.strftime("%b",$obj->da)." | \n"; + $oldmonth = strftime("%Y%b",$obj->da); + print ''.strftime("%d",$obj->da)." | \n"; + print ''.strftime("%H:%M",$obj->da)." | \n"; + + // Picto + print ''; + + // Espace + print ' | '; + + // Action + print ' | '; + $actionstatic->code=$obj->acode; + $actionstatic->libelle=$obj->libelle; + $actionstatic->id=$obj->id; + print $actionstatic->getNomUrl(1,16); + print ' | '; + + // Objet lie + print ''; + if ($obj->propalrowid) + { + print ''.img_object($langs->trans("ShowPropal"),"propal"); + print $langs->trans("Propal"); + print ''; + } + if ($obj->fk_facture) + { + $facturestatic->ref=$langs->trans("Invoice"); + $facturestatic->id=$obj->fk_facture; + $facturestatic->type=$obj->type; + print $facturestatic->getNomUrl(1,'compta'); + } + else print ' '; + print ' | '; + + // Libelle + print ''.$obj->label.' | '; + + // Contact pour cette action + if ($obj->fk_contact > 0) + { + $contactstatic->name=$obj->name; + $contactstatic->firstname=$obj->firstname; + $contactstatic->id=$obj->fk_contact; + print ''.$contactstatic->getNomUrl(1).' | '; + } + else + { + print ''; + } + + // Auteur + print ' | '; + $userstatic->id=$obj->rowid; + $userstatic->login=$obj->login; + print $userstatic->getLoginUrl(1); + print ' | '; + + // Statut + print ''.$actionstatic->LibStatut($obj->percent,3).' | '; + + print "