diff --git a/htdocs/includes/boxes/box_actions.php b/htdocs/includes/boxes/box_actions.php index a65f932ce27ecdcc8730bd78bad313799144ef3c..a6bafe14f5de4a3afacaa02b7bfa05697f839df3 100644 --- a/htdocs/includes/boxes/box_actions.php +++ b/htdocs/includes/boxes/box_actions.php @@ -19,13 +19,12 @@ */ /** - \file htdocs/includes/boxes/box_actions.php - \ingroup actions - \brief Module de generation de l'affichage de la box actions - \version $Id$ + * \file htdocs/includes/boxes/box_actions.php + * \ingroup actions + * \brief Module de generation de l'affichage de la box actions + * \version $Id$ */ - include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php"); @@ -114,17 +113,21 @@ class box_actions extends ModeleBoxes { 'text2'=> $late, 'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', - 'text' => dol_trunc($objp->nom,20), - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', + 'text' => dol_trunc($objp->nom,12), + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][4] = array('td' => 'align="left" nowrap="nowrap"', 'text' => dol_print_date($datelimite, "dayhour")); - $this->info_box_contents[$i][4] = array('td' => 'align="right"', + $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => $objp->percentage. "%"); - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"', 'text' => $actionstatic->LibStatut($objp->percentage,3)); $i++; diff --git a/htdocs/includes/boxes/box_commandes.php b/htdocs/includes/boxes/box_commandes.php index 36566dbec7047ea07d8bcc91e6fd11a1b64aabe1..cf2e759d74b38ccefba55e84754b464c937fcc44 100644 --- a/htdocs/includes/boxes/box_commandes.php +++ b/htdocs/includes/boxes/box_commandes.php @@ -59,9 +59,9 @@ class box_commandes extends ModeleBoxes { function loadBox($max=5) { global $user, $langs, $db, $conf; - + $this->max=$max; - + include_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); $commandestatic=new Commande($db); @@ -88,36 +88,40 @@ class box_commandes extends ModeleBoxes { if ($result) { $num = $db->num_rows($result); - + $i = 0; while ($i < $num) { $objp = $db->fetch_object($result); $datem=$db->jdate($objp->tms); - + $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid); - + $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref, 'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datem,'day'), ); - - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3)); $i++; } - + if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders")); } else { diff --git a/htdocs/includes/boxes/box_factures.php b/htdocs/includes/boxes/box_factures.php index e074f273dbe67c6f92169364d93a2ee0822bfd60..d472fa948da5c6f6b69d8f703fbcdecc948d0fbf 100644 --- a/htdocs/includes/boxes/box_factures.php +++ b/htdocs/includes/boxes/box_factures.php @@ -116,16 +116,20 @@ class box_factures extends ModeleBoxes { 'text2'=> $late, 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength'=>40, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day'), ); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); $i++; diff --git a/htdocs/includes/boxes/box_factures_fourn.php b/htdocs/includes/boxes/box_factures_fourn.php index 4d015b856e51f3efd7e850903ea7b45d3ddb8a3b..af8240e9d4378ddcacb9d0fbc0a2670cde91e38a 100644 --- a/htdocs/includes/boxes/box_factures_fourn.php +++ b/htdocs/includes/boxes/box_factures_fourn.php @@ -113,17 +113,21 @@ class box_factures_fourn extends ModeleBoxes { 'text2'=> $late, 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); $fac = new FactureFournisseur($db); $fac->fetch($objp->facid); $alreadypaid=$fac->getSommePaiement(); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type)); $i++; diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index a4579c66343b81f2a90bee58ec4e98352317b0e9..a53bf9471ff6ac31f697801a557b4483dbe15c8e 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -110,17 +110,21 @@ class box_factures_fourn_imp extends ModeleBoxes { 'text2'=> $late, 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datelimite,'day')); $fac = new FactureFournisseur($db); $fac->fetch($objp->facid); $alreadypaid=$fac->getSommePaiement(); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type)); $i++; diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index 7394bd43165f872eaae8d5f1688071f98d801889..c4d9e52eaee530a785e93557b1567b25fe96763a 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -35,7 +35,7 @@ class box_factures_imp extends ModeleBoxes { var $boximg="object_bill"; var $boxlabel; var $depends = array("facture"); - + var $db; var $param; @@ -61,12 +61,12 @@ class box_factures_imp extends ModeleBoxes { function loadBox($max=5) { global $conf, $user, $langs, $db; - + $this->max=$max; - + include_once(DOL_DOCUMENT_ROOT."/facture.class.php"); $facturestatic=new Facture($db); - + $this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills",$max)); if ($user->rights->facture->lire) @@ -92,7 +92,7 @@ class box_factures_imp extends ModeleBoxes { { $num = $db->num_rows($result); $now=gmmktime(); - + $i = 0; $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; @@ -100,7 +100,7 @@ class box_factures_imp extends ModeleBoxes { { $objp = $db->fetch_object($result); $datelimite=$db->jdate($objp->datelimite); - + $late=''; if ($datelimite < ($now - $conf->facture->warning_delay)) $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); @@ -112,22 +112,26 @@ class box_factures_imp extends ModeleBoxes { 'text' => $objp->facnumber, 'text2'=> $late, 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); - - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength'=>44, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datelimite,'day'), ); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', - 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', + 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); $i++; } - + if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidCustomerBills")); } else diff --git a/htdocs/includes/boxes/box_propales.php b/htdocs/includes/boxes/box_propales.php index 7e01b1bc5a457b83919b3df80f241a112c86eea0..c068f6a08e864ce275b4c088d0ca89b7d581419b 100644 --- a/htdocs/includes/boxes/box_propales.php +++ b/htdocs/includes/boxes/box_propales.php @@ -34,13 +34,13 @@ class box_propales extends ModeleBoxes { var $boximg="object_propal"; var $boxlabel; var $depends = array("propal"); // conf->propal->enabled - + var $db; var $param; var $info_box_head = array(); var $info_box_contents = array(); - + /** * \brief Constructeur de la classe @@ -49,7 +49,7 @@ class box_propales extends ModeleBoxes { { global $langs; $langs->load("boxes"); - + $this->boxlabel=$langs->trans("BoxLastProposals"); } @@ -60,12 +60,12 @@ class box_propales extends ModeleBoxes { function loadBox($max=5) { global $user, $langs, $db, $conf; - + $this->max=$max; - + include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); $propalstatic=new Propal($db); - + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastPropals",$max)); if ($user->rights->propale->lire) @@ -81,51 +81,55 @@ class box_propales extends ModeleBoxes { if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; $sql.= " ORDER BY p.datep DESC, p.ref DESC "; $sql.= $db->plimit($max, 0); - + $result = $db->query($sql); - + if ($result) { $num = $db->num_rows($result); $now=gmmktime(); - + $i = 0; - + while ($i < $num) { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); $dateterm=$db->jdate($objp->fin_validite); $dateclose=$db->jdate($objp->date_cloture); - + $late = ''; if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->propal->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); } - + $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->rowid); - + $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref, 'text2'=> $late, 'url' => DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->rowid); - - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom,40), 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); - - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3)); - + $i++; } - + if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProposals")); } - else + else { dol_print_error($db); } @@ -136,7 +140,7 @@ class box_propales extends ModeleBoxes { 'text' => $langs->trans("ReadPermissionNotAllowed")); } } - + function showBox() { parent::showBox($this->info_box_head, $this->info_box_contents); diff --git a/htdocs/includes/boxes/box_services_vendus.php b/htdocs/includes/boxes/box_services_vendus.php index 3a3eb94211d75bfb4761cf4f0ec93b5ab53a22e3..f714174a49257d934957fc86e0cce914afe0ee2b 100644 --- a/htdocs/includes/boxes/box_services_vendus.php +++ b/htdocs/includes/boxes/box_services_vendus.php @@ -133,15 +133,19 @@ class box_services_vendus extends ModeleBoxes { 'maxlength' => 16, 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', + $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', + 'logo' => 'company', + 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength' => 28, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', + $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datem,'day')); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $contratlignestatic->LibStatut($objp->statut,3) );