Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
321e46e596
@ -1559,25 +1559,26 @@ class Adherent extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowMember").': '.$this->ref;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option == 'card')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
if ($option == 'subscription')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3'.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
$picto='user';
|
||||
$label=$langs->trans("ShowMember");
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -270,12 +270,12 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowTypeCard",$this->libelle);
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='group';
|
||||
$label=$langs->trans("ShowTypeCard",$this->libelle);
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -264,12 +264,12 @@ class Cotisation extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowSubscription").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='payment';
|
||||
$label=$langs->trans("ShowSubscription");
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -1274,9 +1274,9 @@ class Categorie extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$this->id.'&type='.$this->type.'">';
|
||||
$label=$langs->trans("ShowCategory").': '. ($this->ref?$this->ref:$this->label);
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$this->id.'&type='.$this->type.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='category';
|
||||
|
||||
@ -897,11 +897,12 @@ class ActionComm extends CommonObject
|
||||
global $conf,$langs;
|
||||
|
||||
$result='';
|
||||
if ($option=='birthday') $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'">';
|
||||
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$label=$this->label;
|
||||
if (empty($label)) $label=$this->libelle; // For backward compatibility
|
||||
if (empty($label)) $label=$this->libelle; // For backward compatibility
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
if ($option=='birthday') $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.$linkclose;
|
||||
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
//print 'rrr'.$this->libelle.'-'.$withpicto;
|
||||
|
||||
if ($withpicto == 2)
|
||||
|
||||
@ -142,7 +142,7 @@ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
|
||||
*/
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -172,6 +172,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">';
|
||||
$propalstatic->id=$obj->rowid;
|
||||
$propalstatic->ref=$obj->ref;
|
||||
$propalstatic->ref_client=$obj->ref_client;
|
||||
print $propalstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
@ -209,7 +210,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
$langs->load("orders");
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -239,6 +240,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">';
|
||||
$orderstatic->id=$obj->rowid;
|
||||
$orderstatic->ref=$obj->ref;
|
||||
$orderstatic->ref_client=$obj->ref_client;
|
||||
print $orderstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
@ -467,7 +469,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$langs->load("propal");
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -503,6 +505,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
|
||||
$propalstatic->id=$obj->propalid;
|
||||
$propalstatic->ref=$obj->ref;
|
||||
$propalstatic->ref_client=$obj->ref_client;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
|
||||
@ -2605,29 +2605,31 @@ class Propal extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
if ($option == '')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
|
||||
$label=$langs->trans("ShowPropal").': '.$this->ref;
|
||||
if (! empty($this->ref_client))
|
||||
$label.= '<br>'.$langs->trans('RefCustomer').': '.$this->ref_client;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
if ($option == '') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||
}
|
||||
if ($option == 'compta') // deprecated
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
|
||||
if ($option == 'compta') { // deprecated
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||
}
|
||||
if ($option == 'expedition')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .'">';
|
||||
if ($option == 'expedition') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||
}
|
||||
if ($option == 'document')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .'">';
|
||||
if ($option == 'document') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .$linkclose;
|
||||
}
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='propal';
|
||||
$label=$langs->trans("ShowPropal").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
if ($withpicto)
|
||||
$result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2)
|
||||
$result.=' ';
|
||||
$result.=$lien.$this->ref.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -2884,11 +2884,13 @@ class Commande extends CommonOrder
|
||||
|
||||
if ($short) return $url;
|
||||
|
||||
$linkstart = '<a href="'.$url.'">';
|
||||
$linkend='</a>';
|
||||
|
||||
$picto='order';
|
||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
||||
if (! empty($this->ref_client))
|
||||
$label.= '<br>'.$langs->trans('RefCustomer').': '.$this->ref_client;
|
||||
|
||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -935,15 +935,16 @@ class Account extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$linkclose = '" title="'.dol_escape_htmltag($this->label, 1).'" class="classfortooltip">';
|
||||
|
||||
if (empty($mode))
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/card.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else if ($mode == 'transactions')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
@ -1483,11 +1484,11 @@ class AccountLine extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$this->rowid.'">';
|
||||
$label=$langs->trans("ShowTransaction").': '.$this->rowid;
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$this->rowid.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowTransaction"), 'account', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'account', 'class="classfortooltip"').$lienfin.' ');
|
||||
$result.=$lien.$this->rowid.$lienfin;
|
||||
|
||||
if ($option == 'showall' || $option == 'showconciliated') $result.=' (';
|
||||
|
||||
@ -357,13 +357,13 @@ class Deplacement extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='trip';
|
||||
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -711,13 +711,13 @@ class Don extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowDonation").': '.$this->id;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/dons/card.php?rowid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/dons/card.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='generic';
|
||||
|
||||
$label=$langs->trans("ShowDonation").': '.$this->id;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -558,13 +558,13 @@ class FactureRec extends Facture
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='bill';
|
||||
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -865,7 +865,7 @@ class Facture extends CommonInvoice
|
||||
if ($this->type == self::TYPE_SITUATION) $label=$langs->transnoentitiesnoconv("ShowInvoiceSituation").': '.$this->ref;
|
||||
if ($moretitle) $label.=' - '.$moretitle;
|
||||
|
||||
$linkstart='<a href="'.$url.'">';
|
||||
$linkstart='<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object(($max?dol_trunc($label,$max):$label), $picto, 'class="classfortooltip"').$linkend);
|
||||
|
||||
@ -585,12 +585,12 @@ class Localtax extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/localtax/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/localtax/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='payment';
|
||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -769,11 +769,12 @@ class RemiseCheque extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowCheckReceipt").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"), 'payment', 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||
|
||||
|
||||
@ -748,8 +748,9 @@ class Paiement extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
|
||||
|
||||
@ -1118,17 +1118,18 @@ class BonPrelevement extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowWithdraw").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($option == 'xxx')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowWithdraw"), 'payment', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin.' ');
|
||||
$result.=$lien.$this->ref.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -486,12 +486,12 @@ class PaymentSalary extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='payment';
|
||||
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -420,11 +420,12 @@ class ChargeSociales extends CommonObject
|
||||
$result='';
|
||||
|
||||
if (empty($this->ref)) $this->ref=$this->lib;
|
||||
$label = $langs->trans("ShowSocialContribution").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowSocialContribution").': '.$this->lib, 'bill', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'bill', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||
return $result;
|
||||
|
||||
@ -585,13 +585,14 @@ class PaymentSocialContribution extends CommonObject
|
||||
$result='';
|
||||
|
||||
if (empty($this->ref)) $this->ref=$this->lib;
|
||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||
|
||||
if (!empty($this->id))
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment").': '.$this->ref, 'payment', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||
}
|
||||
|
||||
@ -638,12 +638,12 @@ class Tva extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='payment';
|
||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -887,17 +887,18 @@ class Contact extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowContact").': '.$this->getFullName($langs);
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($option == 'xxx')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowContact").': '.$this->getFullName($langs), 'contact', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'contact', 'class="classfortooltip"').$lienfin.' ');
|
||||
$result.=$lien.($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1682,13 +1682,13 @@ class Contrat extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowContract").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='contract';
|
||||
|
||||
$label=$langs->trans("ShowContract").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
@ -2211,13 +2211,13 @@ class ContratLigne extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowContractOfService").': '.$this->label;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='contract';
|
||||
|
||||
$label=$langs->trans("ShowContractOfService").': '.$this->label;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -60,8 +60,7 @@ class box_actions extends ModeleBoxes
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastActionsToDo",$max));
|
||||
|
||||
if ($user->rights->agenda->myactions->read)
|
||||
{
|
||||
if ($user->rights->agenda->myactions->read) {
|
||||
$sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage,";
|
||||
$sql.= " ta.code, ta.libelle as type_label,";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
@ -80,15 +79,13 @@ class box_actions extends ModeleBoxes
|
||||
|
||||
dol_syslog("Box_actions::loadBox", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$now=dol_now();
|
||||
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$late = '';
|
||||
$objp = $db->fetch_object($result);
|
||||
$datelimite=$db->jdate($objp->dp);
|
||||
@ -98,48 +95,68 @@ class box_actions extends ModeleBoxes
|
||||
//($langs->transnoentities("Action".$objp->code)!=("Action".$objp->code) ? $langs->transnoentities("Action".$objp->code) : $objp->label)
|
||||
$label=empty($objp->label)?$objp->type_label:$objp->label;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => ("action"),
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ("action"),
|
||||
'tooltip' => $langs->trans('Action'.$objp->code).': '.$label,
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($label,32),
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($label,32),
|
||||
'text2'=> $late,
|
||||
'tooltip' => $langs->trans('Action'.$objp->code).': '.$label,
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->socid?'company':''),
|
||||
'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->socid?'company':''),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,24),
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,24),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left" class="nowrap"',
|
||||
'text' => dol_print_date($datelimite, "dayhour"));
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="left" class="nowrap"',
|
||||
'text' => dol_print_date($datelimite, "dayhour"),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''));
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $actionstatic->LibStatut($objp->percentage,3));
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $actionstatic->LibStatut($objp->percentage,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo"));
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Frederic France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/boxes/box_activity.php
|
||||
* \ingroup societes
|
||||
* \brief Module to show box of bills, orders & propal of the current year
|
||||
* \file htdocs/core/boxes/box_activity.php
|
||||
* \ingroup societes
|
||||
* \brief Module to show box of bills, orders & propal of the current year
|
||||
*/
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
@ -29,275 +30,416 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
*/
|
||||
class box_activity extends ModeleBoxes
|
||||
{
|
||||
var $boxcode="activity";
|
||||
var $boximg="object_bill";
|
||||
var $boxlabel='BoxGlobalActivity';
|
||||
var $depends = array("facture");
|
||||
var $boxcode="activity";
|
||||
var $boximg="object_bill";
|
||||
var $boxlabel='BoxGlobalActivity';
|
||||
var $depends = array("facture");
|
||||
|
||||
var $db;
|
||||
var $param;
|
||||
var $enabled = 1;
|
||||
var $db;
|
||||
var $param;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param)
|
||||
{
|
||||
global $conf;
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db=$db;
|
||||
// FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software.
|
||||
// FIXME: Removed number_format (not compatible with all languages)
|
||||
// FIXME: Pb into some status
|
||||
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous comments)
|
||||
}
|
||||
$this->db=$db;
|
||||
// FIXME: Pb into some status
|
||||
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous comments)
|
||||
}
|
||||
|
||||
/**
|
||||
* Charge les donnees en memoire pour affichage ulterieur
|
||||
*
|
||||
* @param int $max Maximum number of records to load
|
||||
* @return void
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $conf, $user, $langs, $db;
|
||||
/**
|
||||
* Charge les donnees en memoire pour affichage ulterieur
|
||||
*
|
||||
* @param int $max Maximum number of records to load
|
||||
* @return void
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $conf, $user, $langs, $db;
|
||||
|
||||
$totalMnt = 0;
|
||||
$totalnb = 0;
|
||||
$i = 0;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$totalMnt = 0;
|
||||
$totalnb = 0;
|
||||
$i = 0;
|
||||
$cachetime = 3600;
|
||||
$fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache';
|
||||
$now = dol_now();
|
||||
$nbofyears=2;
|
||||
|
||||
$nbofyears=2;
|
||||
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
||||
$textHead = $langs->trans("Activity").' ('.$nbofyears.' '.$langs->trans("DurationYears").')';
|
||||
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
||||
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
||||
$textHead = $langs->trans("Activity").' <span class="badge">'.$nbofyears.' '.$langs->trans("DurationYears").'</span>';
|
||||
$this->info_box_head = array(
|
||||
'text' => $textHead,
|
||||
'limit'=> dol_strlen($textHead),
|
||||
);
|
||||
|
||||
// compute the year limit to show
|
||||
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofyears, "y");
|
||||
// compute the year limit to show
|
||||
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofyears, "y");
|
||||
|
||||
// list the summary of the bills
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$facturestatic=new Facture($db);
|
||||
// list the summary of the bills
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$facturestatic=new Facture($db);
|
||||
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.datef >= '".$db->idate($tmpdate)."' AND paye=1";
|
||||
$sql.= " GROUP BY f.fk_statut";
|
||||
$sql.= " ORDER BY f.fk_statut DESC";
|
||||
$cachefile = DOL_DATA_ROOT.'/facture/temp/boxactivity-invoice'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$data = array();
|
||||
if ($refresh) {
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.datef >= '".$db->idate($tmpdate)."' AND paye=1";
|
||||
$sql.= " GROUP BY f.fk_statut";
|
||||
$sql.= " ORDER BY f.fk_statut DESC";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'bill');
|
||||
$objp = $db->fetch_object($result);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
$billurl="viewstatut=2&paye=1&year=".$data[$j]->annee;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1,$data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
'logo' => 'bill',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1,$objp->fk_statut,0)." ".$objp->annee);
|
||||
$billurl="viewstatut=2&paye=1&year=".$objp->annee;
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1,$data[$j]->fk_statut,0)." ".$data[$j]->annee,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1,$data[$j]->fk_statut,0),
|
||||
'text' => $data[$j]->nb,
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
|
||||
// We add only for the current year
|
||||
if ($objp->annee == date("Y"))
|
||||
{
|
||||
$totalnb += $objp->nb;
|
||||
$totalMnt += $objp->Mnttot;
|
||||
}
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut(1,$objp->fk_statut,3) );
|
||||
$i++;
|
||||
}
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
||||
// We add only for the current year
|
||||
if ($data[$j]->annee == date("Y")) {
|
||||
$totalnb += $data[$j]->nb;
|
||||
$totalMnt += $data[$j]->Mnttot;
|
||||
}
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(1,$data[$j]->fk_statut,3),
|
||||
);
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
if (count($data)==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||
);
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else dol_print_error($db);
|
||||
$cachefile = DOL_DATA_ROOT.'/facture/temp/boxactivity-invoice2'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND paye=0";
|
||||
$sql.= " GROUP BY f.fk_statut";
|
||||
$sql.= " ORDER BY f.fk_statut DESC";
|
||||
if ($refresh) {
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND paye=0";
|
||||
$sql.= " GROUP BY f.fk_statut";
|
||||
$sql.= " ORDER BY f.fk_statut DESC";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$now=dol_now();
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'bill');
|
||||
$objp = $db->fetch_object($result);
|
||||
while ($i < count($data)) {
|
||||
$billurl="viewstatut=".$data[$j]->fk_statut."&paye=0";
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
'logo' => 'bill',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$objp->fk_statut,0));
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||
);
|
||||
|
||||
$billurl="viewstatut=".$objp->fk_statut."&paye=0";
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
);
|
||||
$totalnb += $objp->nb;
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(0,$objp->fk_statut,3)
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', 'maxlength'=>500, 'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency),
|
||||
);
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3),
|
||||
);
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||
);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500, 'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// list the summary of the orders
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$commandestatic=new Commande($db);
|
||||
// list the summary of the orders
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$commandestatic=new Commande($db);
|
||||
|
||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_soc = s.rowid";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND c.date_commande >= '".$db->idate($tmpdate)."'";
|
||||
$sql.= " AND c.facture=0";
|
||||
$sql.= " GROUP BY c.fk_statut";
|
||||
$sql.= " ORDER BY c.fk_statut DESC";
|
||||
$cachefile = DOL_DATA_ROOT.'/commande/temp/boxactivity-order'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$data = array();
|
||||
if ($refresh) {
|
||||
|
||||
$result = $db->query($sql);
|
||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_soc = s.rowid";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND c.date_commande >= '".$db->idate($tmpdate)."'";
|
||||
$sql.= " AND c.facture=0";
|
||||
$sql.= " GROUP BY c.fk_statut";
|
||||
$sql.= " ORDER BY c.fk_statut DESC";
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result) + $i;
|
||||
while ($i < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_order');
|
||||
$result = $db->query($sql);
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($objp->fk_statut,0,0)
|
||||
);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
|
||||
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||
'logo' => 'object_order',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb,
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$objp->fk_statut
|
||||
);
|
||||
$totalnb += $objp->nb;
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,0,3));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency),
|
||||
);
|
||||
$totalMnt += $data[$j]->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $commandestatic->LibStatut($data[$j]->fk_statut,0,3),
|
||||
);
|
||||
|
||||
// list the summary of the propals
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$propalstatic=new Propal($db);
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND p.fk_soc = s.rowid";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND p.datep >= '".$db->idate($tmpdate)."'";
|
||||
$sql.= " AND p.date_cloture IS NULL"; // just unclosed
|
||||
$sql.= " GROUP BY p.fk_statut";
|
||||
$sql.= " ORDER BY p.fk_statut DESC";
|
||||
// list the summary of the propals
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$propalstatic=new Propal($db);
|
||||
|
||||
$result = $db->query($sql);
|
||||
$cachefile = DOL_DATA_ROOT.'/propale/temp/boxactivity-propal'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$data = array();
|
||||
if ($refresh) {
|
||||
$sql = "SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ")";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND p.fk_soc = s.rowid";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
$sql.= " AND p.datep >= '".$db->idate($tmpdate)."'";
|
||||
$sql.= " AND p.date_cloture IS NULL"; // just unclosed
|
||||
$sql.= " GROUP BY p.fk_statut";
|
||||
$sql.= " ORDER BY p.fk_statut DESC";
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result) + $i;
|
||||
while ($i < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_propal');
|
||||
$result = $db->query($sql);
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' =>$langs->trans("Proposals")." ".$propalstatic->LibStatut($objp->fk_statut,0)
|
||||
);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
|
||||
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||
'logo' => 'object_propal'
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb,
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$objp->fk_statut
|
||||
);
|
||||
$totalnb += $objp->nb;
|
||||
$objp = $db->fetch_object($result);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency),
|
||||
);
|
||||
$totalMnt += $data[$j]->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $propalstatic->LibStatut($data[$j]->fk_statut,3),
|
||||
);
|
||||
|
||||
// Add the sum in the bottom of the boxes
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead);
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => $totalnb);
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency));
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => "");
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => "");
|
||||
}
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
* @return void
|
||||
*/
|
||||
function showBox($head = null, $contents = null)
|
||||
{
|
||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||
}
|
||||
// Add the sum in the bottom of the boxes
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left" ',
|
||||
'text' => $langs->trans("Total")." ".$textHead,
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => $totalnb,
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => "",
|
||||
);
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => "",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
* @return void
|
||||
*/
|
||||
function showBox($head = null, $contents = null)
|
||||
{
|
||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,10 +52,11 @@ class box_bookmarks extends ModeleBoxes
|
||||
|
||||
$this->max=$max;
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max),
|
||||
'sublink' => DOL_URL_ROOT.'/bookmarks/list.php');
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$this->info_box_head = array(
|
||||
'text' => $langs->trans("BoxMyLastBookmarks",$max),
|
||||
'sublink' => DOL_URL_ROOT.'/bookmarks/list.php',
|
||||
);
|
||||
if ($user->rights->bookmark->creer) {
|
||||
$this->info_box_head['subpicto']='object_bookmark';
|
||||
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
|
||||
}
|
||||
@ -81,43 +82,52 @@ class box_bookmarks extends ModeleBoxes
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $objp->url,
|
||||
'target' => $objp->target?'newtab':'');
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->title,
|
||||
'url' => $objp->url,
|
||||
'target' => $objp->target?'newtab':'');
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $objp->url,
|
||||
'tooltip' => $objp->title,
|
||||
'target' => $objp->target?'newtab':'',
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->title,
|
||||
'url' => $objp->url,
|
||||
'tooltip' => $objp->title,
|
||||
'target' => $objp->target?'newtab':'',
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0)
|
||||
{
|
||||
$mytxt=$langs->trans("NoRecordedBookmarks");
|
||||
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt);
|
||||
}
|
||||
if ($num==0) {
|
||||
$mytxt=$langs->trans("NoRecordedBookmarks");
|
||||
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center" colspan="2"',
|
||||
'tooltip' => $mytxt,
|
||||
'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt,
|
||||
);
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
|
||||
@ -104,19 +104,28 @@ class box_clients extends ModeleBoxes
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $url.$objp->socid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => $url.$objp->socid
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => $url.$objp->socid
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => $url.$objp->socid);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day")
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day"));
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3));
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3)
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -80,70 +80,85 @@ class box_commandes extends ModeleBoxes
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$date=$db->jdate($objp->date_commande);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
|
||||
if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER))
|
||||
{
|
||||
if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid);
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="right"',
|
||||
'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''),
|
||||
'url' => (($objp->fk_user_valid > 0)?DOL_URL_ROOT.'/user/card.php?id='.$objp->fk_user_valid:'')
|
||||
);
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Order').': '.$objp->ref,
|
||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array('td' => 'align="right" width="18"',
|
||||
'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3));
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'tooltip' => $langs->trans('Order').': '.$objp->ref,
|
||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid,
|
||||
);
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
|
||||
if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER)) {
|
||||
if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid);
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''),
|
||||
'url' => (($objp->fk_user_valid > 0)?DOL_URL_ROOT.'/user/card.php?id='.$objp->fk_user_valid:''),
|
||||
);
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = 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"));
|
||||
|
||||
$db->free($result);
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005 Christophe
|
||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -76,8 +76,7 @@ class box_comptes extends ModeleBoxes
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleCurrentAccounts"));
|
||||
|
||||
if ($user->rights->banque->lire)
|
||||
{
|
||||
if ($user->rights->banque->lire) {
|
||||
$sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,";
|
||||
$sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix as iban,";
|
||||
$sql.= " domiciliation, proprio, owner_address,";
|
||||
@ -90,76 +89,87 @@ class box_comptes extends ModeleBoxes
|
||||
$sql.= " ORDER BY label";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
$solde_total = 0;
|
||||
$i = 0;
|
||||
$solde_total = array();
|
||||
|
||||
$listofcurrencies=array();
|
||||
$account_static = new Account($db);
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$account_static = new Account($db);
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$account_static->id = $objp->rowid;
|
||||
$solde=$account_static->solde(0);
|
||||
$account_static->id = $objp->rowid;
|
||||
$solde=$account_static->solde(0);
|
||||
|
||||
$solde_total += $solde;
|
||||
$solde_total[$objp->currency_code] += $solde;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Account').': '.$objp->label,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->label,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->label,
|
||||
'tooltip' => $langs->trans('Account').': '.$objp->label,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
|
||||
'text' => $objp->number
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->number,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code)
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code)
|
||||
);
|
||||
|
||||
$listofcurrencies[$objp->currency_code]=1;
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Total
|
||||
if (count($listofcurrencies) <= 1)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="right" class="liste_total"',
|
||||
'text' => $langs->trans('Total')
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="right" class="liste_total"',
|
||||
'text' => ' '
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" class="liste_total"',
|
||||
'text' => ' '
|
||||
);
|
||||
$totalamount=price($solde_total,0,$langs,0,0,-1,$conf->currency);
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" class="liste_total"',
|
||||
'text' => $totalamount
|
||||
);
|
||||
}
|
||||
// Total
|
||||
foreach ($solde_total as $key=>$solde) {
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'tr' => 'class="liste_total"',
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => ' ',
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left" class="liste_total"',
|
||||
'text' => $langs->trans('Total').' '.$key,
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => ' '
|
||||
);
|
||||
$totalamount=price($solde,0,$langs,0,0,-1,$key);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => $totalamount
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -73,65 +73,83 @@ class box_contacts extends ModeleBoxes
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$contactstatic=new Contact($db);
|
||||
$societestatic=new Societe($db);
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$contactstatic->lastname=$objp->lastname;
|
||||
$contactstatic->lastname=$objp->lastname;
|
||||
$contactstatic->firstname=$objp->firstname;
|
||||
$contactstatic->civility_id=$objp->civility_id;
|
||||
|
||||
$societestatic->id=$objp->fk_soc;
|
||||
$societestatic->name=$objp->socname;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Contact').': '.$contactstatic->getFullName($langs,0),
|
||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $contactstatic->getFullName($langs,0),
|
||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $contactstatic->getFullName($langs,0),
|
||||
'tooltip' => $langs->trans('Contact').': '.$contactstatic->getFullName($langs,0),
|
||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->fk_soc > 0?'company':''),
|
||||
'url' => ($objp->fk_soc > 0?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc:''));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->fk_soc > 0?'company':''),
|
||||
'tooltip' => $societestatic->name,
|
||||
'url' => ($objp->fk_soc > 0?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc:''),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $societestatic->name,
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $societestatic->name,
|
||||
'tooltip' => $societestatic->name,
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc,
|
||||
);
|
||||
|
||||
$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"',
|
||||
'text' => dol_print_date($datem, "day"),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContacts"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedContacts"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'align' => 'left',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
|
||||
@ -79,8 +79,7 @@ class box_contracts extends ModeleBoxes
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$dateterm=$db->jdate($objp->fin_validite);
|
||||
@ -94,50 +93,69 @@ class box_contracts extends ModeleBoxes
|
||||
// fin_validite is no more on contract but on services
|
||||
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->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."/contrat/card.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid),
|
||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
||||
'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid),
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$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"',
|
||||
'text' => dol_print_date($datec,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right" class="nowrap"',
|
||||
'text' => $contractstatic->getLibStatut(6),
|
||||
'asis'=>1
|
||||
);
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right" class="nowrap"',
|
||||
'text' => $contractstatic->getLibStatut(6),
|
||||
'asis'=>1,
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedContracts"),
|
||||
);
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -98,8 +98,12 @@ class box_external_rss extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_head = array('text' => $title,
|
||||
'sublink' => $link, 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate()?dol_print_date($rssparser->getLastFetchDate(),"dayhourtext"):$langs->trans("Unknown")), 'subpicto'=>'object_bookmark');
|
||||
$this->info_box_head = array(
|
||||
'text' => $title,
|
||||
'sublink' => $link,
|
||||
'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate()?dol_print_date($rssparser->getLastFetchDate(),"dayhourtext"):$langs->trans("Unknown")),
|
||||
'subpicto'=>'object_bookmark',
|
||||
);
|
||||
}
|
||||
|
||||
// INFO on items
|
||||
@ -112,8 +116,8 @@ class box_external_rss extends ModeleBoxes
|
||||
// Feed common fields
|
||||
$href = $item['link'];
|
||||
$title = urldecode($item['title']);
|
||||
$date = $item['date_timestamp']; // date will be empty if conversion into timestamp failed
|
||||
if ($rssparser->getFormat() == 'rss') // If RSS
|
||||
$date = $item['date_timestamp']; // date will be empty if conversion into timestamp failed
|
||||
if ($rssparser->getFormat() == 'rss') // If RSS
|
||||
{
|
||||
if (! $date && isset($item['pubdate'])) $date=$item['pubdate'];
|
||||
if (! $date && isset($item['dc']['date'])) $date=$item['dc']['date'];
|
||||
@ -138,19 +142,27 @@ class box_external_rss extends ModeleBoxes
|
||||
$title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut
|
||||
$this->info_box_contents["$href"]="$title";
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $href,
|
||||
'target' => 'newrss');
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $href,
|
||||
'tooltip' => $title,
|
||||
'target' => 'newrss',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $title,
|
||||
'url' => $href,
|
||||
'maxlength' => 64,
|
||||
'target' => 'newrss');
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $title,
|
||||
'url' => $href,
|
||||
'tooltip' => $title,
|
||||
'maxlength' => 64,
|
||||
'target' => 'newrss',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" nowrap="1"',
|
||||
'text' => $date);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right" nowrap="1"',
|
||||
'text' => $date,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -101,55 +101,76 @@ class box_factures extends ModeleBoxes
|
||||
$late = '';
|
||||
if ($objp->paye == 0 && ($objp->fk_statut != 2 && $objp->fk_statut != 3) && $datelimite < ($now - $conf->facture->client->warning_delay)) { $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));}
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $picto,
|
||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $picto,
|
||||
'tooltip' => $langs->trans('CustomerInvoice').': '.$objp->facnumber,
|
||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->facnumber,
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->facnumber,
|
||||
'text2'=> $late,
|
||||
'tooltip' => $langs->trans('CustomerInvoice').': '.$objp->facnumber,
|
||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'maxlength'=>40,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'maxlength'=>40,
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3));
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/boxes/box_factures_fourn.php
|
||||
* \file htdocs/core/boxes/box_factures_fourn.php
|
||||
* \ingroup supplier
|
||||
* \brief Fichier de gestion d'une box des factures fournisseurs
|
||||
* \brief Fichier de gestion d'une box des factures fournisseurs
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
|
||||
@ -89,8 +89,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$i = 0;
|
||||
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$datelimite=$db->jdate($objp->datelimite);
|
||||
$date=$db->jdate($objp->df);
|
||||
@ -99,54 +98,79 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$late = '';
|
||||
if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'<br>'.$langs->trans('RefSupplier').': '.$objp->ref_supplier,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
||||
'text2'=> $late,
|
||||
'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'<br>'.$langs->trans('RefSupplier').': '.$objp->ref_supplier,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
|
||||
'text' => $objp->ref_supplier,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref_supplier,
|
||||
'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'<br>'.$langs->trans('RefSupplier').': '.$objp->ref_supplier,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $langs->trans('Supplier').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $langs->trans('Supplier').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'));
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$fac = new FactureFournisseur($db);
|
||||
$fac->fetch($objp->facid);
|
||||
$alreadypaid=$fac->getSommePaiement();
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type));
|
||||
$fac = new FactureFournisseur($db);
|
||||
$fac->fetch($objp->facid);
|
||||
$alreadypaid=$fac->getSommePaiement();
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoModifiedSupplierBills"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoModifiedSupplierBills"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->transnoentities("ReadPermissionNotAllowed"));
|
||||
}
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->transnoentities("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
|
||||
@ -257,8 +257,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
|
||||
// Loop on each TD
|
||||
$nbcolthisline=count($contents[$i]);
|
||||
for ($j=0; $j < $nbcolthisline; $j++)
|
||||
{
|
||||
for ($j=0; $j < $nbcolthisline; $j++) {
|
||||
// Define tdparam
|
||||
$tdparam='';
|
||||
if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td'];
|
||||
@ -270,13 +269,15 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
$text2withnotags=preg_replace('/<([^>]+)>/i','',$text2);
|
||||
$textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:'';
|
||||
//print "xxx $textwithnotags y";
|
||||
if (empty($contents[$i][$j]['tooltip'])) $contents[$i][$j]['tooltip']="";
|
||||
$tooltip=isset($contents[$i][$j]['tooltip'])?$contents[$i][$j]['tooltip']:'';
|
||||
|
||||
print '<td'.$tdparam.'>';
|
||||
print '<td'.$tdparam.'>'."\n";
|
||||
|
||||
// Url
|
||||
if (! empty($contents[$i][$j]['url']))
|
||||
if (! empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo']))
|
||||
{
|
||||
print '<a href="'.$contents[$i][$j]['url'].'" title="'.$textwithnotags.'"';
|
||||
print '<a href="'.$contents[$i][$j]['url'].'" title="'.dol_escape_htmltag($langs->trans("Show").' '.$tooltip, 1).'" class="classfortooltip"';
|
||||
//print ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "<a href>"
|
||||
print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
|
||||
print '>';
|
||||
@ -286,7 +287,8 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
if (! empty($contents[$i][$j]['logo']))
|
||||
{
|
||||
$logo=preg_replace("/^object_/i","",$contents[$i][$j]['logo']);
|
||||
print img_object($langs->trans("Show"),$logo);
|
||||
print '<a href="'.$contents[$i][$j]['url'].'">';
|
||||
print img_object($langs->trans("Show").' '.$tooltip, $logo, 'class="classfortooltip"');
|
||||
}
|
||||
|
||||
$maxlength=$MAXLENGTHBOX;
|
||||
@ -304,7 +306,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
|
||||
if (! empty($textnoformat)) print "\n".$textnoformat."\n";
|
||||
|
||||
print "</td>";
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -433,19 +433,17 @@ class DiscountAbsolute
|
||||
|
||||
$result='';
|
||||
|
||||
if ($option == 'invoice')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'">';
|
||||
$lienfin='</a>';
|
||||
if ($option == 'invoice') {
|
||||
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
$ref=$this->ref_facture_source;
|
||||
$picto='bill';
|
||||
}
|
||||
if ($option == 'discount')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->fk_soc.'">';
|
||||
$lienfin='</a>';
|
||||
if ($option == 'discount') {
|
||||
$label=$langs->trans("Discount");
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->fk_soc.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
$ref=$langs->trans("Discount");
|
||||
$picto='generic';
|
||||
}
|
||||
|
||||
@ -414,19 +414,20 @@ class EcmDirectory // extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
//$newref=str_replace('_',' ',$this->ref);
|
||||
$newref=$this->ref;
|
||||
$newlabel=$langs->trans("ShowECMSection").': '.$newref;
|
||||
$linkclose='"'.($more?' '.$more:'').' title="'.dol_escape_htmltag($newlabel, 1).'" class="classfortooltip">';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$this->id.'"'.($more?' '.$more:'').'>';
|
||||
if ($option == 'index') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=true"'.($more?' '.$more:'').'>';
|
||||
if ($option == 'indexexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=false"'.($more?' '.$more:'').'>';
|
||||
if ($option == 'indexnotexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=true"'.($more?' '.$more:'').'>';
|
||||
$lienfin='</a>';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$this->id.$linkclose;
|
||||
if ($option == 'index') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=true'.$linkclose;
|
||||
if ($option == 'indexexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=false'.$linkclose;
|
||||
if ($option == 'indexnotexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=true'.$linkclose;
|
||||
$lienfin='</a>';
|
||||
|
||||
//$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif';
|
||||
$picto='dir';
|
||||
|
||||
//$newref=str_replace('_',' ',$this->ref);
|
||||
$newref=$this->ref;
|
||||
$newlabel=$langs->trans("ShowECMSection").': '.$newref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($newlabel, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -1217,16 +1217,16 @@ class Expedition extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowSending").': '.$this->ref;
|
||||
|
||||
$url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id;
|
||||
|
||||
if ($short) return $url;
|
||||
|
||||
$linkstart = '<a href="'.$url.'">';
|
||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
$picto='sending';
|
||||
$label=$langs->trans("ShowSending").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -547,13 +547,13 @@ class Fichinter extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='intervention';
|
||||
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -531,12 +531,12 @@ class CommandeFournisseur extends CommonOrder
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='order';
|
||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -1472,19 +1472,19 @@ class FactureFournisseur extends CommonInvoice
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
|
||||
|
||||
if ($option == 'document')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
|
||||
|
||||
$ref=$this->ref;
|
||||
if (empty($ref)) $ref=$this->id;
|
||||
|
||||
@ -487,17 +487,17 @@ class PaiementFourn extends Paiement
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$text=$this->ref; // Sometimes ref contains label
|
||||
if (preg_match('/^\((.*)\)$/i',$text,$reg)) {
|
||||
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||
if ($reg[1]=='paiement') $reg[1]='Payment';
|
||||
$text=$langs->trans($reg[1]);
|
||||
}
|
||||
$label = $langs->trans("ShowPayment").': '.$text;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$text=$this->ref; // Sometimes ref contains label
|
||||
if (preg_match('/^\((.*)\)$/i',$text,$reg))
|
||||
{
|
||||
// Label g诩rique car entre parenth粥s. On l'affiche en le traduisant
|
||||
if ($reg[1]=='paiement') $reg[1]='Payment';
|
||||
$text=$langs->trans($reg[1]);
|
||||
}
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -658,14 +658,13 @@ class Holiday extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='holiday';
|
||||
|
||||
$label=$langs->trans("Show").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||
|
||||
@ -660,13 +660,13 @@ class Livraison extends CommonObject
|
||||
|
||||
$result='';
|
||||
$urlOption='';
|
||||
$label=$langs->trans("ShowReceiving").': '.$this->ref;
|
||||
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='sending';
|
||||
$label=$langs->trans("ShowReceiving").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -2812,33 +2812,27 @@ class Product extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$newref=$this->ref;
|
||||
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
|
||||
if ($this->type == 0) $label = $langs->trans("ShowProduct").': '.$this->ref.' '.$this->label;
|
||||
if ($this->type == 1) $label = $langs->trans("ShowService").': '.$this->ref.' '.$this->label;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option == 'supplier')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else if ($option == 'stock')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id.'">';
|
||||
if ($option == 'supplier') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
} else if ($option == 'stock') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
} else if ($option == 'composition') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
} else if ($option == 'category') {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=0'.$linkclose;
|
||||
} else {
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/card.php?id='.$this->id.$linkclose;
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else if ($option == 'composition')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=0">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/product/card.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
$newref=$this->ref;
|
||||
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
|
||||
|
||||
if ($withpicto) {
|
||||
if ($this->type == 0) $result.=($lien.img_object($langs->trans("ShowProduct").' '.$this->label, 'product', 'class="classfortooltip"').$lienfin.' ');
|
||||
|
||||
@ -512,11 +512,12 @@ class Entrepot extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowStock").': '.$this->libelle;
|
||||
|
||||
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowStock"), 'stock', 'class="classfortooltip"').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($label, 'stock', 'class="classfortooltip"').$lienfin.' ');
|
||||
$result.=$lien.$this->libelle.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -789,25 +789,22 @@ class Project extends CommonObject
|
||||
$result = '';
|
||||
$lien = '';
|
||||
$lienfin = '';
|
||||
$label = $langs->trans("ShowProject") . ': ' . $this->ref . ($this->title ? ' - ' . $this->title : '');
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option != 'nolink')
|
||||
{
|
||||
if (preg_match('/\.php$/',$option))
|
||||
{
|
||||
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . '">';
|
||||
$lienfin = '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . '">';
|
||||
$lienfin = '</a>';
|
||||
}
|
||||
if ($option != 'nolink') {
|
||||
if (preg_match('/\.php$/',$option)) {
|
||||
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . $linkclose;
|
||||
$lienfin = '</a>';
|
||||
} else {
|
||||
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . $linkclose;
|
||||
$lienfin = '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$picto = 'projectpub';
|
||||
if (!$this->public) $picto = 'project';
|
||||
|
||||
$label = $langs->trans("ShowProject") . ': ' . $this->ref . ($this->title ? ' - ' . $this->title : '');
|
||||
|
||||
if ($withpicto) $result.=($lien . img_object($label, $picto, 'class="classfortooltip"') . $lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -505,13 +505,13 @@ class Task extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowTask").': '.$this->ref.($this->label?' - '.$this->label:'');
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'').'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'').'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='projecttask';
|
||||
|
||||
$label=$langs->trans("ShowTask").': '.$this->ref.($this->label?' - '.$this->label:'');
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -869,10 +869,11 @@ class Resource extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowResource").': '.$this->ref;
|
||||
|
||||
if ($option == '')
|
||||
{
|
||||
$lien = '<a href="'.dol_buildpath('/resource/card.php',1).'?id='.$this->id. $get_params .'">';
|
||||
$lien = '<a href="'.dol_buildpath('/resource/card.php',1).'?id='.$this->id. $get_params .'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$picto='resource@resource';
|
||||
$label=$langs->trans("ShowResource").': '.$this->ref;
|
||||
|
||||
@ -880,7 +881,6 @@ class Resource extends CommonObject
|
||||
|
||||
$lienfin='</a>';
|
||||
|
||||
$label=$langs->trans("ShowResource").': '.$this->ref;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
|
||||
@ -422,8 +422,9 @@ class Address
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowAddress").': '.$this->label;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label, 'address', 'class="classfortooltip"').$lienfin.' ');
|
||||
|
||||
@ -1749,7 +1749,7 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
// Add type of canvas
|
||||
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
|
||||
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'" title="'.dol_escape_htmltag($name, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name, 'company', 'class="classfortooltip"').$lienfin);
|
||||
|
||||
@ -1786,14 +1786,14 @@ class User extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowUser").': '.$this->getFullName($langs,'','',24);
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto)
|
||||
{
|
||||
$result.=($lien.img_object($langs->trans("ShowUser"), 'user', 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto != 2) $result.=' ';
|
||||
if ($withpicto) {
|
||||
$result.=($lien.img_object($label, 'user', 'class="classfortooltip"').$lienfin);
|
||||
if ($withpicto != 2) $result.=' ';
|
||||
}
|
||||
$result.=$lien.$this->getFullName($langs,'','',24).$lienfin;
|
||||
return $result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user