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;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label=$langs->trans("ShowMember").': '.$this->ref;
|
||||||
|
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
|
|
||||||
if ($option == 'card')
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
if ($option == 'subscription')
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
if ($option == 'category')
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$picto='user';
|
$picto='user';
|
||||||
$label=$langs->trans("ShowMember");
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -270,12 +270,12 @@ class AdherentType extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='group';
|
$picto='group';
|
||||||
$label=$langs->trans("ShowTypeCard",$this->libelle);
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -264,12 +264,12 @@ class Cotisation extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='payment';
|
$picto='payment';
|
||||||
$label=$langs->trans("ShowSubscription");
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -1274,9 +1274,9 @@ class Categorie extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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);
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='category';
|
$picto='category';
|
||||||
|
|||||||
@ -897,11 +897,12 @@ class ActionComm extends CommonObject
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$result='';
|
$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;
|
$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;
|
//print 'rrr'.$this->libelle.'-'.$withpicto;
|
||||||
|
|
||||||
if ($withpicto == 2)
|
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)
|
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.= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
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">';
|
print '<tr '.$bc[$var].'><td class="nowrap">';
|
||||||
$propalstatic->id=$obj->rowid;
|
$propalstatic->id=$obj->rowid;
|
||||||
$propalstatic->ref=$obj->ref;
|
$propalstatic->ref=$obj->ref;
|
||||||
|
$propalstatic->ref_client=$obj->ref_client;
|
||||||
print $propalstatic->getNomUrl(1);
|
print $propalstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
@ -209,7 +210,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
{
|
{
|
||||||
$langs->load("orders");
|
$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.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
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">';
|
print '<tr '.$bc[$var].'><td class="nowrap">';
|
||||||
$orderstatic->id=$obj->rowid;
|
$orderstatic->id=$obj->rowid;
|
||||||
$orderstatic->ref=$obj->ref;
|
$orderstatic->ref=$obj->ref;
|
||||||
|
$orderstatic->ref_client=$obj->ref_client;
|
||||||
print $orderstatic->getNomUrl(1);
|
print $orderstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
@ -467,7 +469,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
{
|
{
|
||||||
$langs->load("propal");
|
$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.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
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->id=$obj->propalid;
|
||||||
$propalstatic->ref=$obj->ref;
|
$propalstatic->ref=$obj->ref;
|
||||||
|
$propalstatic->ref_client=$obj->ref_client;
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td class="nobordernopadding nowrap">';
|
print '<td class="nobordernopadding nowrap">';
|
||||||
|
|||||||
@ -2605,29 +2605,31 @@ class Propal extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
if ($option == '')
|
$label=$langs->trans("ShowPropal").': '.$this->ref;
|
||||||
{
|
if (! empty($this->ref_client))
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
|
$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
|
if ($option == 'compta') { // deprecated
|
||||||
{
|
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
|
|
||||||
}
|
}
|
||||||
if ($option == 'expedition')
|
if ($option == 'expedition') {
|
||||||
{
|
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .'">';
|
|
||||||
}
|
}
|
||||||
if ($option == 'document')
|
if ($option == 'document') {
|
||||||
{
|
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .$linkclose;
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .'">';
|
|
||||||
}
|
}
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='propal';
|
$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;
|
$result.=$lien.$this->ref.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2884,11 +2884,13 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'">';
|
|
||||||
$linkend='</a>';
|
|
||||||
|
|
||||||
$picto='order';
|
$picto='order';
|
||||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
$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) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -935,15 +935,16 @@ class Account extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$linkclose = '" title="'.dol_escape_htmltag($this->label, 1).'" class="classfortooltip">';
|
||||||
|
|
||||||
if (empty($mode))
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
else if ($mode == 'transactions')
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1483,11 +1484,11 @@ class AccountLine extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label=$langs->trans("ShowTransaction").': '.$this->rowid;
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$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>';
|
$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;
|
$result.=$lien.$this->rowid.$lienfin;
|
||||||
|
|
||||||
if ($option == 'showall' || $option == 'showconciliated') $result.=' (';
|
if ($option == 'showall' || $option == 'showconciliated') $result.=' (';
|
||||||
|
|||||||
@ -357,13 +357,13 @@ class Deplacement extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='trip';
|
$picto='trip';
|
||||||
|
|
||||||
$label=$langs->trans("Show").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -711,13 +711,13 @@ class Don extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='generic';
|
$picto='generic';
|
||||||
|
|
||||||
$label=$langs->trans("ShowDonation").': '.$this->id;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -558,13 +558,13 @@ class FactureRec extends Facture
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='bill';
|
$picto='bill';
|
||||||
|
|
||||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
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 ($this->type == self::TYPE_SITUATION) $label=$langs->transnoentitiesnoconv("ShowInvoiceSituation").': '.$this->ref;
|
||||||
if ($moretitle) $label.=' - '.$moretitle;
|
if ($moretitle) $label.=' - '.$moretitle;
|
||||||
|
|
||||||
$linkstart='<a href="'.$url.'">';
|
$linkstart='<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($linkstart.img_object(($max?dol_trunc($label,$max):$label), $picto, 'class="classfortooltip"').$linkend);
|
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;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='payment';
|
$picto='payment';
|
||||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -769,11 +769,12 @@ class RemiseCheque extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$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 && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||||
|
|
||||||
|
|||||||
@ -748,8 +748,9 @@ class Paiement extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
|
||||||
|
|||||||
@ -1118,17 +1118,18 @@ class BonPrelevement extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($option == 'xxx')
|
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>';
|
$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;
|
$result.=$lien.$this->ref.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -486,12 +486,12 @@ class PaymentSalary extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='payment';
|
$picto='payment';
|
||||||
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -420,11 +420,12 @@ class ChargeSociales extends CommonObject
|
|||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
if (empty($this->ref)) $this->ref=$this->lib;
|
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>';
|
$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 && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -585,13 +585,14 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
if (empty($this->ref)) $this->ref=$this->lib;
|
if (empty($this->ref)) $this->ref=$this->lib;
|
||||||
|
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||||
|
|
||||||
if (!empty($this->id))
|
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>';
|
$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 && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -638,12 +638,12 @@ class Tva extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='payment';
|
$picto='payment';
|
||||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -887,17 +887,18 @@ class Contact extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($option == 'xxx')
|
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>';
|
$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;
|
$result.=$lien.($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1682,13 +1682,13 @@ class Contrat extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='contract';
|
$picto='contract';
|
||||||
|
|
||||||
$label=$langs->trans("ShowContract").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
@ -2211,13 +2211,13 @@ class ContratLigne extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='contract';
|
$picto='contract';
|
||||||
|
|
||||||
$label=$langs->trans("ShowContractOfService").': '.$this->label;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -60,8 +60,7 @@ class box_actions extends ModeleBoxes
|
|||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastActionsToDo",$max));
|
$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 = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage,";
|
||||||
$sql.= " ta.code, ta.libelle as type_label,";
|
$sql.= " ta.code, ta.libelle as type_label,";
|
||||||
$sql.= " s.nom as name, s.rowid as socid";
|
$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);
|
dol_syslog("Box_actions::loadBox", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$late = '';
|
$late = '';
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datelimite=$db->jdate($objp->dp);
|
$datelimite=$db->jdate($objp->dp);
|
||||||
@ -98,31 +95,49 @@ class box_actions extends ModeleBoxes
|
|||||||
//($langs->transnoentities("Action".$objp->code)!=("Action".$objp->code) ? $langs->transnoentities("Action".$objp->code) : $objp->label)
|
//($langs->transnoentities("Action".$objp->code)!=("Action".$objp->code) ? $langs->transnoentities("Action".$objp->code) : $objp->label)
|
||||||
$label=empty($objp->label)?$objp->type_label:$objp->label;
|
$label=empty($objp->label)?$objp->type_label:$objp->label;
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => ("action"),
|
'logo' => ("action"),
|
||||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id);
|
'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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => dol_trunc($label,32),
|
'text' => dol_trunc($label,32),
|
||||||
'text2'=> $late,
|
'text2'=> $late,
|
||||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id);
|
'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"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => ($objp->socid?'company':''),
|
'logo' => ($objp->socid?'company':''),
|
||||||
'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''));
|
'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"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => dol_trunc($objp->name,24),
|
'text' => dol_trunc($objp->name,24),
|
||||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
'text' => dol_print_date($datelimite, "dayhour"));
|
'td' => 'align="left" class="nowrap"',
|
||||||
|
'text' => dol_print_date($datelimite, "dayhour"),
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][5] = array(
|
||||||
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''));
|
'td' => 'align="right"',
|
||||||
|
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''),
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][6] = array(
|
||||||
'text' => $actionstatic->LibStatut($objp->percentage,3));
|
'td' => 'align="right" width="18"',
|
||||||
|
'text' => $actionstatic->LibStatut($objp->percentage,3),
|
||||||
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -130,16 +145,18 @@ class box_actions extends ModeleBoxes
|
|||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo"));
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
'align' => 'left',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -53,8 +54,6 @@ class box_activity extends ModeleBoxes
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db=$db;
|
$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
|
// FIXME: Pb into some status
|
||||||
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous comments)
|
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous comments)
|
||||||
}
|
}
|
||||||
@ -69,26 +68,36 @@ class box_activity extends ModeleBoxes
|
|||||||
{
|
{
|
||||||
global $conf, $user, $langs, $db;
|
global $conf, $user, $langs, $db;
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$totalMnt = 0;
|
$totalMnt = 0;
|
||||||
$totalnb = 0;
|
$totalnb = 0;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
$cachetime = 3600;
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
$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;
|
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
||||||
$textHead = $langs->trans("Activity").' ('.$nbofyears.' '.$langs->trans("DurationYears").')';
|
$textHead = $langs->trans("Activity").' <span class="badge">'.$nbofyears.' '.$langs->trans("DurationYears").'</span>';
|
||||||
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
$this->info_box_head = array(
|
||||||
|
'text' => $textHead,
|
||||||
|
'limit'=> dol_strlen($textHead),
|
||||||
|
);
|
||||||
|
|
||||||
// compute the year limit to show
|
// compute the year limit to show
|
||||||
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofyears, "y");
|
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofyears, "y");
|
||||||
|
|
||||||
// list the summary of the bills
|
// list the summary of the bills
|
||||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
if (! empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$facturestatic=new Facture($db);
|
$facturestatic=new Facture($db);
|
||||||
|
|
||||||
|
$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 = "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.= " 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";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -102,40 +111,72 @@ class box_activity extends ModeleBoxes
|
|||||||
$sql.= " ORDER BY f.fk_statut DESC";
|
$sql.= " ORDER BY f.fk_statut DESC";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
while ($i < $num)
|
$j=0;
|
||||||
{
|
while ($j < $num) {
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'bill');
|
$data[$j]=$db->fetch_object($result);
|
||||||
$objp = $db->fetch_object($result);
|
$j++;
|
||||||
|
}
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1,$objp->fk_statut,0)." ".$objp->annee);
|
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||||
$billurl="viewstatut=2&paye=1&year=".$objp->annee;
|
$db->free($result);
|
||||||
|
} else {
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
dol_print_error($db);
|
||||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
}
|
||||||
|
} 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][3] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
'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"',
|
||||||
|
'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($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||||
);
|
);
|
||||||
|
|
||||||
// We add only for the current year
|
// We add only for the current year
|
||||||
if ($objp->annee == date("Y"))
|
if ($data[$j]->annee == date("Y")) {
|
||||||
{
|
$totalnb += $data[$j]->nb;
|
||||||
$totalnb += $objp->nb;
|
$totalMnt += $data[$j]->Mnttot;
|
||||||
$totalMnt += $objp->Mnttot;
|
|
||||||
}
|
}
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut(1,$objp->fk_statut,3) );
|
$this->info_box_contents[$i][4] = array(
|
||||||
|
'td' => 'align="right" width="18"',
|
||||||
|
'text' => $facturestatic->LibStatut(1,$data[$j]->fk_statut,3),
|
||||||
|
);
|
||||||
$i++;
|
$i++;
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
if (count($data)==0)
|
||||||
|
$this->info_box_contents[$i][0] = array(
|
||||||
$db->free($result);
|
'td' => 'align="center"',
|
||||||
|
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
|
||||||
|
|
||||||
|
$cachefile = DOL_DATA_ROOT.'/facture/temp/boxactivity-invoice2'.$fileid;
|
||||||
|
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||||
|
|
||||||
|
if ($refresh) {
|
||||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
$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.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
@ -145,46 +186,80 @@ class box_activity extends ModeleBoxes
|
|||||||
$sql.= " ORDER BY f.fk_statut DESC";
|
$sql.= " ORDER BY f.fk_statut DESC";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result) + $i;
|
$num = $db->num_rows($result) + $i;
|
||||||
$now=dol_now();
|
$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)
|
while ($i < count($data)) {
|
||||||
{
|
$billurl="viewstatut=".$data[$j]->fk_statut."&paye=0";
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
'logo' => 'bill');
|
'td' => 'align="left" width="16"',
|
||||||
$objp = $db->fetch_object($result);
|
'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",
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
'logo' => 'bill',
|
||||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$objp->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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
'td' => 'align="left"',
|
||||||
|
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||||
|
);
|
||||||
|
|
||||||
|
$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;
|
$totalMnt += $objp->Mnttot;
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
'text' => $facturestatic->LibStatut(0,$objp->fk_statut,3)
|
'td' => 'align="right" width="18"',
|
||||||
|
'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3),
|
||||||
);
|
);
|
||||||
$i++;
|
$i++;
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
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"),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', 'maxlength'=>500, 'text' => ($db->error().' sql='.$sql));
|
$this->info_box_contents[0][0] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
|
'maxlength'=>500, 'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// list the summary of the orders
|
// list the summary of the orders
|
||||||
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
if (! empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
|
|
||||||
|
$cachefile = DOL_DATA_ROOT.'/commande/temp/boxactivity-order'.$fileid;
|
||||||
|
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||||
|
$data = array();
|
||||||
|
if ($refresh) {
|
||||||
|
|
||||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb";
|
$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";
|
$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";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -200,42 +275,69 @@ class box_activity extends ModeleBoxes
|
|||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result) + $i;
|
$num = $db->num_rows($result) + $i;
|
||||||
while ($i < $num)
|
$j=0;
|
||||||
{
|
while ($j < $num) {
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_order');
|
$data[$j]=$db->fetch_object($result);
|
||||||
|
$j++;
|
||||||
$objp = $db->fetch_object($result);
|
}
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||||
'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($objp->fk_statut,0,0)
|
$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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
'text' => $objp->nb,
|
'td' => 'align="left"',
|
||||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$objp->fk_statut
|
'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||||
);
|
);
|
||||||
$totalnb += $objp->nb;
|
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
'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;
|
||||||
|
|
||||||
|
$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),
|
||||||
);
|
);
|
||||||
$totalMnt += $objp->Mnttot;
|
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,0,3));
|
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// list the summary of the propals
|
// list the summary of the propals
|
||||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
if (! empty($conf->propal->enabled) && $user->rights->propal->lire) {
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
$propalstatic=new Propal($db);
|
$propalstatic=new Propal($db);
|
||||||
|
|
||||||
|
$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 = "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";
|
$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";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -251,42 +353,82 @@ class box_activity extends ModeleBoxes
|
|||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result) + $i;
|
$num = $db->num_rows($result) + $i;
|
||||||
while ($i < $num)
|
$j=0;
|
||||||
{
|
while ($j < $num) {
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_propal');
|
$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'
|
||||||
|
);
|
||||||
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
'text' =>$langs->trans("Proposals")." ".$propalstatic->LibStatut($objp->fk_statut,0)
|
'td' => 'align="left"',
|
||||||
|
'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
'text' => $objp->nb,
|
'td' => 'align="right"',
|
||||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$objp->fk_statut
|
'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 += $objp->nb;
|
$totalnb += $data[$j]->nb;
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
'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),
|
||||||
);
|
);
|
||||||
$totalMnt += $objp->Mnttot;
|
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3));
|
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the sum in the bottom of the boxes
|
// 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][1] = array(
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => $totalnb);
|
'td' => 'align="left" ',
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency));
|
'text' => $langs->trans("Total")." ".$textHead,
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => "");
|
);
|
||||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => "");
|
$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' => "",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -52,10 +52,11 @@ class box_bookmarks extends ModeleBoxes
|
|||||||
|
|
||||||
$this->max=$max;
|
$this->max=$max;
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max),
|
$this->info_box_head = array(
|
||||||
'sublink' => DOL_URL_ROOT.'/bookmarks/list.php');
|
'text' => $langs->trans("BoxMyLastBookmarks",$max),
|
||||||
if ($user->rights->bookmark->creer)
|
'sublink' => DOL_URL_ROOT.'/bookmarks/list.php',
|
||||||
{
|
);
|
||||||
|
if ($user->rights->bookmark->creer) {
|
||||||
$this->info_box_head['subpicto']='object_bookmark';
|
$this->info_box_head['subpicto']='object_bookmark';
|
||||||
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
|
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
|
||||||
}
|
}
|
||||||
@ -81,41 +82,50 @@ class box_bookmarks extends ModeleBoxes
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => $objp->url,
|
'url' => $objp->url,
|
||||||
'target' => $objp->target?'newtab':'');
|
'tooltip' => $objp->title,
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
'target' => $objp->target?'newtab':'',
|
||||||
|
);
|
||||||
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->title,
|
'text' => $objp->title,
|
||||||
'url' => $objp->url,
|
'url' => $objp->url,
|
||||||
'target' => $objp->target?'newtab':'');
|
'tooltip' => $objp->title,
|
||||||
|
'target' => $objp->target?'newtab':'',
|
||||||
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0)
|
if ($num==0) {
|
||||||
{
|
|
||||||
$mytxt=$langs->trans("NoRecordedBookmarks");
|
$mytxt=$langs->trans("NoRecordedBookmarks");
|
||||||
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
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);
|
$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);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else
|
$this->info_box_contents[0][0] = array(
|
||||||
{
|
'td' => 'align="left"',
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
'align' => 'left',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,19 +104,28 @@ class box_clients extends ModeleBoxes
|
|||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
$datem=$db->jdate($objp->tms);
|
$datem=$db->jdate($objp->tms);
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => $url.$objp->socid);
|
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||||
|
'url' => $url.$objp->socid
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
);
|
||||||
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->name,
|
'text' => $objp->name,
|
||||||
'url' => $url.$objp->socid);
|
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||||
|
'url' => $url.$objp->socid
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
'text' => dol_print_date($datem, "day"));
|
'td' => 'align="right"',
|
||||||
|
'text' => dol_print_date($datem, "day")
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
'text' => $thirdpartystatic->LibStatut($objp->status,3));
|
'td' => 'align="right" width="18"',
|
||||||
|
'text' => $thirdpartystatic->LibStatut($objp->status,3)
|
||||||
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,53 +80,66 @@ class box_commandes extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$date=$db->jdate($objp->date_commande);
|
$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"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid);
|
'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"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->ref,
|
'text' => $objp->ref,
|
||||||
'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid);
|
'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"',
|
);
|
||||||
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => 'company',
|
'logo' => 'company',
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->name,
|
'text' => $objp->name,
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => price($objp->total_ht),
|
'text' => price($objp->total_ht),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER))
|
if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER)) {
|
||||||
{
|
|
||||||
if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid);
|
if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid);
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''),
|
'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:'')
|
'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"',
|
$this->info_box_contents[$i][] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => dol_print_date($date,'day'),
|
'text' => dol_print_date($date,'day'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][] = array(
|
||||||
'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3));
|
'td' => 'align="right" width="18"',
|
||||||
|
'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3),
|
||||||
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -134,16 +147,18 @@ class box_commandes extends ModeleBoxes
|
|||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
'align' => 'left',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,8 +76,7 @@ class box_comptes extends ModeleBoxes
|
|||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleCurrentAccounts"));
|
$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 = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,";
|
||||||
$sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix as iban,";
|
$sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix as iban,";
|
||||||
$sql.= " domiciliation, proprio, owner_address,";
|
$sql.= " domiciliation, proprio, owner_address,";
|
||||||
@ -92,73 +91,84 @@ class box_comptes extends ModeleBoxes
|
|||||||
|
|
||||||
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$solde_total = 0;
|
$solde_total = array();
|
||||||
|
|
||||||
$listofcurrencies=array();
|
|
||||||
$account_static = new Account($db);
|
$account_static = new Account($db);
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$account_static->id = $objp->rowid;
|
$account_static->id = $objp->rowid;
|
||||||
$solde=$account_static->solde(0);
|
$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"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid);
|
'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][2] = array('td' => 'align="left"',
|
|
||||||
'text' => $objp->number
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
$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][3] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code)
|
'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code)
|
||||||
);
|
);
|
||||||
|
|
||||||
$listofcurrencies[$objp->currency_code]=1;
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total
|
// Total
|
||||||
if (count($listofcurrencies) <= 1)
|
foreach ($solde_total as $key=>$solde) {
|
||||||
{
|
$this->info_box_contents[$i][0] = array(
|
||||||
$this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="right" class="liste_total"',
|
'tr' => 'class="liste_total"',
|
||||||
'text' => $langs->trans('Total')
|
'td' => 'align="right" class="liste_total"',
|
||||||
|
'text' => ' ',
|
||||||
);
|
);
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="right" class="liste_total"',
|
$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' => ' '
|
'text' => ' '
|
||||||
);
|
);
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" class="liste_total"',
|
$totalamount=price($solde,0,$langs,0,0,-1,$key);
|
||||||
'text' => ' '
|
$this->info_box_contents[$i][3] = array(
|
||||||
);
|
'td' => 'align="right" class="liste_total"',
|
||||||
$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
|
'text' => $totalamount
|
||||||
);
|
);
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,16 +73,14 @@ class box_contacts extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
$societestatic=new Societe($db);
|
$societestatic=new Societe($db);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
$datem=$db->jdate($objp->tms);
|
$datem=$db->jdate($objp->tms);
|
||||||
@ -94,41 +92,61 @@ class box_contacts extends ModeleBoxes
|
|||||||
$societestatic->id=$objp->fk_soc;
|
$societestatic->id=$objp->fk_soc;
|
||||||
$societestatic->name=$objp->socname;
|
$societestatic->name=$objp->socname;
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid);
|
'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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $contactstatic->getFullName($langs,0),
|
'text' => $contactstatic->getFullName($langs,0),
|
||||||
'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid);
|
'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"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => ($objp->fk_soc > 0?'company':''),
|
'logo' => ($objp->fk_soc > 0?'company':''),
|
||||||
'url' => ($objp->fk_soc > 0?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc:''));
|
'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"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $societestatic->name,
|
'text' => $societestatic->name,
|
||||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc);
|
'tooltip' => $societestatic->name,
|
||||||
|
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc,
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
'text' => dol_print_date($datem, "day"));
|
'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);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
'align' => 'left',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,8 +79,7 @@ class box_contracts extends ModeleBoxes
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
$dateterm=$db->jdate($objp->fin_validite);
|
$dateterm=$db->jdate($objp->fin_validite);
|
||||||
@ -94,49 +93,68 @@ class box_contracts extends ModeleBoxes
|
|||||||
// fin_validite is no more on contract but on services
|
// 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")); }
|
// 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"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid);
|
'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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
||||||
|
'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid),
|
||||||
'text2'=> $late,
|
'text2'=> $late,
|
||||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid);
|
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid,
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => 'company',
|
'logo' => 'company',
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => dol_trunc($objp->name,40),
|
'text' => dol_trunc($objp->name,40),
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
'text' => dol_print_date($datec,'day'));
|
'td' => 'align="right"',
|
||||||
|
'text' => dol_print_date($datec,'day'),
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][5] = array('td' => 'align="right" class="nowrap"',
|
$this->info_box_contents[$i][5] = array(
|
||||||
|
'td' => 'align="right" class="nowrap"',
|
||||||
'text' => $contractstatic->getLibStatut(6),
|
'text' => $contractstatic->getLibStatut(6),
|
||||||
'asis'=>1
|
'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);
|
$db->free($resql);
|
||||||
}
|
} else {
|
||||||
else
|
$this->info_box_contents[0][0] = array(
|
||||||
{
|
'td' => 'align="left"',
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
$this->info_box_contents[0][0] = array(
|
||||||
{
|
'td' => 'align="left"',
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,8 +98,12 @@ class box_external_rss extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->info_box_head = array('text' => $title,
|
$this->info_box_head = array(
|
||||||
'sublink' => $link, 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate()?dol_print_date($rssparser->getLastFetchDate(),"dayhourtext"):$langs->trans("Unknown")), 'subpicto'=>'object_bookmark');
|
'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
|
// INFO on items
|
||||||
@ -138,19 +142,27 @@ class box_external_rss extends ModeleBoxes
|
|||||||
$title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut
|
$title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut
|
||||||
$this->info_box_contents["$href"]="$title";
|
$this->info_box_contents["$href"]="$title";
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => $href,
|
'url' => $href,
|
||||||
'target' => 'newrss');
|
'tooltip' => $title,
|
||||||
|
'target' => 'newrss',
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $title,
|
'text' => $title,
|
||||||
'url' => $href,
|
'url' => $href,
|
||||||
|
'tooltip' => $title,
|
||||||
'maxlength' => 64,
|
'maxlength' => 64,
|
||||||
'target' => 'newrss');
|
'target' => 'newrss',
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" nowrap="1"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
'text' => $date);
|
'td' => 'align="right" nowrap="1"',
|
||||||
|
'text' => $date,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -101,53 +101,74 @@ class box_factures extends ModeleBoxes
|
|||||||
$late = '';
|
$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')));}
|
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"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $picto,
|
'logo' => $picto,
|
||||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
'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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->facnumber,
|
'text' => $objp->facnumber,
|
||||||
'text2'=> $late,
|
'text2'=> $late,
|
||||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
'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"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => 'company',
|
'logo' => 'company',
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->name,
|
'text' => $objp->name,
|
||||||
'maxlength'=>40,
|
'maxlength'=>40,
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => price($objp->total_ht),
|
'text' => price($objp->total_ht),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][5] = array(
|
||||||
|
'td' => 'align="right"',
|
||||||
'text' => dol_print_date($date,'day'),
|
'text' => dol_print_date($date,'day'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][6] = array(
|
||||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3));
|
'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);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else
|
$this->info_box_contents[0][0] = array(
|
||||||
{
|
'td' => 'align="left"',
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,8 +89,7 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datelimite=$db->jdate($objp->datelimite);
|
$datelimite=$db->jdate($objp->datelimite);
|
||||||
$date=$db->jdate($objp->df);
|
$date=$db->jdate($objp->df);
|
||||||
@ -99,52 +98,77 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
$late = '';
|
$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')));
|
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"',
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
'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"',
|
$this->info_box_contents[$i][1] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
||||||
'text2'=> $late,
|
'text2'=> $late,
|
||||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
'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"',
|
$this->info_box_contents[$i][2] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->ref_supplier,
|
'text' => $objp->ref_supplier,
|
||||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
'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"',
|
$this->info_box_contents[$i][3] = array(
|
||||||
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => 'company',
|
'logo' => 'company',
|
||||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][4] = array(
|
||||||
|
'td' => 'align="left"',
|
||||||
'text' => $objp->name,
|
'text' => $objp->name,
|
||||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
'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"',
|
$this->info_box_contents[$i][5] = array(
|
||||||
'text' => dol_print_date($date,'day'));
|
'td' => 'align="right"',
|
||||||
|
'text' => dol_print_date($date,'day'),
|
||||||
|
);
|
||||||
|
|
||||||
$fac = new FactureFournisseur($db);
|
$fac = new FactureFournisseur($db);
|
||||||
$fac->fetch($objp->facid);
|
$fac->fetch($objp->facid);
|
||||||
$alreadypaid=$fac->getSommePaiement();
|
$alreadypaid=$fac->getSommePaiement();
|
||||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][6] = array(
|
||||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type));
|
'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);
|
$db->free($result);
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql));
|
'text' => ($db->error().' sql='.$sql),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
$this->info_box_contents[0][0] = array(
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'text' => $langs->transnoentities("ReadPermissionNotAllowed"));
|
'text' => $langs->transnoentities("ReadPermissionNotAllowed"),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -257,8 +257,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
|
|
||||||
// Loop on each TD
|
// Loop on each TD
|
||||||
$nbcolthisline=count($contents[$i]);
|
$nbcolthisline=count($contents[$i]);
|
||||||
for ($j=0; $j < $nbcolthisline; $j++)
|
for ($j=0; $j < $nbcolthisline; $j++) {
|
||||||
{
|
|
||||||
// Define tdparam
|
// Define tdparam
|
||||||
$tdparam='';
|
$tdparam='';
|
||||||
if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td'];
|
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);
|
$text2withnotags=preg_replace('/<([^>]+)>/i','',$text2);
|
||||||
$textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:'';
|
$textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:'';
|
||||||
//print "xxx $textwithnotags y";
|
//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
|
// 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 ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "<a href>"
|
||||||
print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
|
print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
|
||||||
print '>';
|
print '>';
|
||||||
@ -286,7 +287,8 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
if (! empty($contents[$i][$j]['logo']))
|
if (! empty($contents[$i][$j]['logo']))
|
||||||
{
|
{
|
||||||
$logo=preg_replace("/^object_/i","",$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;
|
$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";
|
if (! empty($textnoformat)) print "\n".$textnoformat."\n";
|
||||||
|
|
||||||
print "</td>";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -433,19 +433,17 @@ class DiscountAbsolute
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
if ($option == 'invoice')
|
if ($option == 'invoice') {
|
||||||
{
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'">';
|
|
||||||
$lienfin='</a>';
|
|
||||||
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
|
$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;
|
$ref=$this->ref_facture_source;
|
||||||
$picto='bill';
|
$picto='bill';
|
||||||
}
|
}
|
||||||
if ($option == 'discount')
|
if ($option == 'discount') {
|
||||||
{
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->fk_soc.'">';
|
|
||||||
$lienfin='</a>';
|
|
||||||
$label=$langs->trans("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");
|
$ref=$langs->trans("Discount");
|
||||||
$picto='generic';
|
$picto='generic';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -414,19 +414,20 @@ class EcmDirectory // extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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:'').'>';
|
$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"'.($more?' '.$more:'').'>';
|
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"'.($more?' '.$more:'').'>';
|
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"'.($more?' '.$more:'').'>';
|
if ($option == 'indexnotexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&sectionexpand=true'.$linkclose;
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
//$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif';
|
//$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif';
|
||||||
$picto='dir';
|
$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) $result.=($lien.img_object($newlabel, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -1217,16 +1217,16 @@ class Expedition extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label=$langs->trans("ShowSending").': '.$this->ref;
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id;
|
||||||
|
|
||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'">';
|
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
$picto='sending';
|
$picto='sending';
|
||||||
$label=$langs->trans("ShowSending").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -547,13 +547,13 @@ class Fichinter extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='intervention';
|
$picto='intervention';
|
||||||
|
|
||||||
$label=$langs->trans("Show").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -531,12 +531,12 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='order';
|
$picto='order';
|
||||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -1472,19 +1472,19 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||||
|
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
|
||||||
|
|
||||||
if ($option == 'document')
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
else
|
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>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
|
||||||
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
|
|
||||||
|
|
||||||
$ref=$this->ref;
|
$ref=$this->ref;
|
||||||
if (empty($ref)) $ref=$this->id;
|
if (empty($ref)) $ref=$this->id;
|
||||||
|
|||||||
@ -487,17 +487,17 @@ class PaiementFourn extends Paiement
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'">';
|
|
||||||
$lienfin='</a>';
|
|
||||||
|
|
||||||
$text=$this->ref; // Sometimes ref contains label
|
$text=$this->ref; // Sometimes ref contains label
|
||||||
if (preg_match('/^\((.*)\)$/i',$text,$reg))
|
if (preg_match('/^\((.*)\)$/i',$text,$reg)) {
|
||||||
{
|
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||||
// Label g诩rique car entre parenth粥s. On l'affiche en le traduisant
|
|
||||||
if ($reg[1]=='paiement') $reg[1]='Payment';
|
if ($reg[1]=='paiement') $reg[1]='Payment';
|
||||||
$text=$langs->trans($reg[1]);
|
$text=$langs->trans($reg[1]);
|
||||||
}
|
}
|
||||||
|
$label = $langs->trans("ShowPayment").': '.$text;
|
||||||
|
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/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);
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -658,14 +658,13 @@ class Holiday extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='holiday';
|
$picto='holiday';
|
||||||
|
|
||||||
$label=$langs->trans("Show").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||||
|
|||||||
@ -660,13 +660,13 @@ class Livraison extends CommonObject
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$urlOption='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='sending';
|
$picto='sending';
|
||||||
$label=$langs->trans("ShowReceiving").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -2812,33 +2812,27 @@ class Product extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
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.'">';
|
|
||||||
$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;
|
$newref=$this->ref;
|
||||||
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
|
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.$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>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
if ($this->type == 0) $result.=($lien.img_object($langs->trans("ShowProduct").' '.$this->label, 'product', 'class="classfortooltip"').$lienfin.' ');
|
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;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label = $langs->trans("ShowStock").': '.$this->libelle;
|
||||||
|
|
||||||
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'">';
|
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$lienfin='</a>';
|
$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;
|
$result.=$lien.$this->libelle.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -789,17 +789,15 @@ class Project extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
$lien = '';
|
$lien = '';
|
||||||
$lienfin = '';
|
$lienfin = '';
|
||||||
|
$label = $langs->trans("ShowProject") . ': ' . $this->ref . ($this->title ? ' - ' . $this->title : '');
|
||||||
|
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
|
|
||||||
if ($option != 'nolink')
|
if ($option != 'nolink') {
|
||||||
{
|
if (preg_match('/\.php$/',$option)) {
|
||||||
if (preg_match('/\.php$/',$option))
|
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . $linkclose;
|
||||||
{
|
|
||||||
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . '">';
|
|
||||||
$lienfin = '</a>';
|
$lienfin = '</a>';
|
||||||
}
|
} else {
|
||||||
else
|
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . $linkclose;
|
||||||
{
|
|
||||||
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . '">';
|
|
||||||
$lienfin = '</a>';
|
$lienfin = '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -807,7 +805,6 @@ class Project extends CommonObject
|
|||||||
$picto = 'projectpub';
|
$picto = 'projectpub';
|
||||||
if (!$this->public) $picto = 'project';
|
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) $result.=($lien . img_object($label, $picto, 'class="classfortooltip"') . $lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -505,13 +505,13 @@ class Task extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='projecttask';
|
$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) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -869,10 +869,11 @@ class Resource extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
$label=$langs->trans("ShowResource").': '.$this->ref;
|
||||||
|
|
||||||
if ($option == '')
|
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';
|
$picto='resource@resource';
|
||||||
$label=$langs->trans("ShowResource").': '.$this->ref;
|
$label=$langs->trans("ShowResource").': '.$this->ref;
|
||||||
|
|
||||||
@ -880,7 +881,6 @@ class Resource extends CommonObject
|
|||||||
|
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$label=$langs->trans("ShowResource").': '.$this->ref;
|
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
|||||||
@ -422,8 +422,9 @@ class Address
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label, 'address', 'class="classfortooltip"').$lienfin.' ');
|
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
|
// 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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name, 'company', 'class="classfortooltip"').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name, 'company', 'class="classfortooltip"').$lienfin);
|
||||||
|
|||||||
@ -1786,13 +1786,13 @@ class User extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$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>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto)
|
if ($withpicto) {
|
||||||
{
|
$result.=($lien.img_object($label, 'user', 'class="classfortooltip"').$lienfin);
|
||||||
$result.=($lien.img_object($langs->trans("ShowUser"), 'user', 'class="classfortooltip"').$lienfin);
|
|
||||||
if ($withpicto != 2) $result.=' ';
|
if ($withpicto != 2) $result.=' ';
|
||||||
}
|
}
|
||||||
$result.=$lien.$this->getFullName($langs,'','',24).$lienfin;
|
$result.=$lien.$this->getFullName($langs,'','',24).$lienfin;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user