mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
Tooltip
This commit is contained in:
@@ -90,8 +90,8 @@ class box_actions extends ModeleBoxes
|
||||
$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$line = 0;
|
||||
while ($line < $num) {
|
||||
$late = '';
|
||||
$objp = $db->fetch_object($result);
|
||||
$datelimite = $db->jdate($objp->dp);
|
||||
@@ -109,39 +109,39 @@ class box_actions extends ModeleBoxes
|
||||
$label = empty($objp->label)?$objp->type_label:$objp->label;
|
||||
|
||||
$tooltip = $langs->trans('Action'.$objp->code).': '.$label;
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $actionstatic->getNomUrl(1),
|
||||
'text2'=> $late,
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $societestatic->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left" class="nowrap"',
|
||||
'text' => dol_print_date($datelimite, "dayhour"),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $actionstatic->LibStatut($objp->percentage,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoActionsToDo"),
|
||||
);
|
||||
@@ -184,23 +184,23 @@ class box_actions extends ModeleBoxes
|
||||
{
|
||||
print '<div id="dialog" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
|
||||
print '<table width=100%>';
|
||||
for ($i=0, $n=$nblines; $i < $n; $i++)
|
||||
for ($line=0, $n=$nblines; $line < $n; $line++)
|
||||
{
|
||||
if (isset($contents[$i]))
|
||||
if (isset($contents[$line]))
|
||||
{
|
||||
// on affiche que les évènement du jours ou passé
|
||||
// qui ne sont pas à 100%
|
||||
$actioncejour=true;
|
||||
$var=!$var;
|
||||
// TR
|
||||
$logo=$contents[$i][0]['logo'];
|
||||
$label=$contents[$i][1]['text'];
|
||||
$urlevent=$contents[$i][1]['url'];
|
||||
$logosoc=$contents[$i][2]['logo'];
|
||||
$nomsoc=$contents[$i][3]['text'];
|
||||
$urlsoc=$contents[$i][3]['url'];
|
||||
$dateligne=$contents[$i][4]['text'];
|
||||
$percentage=$contents[$i][5]['text'];
|
||||
$logo=$contents[$line][0]['logo'];
|
||||
$label=$contents[$line][1]['text'];
|
||||
$urlevent=$contents[$line][1]['url'];
|
||||
$logosoc=$contents[$line][2]['logo'];
|
||||
$nomsoc=$contents[$line][3]['text'];
|
||||
$urlsoc=$contents[$line][3]['url'];
|
||||
$dateligne=$contents[$line][4]['text'];
|
||||
$percentage=$contents[$line][5]['text'];
|
||||
print '<tr '.$bcx[$var].'>';
|
||||
print '<td align=center>';
|
||||
print img_object("",$logo);
|
||||
|
||||
@@ -73,7 +73,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$totalMnt = 0;
|
||||
$totalnb = 0;
|
||||
$i = 0;
|
||||
$line = 0;
|
||||
$cachetime = 3600;
|
||||
$fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache';
|
||||
$now = dol_now();
|
||||
@@ -132,28 +132,28 @@ class box_activity extends ModeleBoxes
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
while ($line < count($data)) {
|
||||
$billurl="viewstatut=2&paye=1&year=".$data[$j]->annee;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1,$data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
'logo' => 'bill',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
$this->info_box_contents[$line][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1,$data[$j]->fk_statut,0)." ".$data[$j]->annee,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
$this->info_box_contents[$line][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(
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
@@ -163,15 +163,15 @@ class box_activity extends ModeleBoxes
|
||||
$totalnb += $data[$j]->nb;
|
||||
$totalMnt += $data[$j]->Mnttot;
|
||||
}
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(1,$data[$j]->fk_statut,3),
|
||||
);
|
||||
$i++;
|
||||
$line++;
|
||||
$j++;
|
||||
}
|
||||
if (count($data)==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||
);
|
||||
@@ -193,7 +193,7 @@ class box_activity extends ModeleBoxes
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$num = $db->num_rows($result) + $line;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
@@ -212,41 +212,41 @@ class box_activity extends ModeleBoxes
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
|
||||
while ($i < count($data)) {
|
||||
while ($line < count($data)) {
|
||||
$billurl="viewstatut=".$data[$j]->fk_statut."&paye=0";
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||
'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
|
||||
'logo' => 'bill',
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
$this->info_box_contents[$line][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$data[$j]->fk_statut,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
$this->info_box_contents[$line][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(
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency),
|
||||
);
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3),
|
||||
);
|
||||
$i++;
|
||||
$line++;
|
||||
$j++;
|
||||
}
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedInvoices"),
|
||||
);
|
||||
@@ -286,7 +286,7 @@ class box_activity extends ModeleBoxes
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$num = $db->num_rows($result) + $line;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
@@ -304,20 +304,20 @@ class box_activity extends ModeleBoxes
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
while ($line < count($data)) {
|
||||
$this->info_box_contents[$line][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][1] = array(
|
||||
$this->info_box_contents[$line][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
$this->info_box_contents[$line][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0),
|
||||
@@ -325,17 +325,17 @@ class box_activity extends ModeleBoxes
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
$this->info_box_contents[$line][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(
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $commandestatic->LibStatut($data[$j]->fk_statut,0,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
@@ -367,7 +367,7 @@ class box_activity extends ModeleBoxes
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result) + $i;
|
||||
$num = $db->num_rows($result) + $line;
|
||||
$j=0;
|
||||
while ($j < $num) {
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
@@ -385,8 +385,8 @@ class box_activity extends ModeleBoxes
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
while ($i < count($data)) {
|
||||
$this->info_box_contents[$i][] = array(
|
||||
while ($line < count($data)) {
|
||||
$this->info_box_contents[$line][] = 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),
|
||||
@@ -394,12 +394,12 @@ class box_activity extends ModeleBoxes
|
||||
);
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0),
|
||||
@@ -407,40 +407,40 @@ class box_activity extends ModeleBoxes
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = 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][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $propalstatic->LibStatut($data[$j]->fk_statut,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add the sum in the bottom of the boxes
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
$this->info_box_contents[$line][1] = array(
|
||||
'td' => 'align="left" ',
|
||||
'text' => $langs->trans("Total")." ".$textHead,
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
$this->info_box_contents[$line][2] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => $totalnb,
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
$this->info_box_contents[$line][3] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency)
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => "",
|
||||
);
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
$this->info_box_contents[$line][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => "",
|
||||
);
|
||||
|
||||
@@ -81,19 +81,19 @@ class box_bookmarks extends ModeleBoxes
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
$line = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
while ($line < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $objp->url,
|
||||
'tooltip' => $objp->title,
|
||||
'target' => $objp->target?'newtab':'',
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
$this->info_box_contents[$line][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->title,
|
||||
'url' => $objp->url,
|
||||
@@ -101,13 +101,13 @@ class box_bookmarks extends ModeleBoxes
|
||||
'target' => $objp->target?'newtab':'',
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0) {
|
||||
$mytxt=$langs->trans("NoRecordedBookmarks");
|
||||
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="center" colspan="2"',
|
||||
'tooltip' => $mytxt,
|
||||
'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt,
|
||||
|
||||
@@ -104,8 +104,8 @@ class box_clients extends ModeleBoxes
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url= DOL_URL_ROOT."/comm/card.php?socid=";
|
||||
else $url= DOL_URL_ROOT."/societe/soc.php?socid=";
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
$line = 0;
|
||||
while ($line < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$datec=$db->jdate($objp->datec);
|
||||
@@ -118,26 +118,26 @@ class box_clients extends ModeleBoxes
|
||||
$thirdpartystatic->fournisseur = $objp->fournisseur;
|
||||
$thirdpartystatic->logo = $objp->logo;
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $thirdpartystatic->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day")
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3)
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
||||
if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ class box_commandes extends ModeleBoxes
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
$line = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
while ($line < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$date=$db->jdate($objp->date_commande);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
@@ -114,46 +114,46 @@ class box_commandes extends ModeleBoxes
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
$societestatic->logo = $objp->logo;
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $commandestatic->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $societestatic->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
|
||||
if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER)) {
|
||||
if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid);
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''),
|
||||
'asis' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
||||
if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
|
||||
@@ -95,11 +95,11 @@ class box_comptes extends ModeleBoxes
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
$line = 0;
|
||||
$solde_total = array();
|
||||
|
||||
$account_static = new Account($db);
|
||||
while ($i < $num) {
|
||||
while ($line < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$account_static->id = $objp->rowid;
|
||||
@@ -109,42 +109,42 @@ class box_comptes extends ModeleBoxes
|
||||
|
||||
$solde_total[$objp->currency_code] += $solde;
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $account_static->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->number,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($solde, 0, $langs, 0, -1, -1, $objp->currency_code)
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
// Total
|
||||
foreach ($solde_total as $key=>$solde) {
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'tr' => 'class="liste_total"',
|
||||
'td' => 'align="left" class="liste_total"',
|
||||
'text' => $langs->trans('Total').' '.$key,
|
||||
);
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => ' '
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => price($solde, 0, $langs, 0, -1, -1, $key)
|
||||
);
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
|
||||
@@ -78,9 +78,9 @@ class box_contracts extends ModeleBoxes
|
||||
$num = $db->num_rows($resql);
|
||||
$now=dol_now();
|
||||
|
||||
$i = 0;
|
||||
$line = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
while ($line < $num) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$dateterm=$db->jdate($objp->fin_validite);
|
||||
@@ -94,14 +94,14 @@ class box_contracts extends ModeleBoxes
|
||||
// fin_validite is no more on contract but on services
|
||||
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
|
||||
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid),
|
||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
||||
'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid),
|
||||
@@ -109,36 +109,36 @@ class box_contracts extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datec,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" class="nowrap"',
|
||||
'text' => $contractstatic->getLibStatut(6),
|
||||
'asis'=>1,
|
||||
);
|
||||
|
||||
$i++;
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedContracts"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user