Tooltip and lib for file cache
This commit is contained in:
parent
92147265bb
commit
e18577aa62
@ -1563,7 +1563,8 @@ class Adherent extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowMember").': '.$this->ref;
|
||||
$label = '<u>' . $langs->trans("ShowMember") . '</u>';
|
||||
$label.= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option == 'card')
|
||||
|
||||
@ -63,6 +63,7 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_HTML5", $_POST["MAIN_ACTIVATE_HTML5"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
|
||||
@ -173,7 +174,7 @@ if ($action == 'edit') // Edit
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
@ -185,6 +186,16 @@ if ($action == 'edit') // Edit
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
|
||||
print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Max size of lists
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
@ -363,7 +374,7 @@ else // Show
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
@ -373,6 +384,14 @@ else // Show
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableFileCache").'</td><td>' . yn($conf->global->MAIN_ACTIVATE_FILECACHE) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
|
||||
@ -51,8 +51,8 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/comm/propal.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowPropal"),"propal").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $bc[$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td><?php echo $object->ref_client; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
|
||||
@ -2884,10 +2884,18 @@ class Commande extends CommonOrder
|
||||
|
||||
if ($short) return $url;
|
||||
|
||||
$picto='order';
|
||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
||||
$picto = 'order';
|
||||
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
|
||||
if (! empty($this->ref))
|
||||
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
if (! empty($this->ref_client))
|
||||
$label.= '<br>'.$langs->trans('RefCustomer').': '.$this->ref_client;
|
||||
$label.= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
|
||||
if (! empty($this->total_ht))
|
||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_tva))
|
||||
$label.= '<br><b>' . $langs->trans('TVA') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_ttc))
|
||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
|
||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
@ -109,7 +109,7 @@ $companystatic = new Societe($db);
|
||||
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||
llxHeader('',$langs->trans("Orders"),$help_url);
|
||||
|
||||
$sql = 'SELECT s.nom as name, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
||||
$sql = 'SELECT s.nom as name, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,';
|
||||
$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison, c.fk_statut, c.facture as facturee';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||
@ -334,6 +334,10 @@ if ($resql)
|
||||
|
||||
$generic_commande->id=$objp->rowid;
|
||||
$generic_commande->ref=$objp->ref;
|
||||
$generic_commande->ref_client = $objp->ref_client;
|
||||
$generic_commande->total_ht = $objp->total_ht;
|
||||
$generic_commande->total_tva = $objp->total_tva;
|
||||
$generic_commande->total_ttc = $objp->total_ttc;
|
||||
$generic_commande->lines=array();
|
||||
$generic_commande->getLinesArray();
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ print_titre($langs->trans('RelatedOrders'));
|
||||
<table class="noborder allwidth">
|
||||
<tr class="liste_titre">
|
||||
<td><?php echo $langs->trans("Ref"); ?></td>
|
||||
<td align="center"><?php echo $langs->trans("RefCustomer"); ?></td>
|
||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||
@ -47,8 +48,9 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/commande/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo $object->ref_client; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->commande->lire) {
|
||||
@ -62,7 +64,7 @@ foreach($linkedObjectBlock as $object)
|
||||
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="2"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||
<td align="left" colspan="3"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->commande->lire) {
|
||||
echo price($total);
|
||||
|
||||
@ -859,6 +859,8 @@ class Facture extends CommonInvoice
|
||||
if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice
|
||||
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
if (! empty($this->ref_client))
|
||||
$label.= '<br>' . $langs->trans('RefCustomer') . $this->ref_client;
|
||||
if ($this->type == self::TYPE_REPLACEMENT) $label=$langs->transnoentitiesnoconv("ShowInvoiceReplace").': '.$this->ref;
|
||||
if ($this->type == self::TYPE_CREDIT_NOTE) $label=$langs->transnoentitiesnoconv("ShowInvoiceAvoir").': '.$this->ref;
|
||||
if ($this->type == self::TYPE_DEPOSIT) $label=$langs->transnoentitiesnoconv("ShowInvoiceDeposit").': '.$this->ref;
|
||||
|
||||
@ -36,6 +36,7 @@ else print_titre($langs->trans("RelatedBill"));
|
||||
<table class="noborder allwidth">
|
||||
<tr class="liste_titre">
|
||||
<td><?php echo $langs->trans("Ref"); ?></td>
|
||||
<td align="center"><?php echo $langs->trans("RefCustomer"); ?></td>
|
||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||
@ -47,8 +48,9 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo $object->ref_client; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->facture->lire) {
|
||||
@ -61,7 +63,7 @@ foreach($linkedObjectBlock as $object)
|
||||
}
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="2"><?php echo $langs->trans("TotalHT"); ?></td>
|
||||
<td align="left" colspan="3"><?php echo $langs->trans("TotalHT"); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->facture->lire) {
|
||||
echo price($total);
|
||||
|
||||
@ -42,8 +42,8 @@ foreach($linkedObjectBlock as $object)
|
||||
$object->fetch_lines();
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/contrat/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowContract"),"contract").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $bc[$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date_contrat,'day'); ?></td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"><?php echo $object->getLibStatut(6); ?></td>
|
||||
|
||||
@ -95,10 +95,11 @@ class box_actions extends ModeleBoxes
|
||||
//($langs->transnoentities("Action".$objp->code)!=("Action".$objp->code) ? $langs->transnoentities("Action".$objp->code) : $objp->label)
|
||||
$label=empty($objp->label)?$objp->type_label:$objp->label;
|
||||
|
||||
$tooltip = $langs->trans('Action'.$objp->code).': '.$label;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ("action"),
|
||||
'tooltip' => $langs->trans('Action'.$objp->code).': '.$label,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id,
|
||||
);
|
||||
|
||||
@ -106,21 +107,22 @@ class box_actions extends ModeleBoxes
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($label,32),
|
||||
'text2'=> $late,
|
||||
'tooltip' => $langs->trans('Action'.$objp->code).': '.$label,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id,
|
||||
);
|
||||
|
||||
$tooltip = $langs->trans('Customer').': '.$objp->name;
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->socid?'company':''),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,24),
|
||||
'tooltip' => $langs->trans('Customer').': '.$objp->name,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
@ -142,9 +144,13 @@ class box_actions extends ModeleBoxes
|
||||
$i++;
|
||||
}
|
||||
|
||||
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 {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
@ -171,8 +177,7 @@ class box_actions extends ModeleBoxes
|
||||
{
|
||||
global $langs, $conf;
|
||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||
if ($conf->global->SHOW_DIALOG_HOMEPAGE)
|
||||
{
|
||||
if ($conf->global->SHOW_DIALOG_HOMEPAGE) {
|
||||
$actioncejour=false;
|
||||
$contents=$this->info_box_contents;
|
||||
$nblines=count($contents);
|
||||
|
||||
@ -75,6 +75,7 @@ class box_activity extends ModeleBoxes
|
||||
$totalnb = 0;
|
||||
$i = 0;
|
||||
$cachetime = 3600;
|
||||
$cachedir = DOL_DATA_ROOT.'/cache/boxes';
|
||||
$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;
|
||||
@ -94,8 +95,9 @@ class box_activity extends ModeleBoxes
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$facturestatic=new Facture($db);
|
||||
|
||||
$cachefile = DOL_DATA_ROOT.'/cache/boxes/boxactivity-invoice'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$filename = '/boxactivity-invoice'.$fileid;
|
||||
|
||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||
$data = array();
|
||||
if ($refresh) {
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
@ -118,13 +120,15 @@ class box_activity extends ModeleBoxes
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
dol_filecache($cachedir, $filename, $data);
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
$data = dol_readcachefile($cachedir, $filename);
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
@ -173,8 +177,9 @@ class box_activity extends ModeleBoxes
|
||||
);
|
||||
}
|
||||
|
||||
$cachefile = DOL_DATA_ROOT.'/cache/boxes/boxactivity-invoice2'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$filename = '/boxactivity-invoice2'.$fileid;
|
||||
|
||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||
|
||||
if ($refresh) {
|
||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||
@ -193,13 +198,15 @@ class box_activity extends ModeleBoxes
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
dol_filecache($cachedir, $filename, $data);
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
$data = dol_readcachefile($cachedir, $filename);
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
@ -255,9 +262,10 @@ class box_activity extends ModeleBoxes
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$commandestatic=new Commande($db);
|
||||
|
||||
$cachefile = DOL_DATA_ROOT.'/cache/boxes/boxactivity-order'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$filename = '/boxactivity-order'.$fileid;
|
||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||
$data = array();
|
||||
|
||||
if ($refresh) {
|
||||
|
||||
$sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb";
|
||||
@ -282,13 +290,15 @@ class box_activity extends ModeleBoxes
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
dol_filecache($cachedir, $filename, $data);
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
$data = dol_readcachefile($cachedir, $filename);
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
@ -334,8 +344,8 @@ class box_activity extends ModeleBoxes
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$propalstatic=new Propal($db);
|
||||
|
||||
$cachefile = DOL_DATA_ROOT.'/cache/boxes/boxactivity-propal'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$filename = '/boxactivity-propal'.$fileid;
|
||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||
$data = array();
|
||||
if ($refresh) {
|
||||
$sql = "SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb";
|
||||
@ -360,13 +370,15 @@ class box_activity extends ModeleBoxes
|
||||
$data[$j]=$db->fetch_object($result);
|
||||
$j++;
|
||||
}
|
||||
file_put_contents($cachefile,serialize($data),LOCK_EX);
|
||||
if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
dol_filecache($cachedir, $filename, $data);
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
$data = unserialize(file_get_contents($cachefile));
|
||||
$data = dol_readcachefile($cachedir, $filename);
|
||||
}
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
|
||||
@ -106,17 +106,18 @@ class box_comptes extends ModeleBoxes
|
||||
|
||||
$solde_total[$objp->currency_code] += $solde;
|
||||
|
||||
$tooltip = $langs->trans('Account').': '.$objp->label . '<br>' . $langs->trans('AccountNumber').': '.$objp->number;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $langs->trans('Account').': '.$objp->label,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->label,
|
||||
'tooltip' => $langs->trans('Account').': '.$objp->label,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid,
|
||||
);
|
||||
|
||||
@ -151,7 +152,7 @@ class box_comptes extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" class="liste_total"',
|
||||
'text' => price($solde, 0, $langs, 0, 0, -1, $key)
|
||||
'text' => price($solde, 0, $langs, 0, -1, -1, $key)
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/boxes/box_factures_fourn_imp.php
|
||||
* \file htdocs/core/boxes/box_factures_fourn_imp.php
|
||||
* \ingroup fournisseur
|
||||
* \brief Fichier de gestion d'une box des factures fournisseurs impayees
|
||||
* \brief Fichier de gestion d'une box des factures fournisseurs impayees
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
|
||||
@ -29,9 +29,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
*/
|
||||
class box_factures_fourn_imp extends ModeleBoxes
|
||||
{
|
||||
var $boxcode="oldestunpaidsupplierbills";
|
||||
var $boximg="object_bill";
|
||||
var $boxlabel="BoxOldestUnpaidSupplierBills";
|
||||
var $boxcode = "oldestunpaidsupplierbills";
|
||||
var $boximg = "object_bill";
|
||||
var $boxlabel = "BoxOldestUnpaidSupplierBills";
|
||||
var $depends = array("facture","fournisseur");
|
||||
|
||||
var $db;
|
||||
@ -93,55 +93,82 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
$late='';
|
||||
if ($datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref?$objp->ref:$objp->facid) . '<br>' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => ($objp->ref?$objp->ref:$objp->facid),
|
||||
'text2'=> $late,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
|
||||
'text' => $objp->ref_supplier,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref_supplier,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$tooltip = $langs->trans('Supplier') . ': '. $objp->name;
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($datelimite,'day'));
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datelimite,'day'),
|
||||
);
|
||||
|
||||
$fac = new FactureFournisseur($db);
|
||||
$fac->fetch($objp->facid);
|
||||
$alreadypaid=$fac->getSommePaiement();
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type));
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidSupplierBills"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoUnpaidSupplierBills"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
|
||||
@ -84,36 +84,52 @@ class box_fournisseurs extends ModeleBoxes
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$tooltip = $langs->trans('Supplier') . ': ' . $objp->name;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day"));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day"),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3));
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers"));
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedSuppliers"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -83,8 +83,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
||||
$langs->load("stocks");
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
@ -106,13 +105,20 @@ class box_produits_alerte_stock extends ModeleBoxes
|
||||
}
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->fk_product_type==1?'object_service':'object_product'),
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid);
|
||||
$tooltip = $langs->trans('Product') . ': ' . $objp->label;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => ($objp->fk_product_type==1?'object_service':'object_product'),
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->label,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->label,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
if ($objp->price_base_type == 'HT')
|
||||
{
|
||||
@ -124,33 +130,49 @@ class box_produits_alerte_stock extends ModeleBoxes
|
||||
$price=price($objp->price_ttc);
|
||||
$price_base_type=$langs->trans("TTC");
|
||||
}
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $price);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => $price,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left" class="nowrap"',
|
||||
'text' => $price_base_type);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left" class="nowrap"',
|
||||
'text' => $price_base_type,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="center"',
|
||||
'text' => $objp->total_stock . ' / '.$objp->seuil_stock_alerte,
|
||||
'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit")));
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="center"',
|
||||
'text' => $objp->total_stock . ' / '.$objp->seuil_stock_alerte,
|
||||
'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit")),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"',
|
||||
'text' => $productstatic->LibStatut($objp->tosell,3,0));
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $productstatic->LibStatut($objp->tosell,3,0),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $productstatic->LibStatut($objp->tobuy,3,1));
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $productstatic->LibStatut($objp->tobuy,3,1),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoTooLowStockProducts"));
|
||||
}
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoTooLowStockProducts"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
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),
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -90,21 +90,24 @@ class box_project extends ModeleBoxes
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$tooltip = $langs->trans('Project') . ': ' . $objp->ref;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'object_project',
|
||||
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->title
|
||||
'text' => $objp->title,
|
||||
);
|
||||
|
||||
$sql ="SELECT count(*) as nb, sum(progress) as totprogress";
|
||||
@ -114,9 +117,15 @@ class box_project extends ModeleBoxes
|
||||
$resultTask = $db->query($sql);
|
||||
if ($resultTask) {
|
||||
$objTask = $db->fetch_object($resultTask);
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
||||
);
|
||||
if ($objTask->nb > 0 )
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%");
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%",
|
||||
);
|
||||
else
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A ");
|
||||
$totalnbTask += $objTask->nb;
|
||||
@ -132,11 +141,28 @@ class box_project extends ModeleBoxes
|
||||
|
||||
|
||||
// Add the sum à the bottom of the boxes
|
||||
$this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead);
|
||||
$this->info_box_contents[$i][1] = array('td' => '', 'text' => "");
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects"));
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
||||
$this->info_box_contents[$i][4] = array('td' => '', 'text' => "");
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'tr' => 'class="liste_total"',
|
||||
'td' => 'align="left" ',
|
||||
'text' => " ",
|
||||
);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => '',
|
||||
'text' => $langs->trans("Total")." ".$textHead,
|
||||
'text' => " ",
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects"),
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => '',
|
||||
'text' => " ",
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class box_propales extends ModeleBoxes
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$propalstatic=new Propal($db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."Propals",$max));
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."Propals",$max));
|
||||
|
||||
if ($user->rights->propale->lire)
|
||||
{
|
||||
@ -83,8 +83,7 @@ class box_propales extends ModeleBoxes
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$date=$db->jdate($objp->dp);
|
||||
$datec=$db->jdate($objp->datec);
|
||||
@ -97,52 +96,75 @@ class box_propales extends ModeleBoxes
|
||||
$late = img_warning($langs->trans("Late"));
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid);
|
||||
$tooltip = $langs->trans('Proposal') . ': ' . $objp->ref;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'text2'=> $late,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$tooltip = $langs->trans('Customer') . ': ' . $objp->name;
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => price($objp->total_ht),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'));
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||
'text' => $propalstatic->LibStatut($objp->fk_statut,3));
|
||||
$this->info_box_contents[$i][6] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $propalstatic->LibStatut($objp->fk_statut,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProposals"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedProposals"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
}
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -104,41 +104,58 @@ class box_prospect extends ModeleBoxes
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day"));
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($datem, "day"),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
||||
'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3)));
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3)),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3));
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $thirdpartystatic->LibStatut($objp->status,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
|
||||
if ($num==0)
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text'=>$langs->trans("NoRecordedProspects"),
|
||||
);
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$db->free($resql);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR);
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -82,8 +82,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$date=$db->jdate($objp->date_commande);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
@ -91,48 +90,70 @@ class box_supplier_orders extends ModeleBoxes
|
||||
$urlo = DOL_URL_ROOT."/fourn/commande/card.php?id=".$objp->rowid;
|
||||
$urls = DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => $urlo);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'url' => $urlo);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'url' => $urls);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'url' => $urls);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
$tooltip = $langs->trans('SupplierOrder') . ': ' . $objp->ref;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => $urlo,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"',
|
||||
'text' => $supplierorderstatic->LibStatut($objp->fk_statut,3));
|
||||
$this->info_box_contents[$i][1] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->ref,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => $urlo,
|
||||
);
|
||||
|
||||
$tooltip = $langs->trans('Supplier') . ': ' . $objp->name;
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'company',
|
||||
'tooltip' => $tooltip,
|
||||
'url' => $urls,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $objp->name,
|
||||
'tooltip' => $tooltip,
|
||||
'url' => $urls,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => dol_print_date($date,'day'),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][5] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $supplierorderstatic->LibStatut($objp->fk_statut,3),
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num == 0)
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoSupplierOrder"));
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="center"',
|
||||
'text' => $langs->trans("NoSupplierOrder"),
|
||||
);
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
$db->free($result);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql),
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'align="left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -187,13 +187,12 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
$bcx[0] = 'class="box_pair"';
|
||||
$bcx[1] = 'class="box_impair"';
|
||||
$var = false;
|
||||
$now = dol_now();
|
||||
|
||||
$cachetime = 900; // 900 : 15mn
|
||||
$fileid = get_class($this).'id-'.$this->box_id.'-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'.cache';
|
||||
$cachedir = DOL_DATA_ROOT.'/cache/boxes';
|
||||
if (! dol_is_dir($cachedir)) dol_mkdir($cachedir);
|
||||
$cachefile = $cachedir.'/box-'.$fileid;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
$fileid = get_class($this).'id-'.$this->box_id.'-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'.cache';
|
||||
$filename = '/box-'.$fileid;
|
||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||
$out = '';
|
||||
|
||||
if ($refresh) {
|
||||
@ -335,10 +334,12 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
|
||||
$out.= "</div>\n";
|
||||
$out.= "<!-- Box ".get_class($this)." end -->\n\n";
|
||||
file_put_contents($cachefile,serialize($out),LOCK_EX);
|
||||
if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
dol_filecache($cachedir, $filename, $out);
|
||||
}
|
||||
} else {
|
||||
dol_syslog(get_class($this).'::showBoxCached');
|
||||
$out = unserialize(file_get_contents($cachefile));
|
||||
$out = dol_readcachefile($cachedir, $filename);
|
||||
print "<!-- Box ".get_class($this)." from cache -->";
|
||||
|
||||
}
|
||||
|
||||
@ -1876,3 +1876,49 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store object in file
|
||||
*
|
||||
* @param string $directory Directory of cache
|
||||
* @param string $filename Name of filecache
|
||||
* @param mixed $object Object to store in cachefile
|
||||
* @return void
|
||||
*/
|
||||
function dol_filecache($directory, $filename, $object)
|
||||
{
|
||||
if (! dol_is_dir($directory)) dol_mkdir($directory);
|
||||
$cachefile = $directory . $filename;
|
||||
file_put_contents($cachefile, serialize($object), LOCK_EX);
|
||||
@chmod($cachefile, 0644);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if Refresh needed
|
||||
*
|
||||
* @param string $directory Directory of cache
|
||||
* @param string $filename Name of filecache
|
||||
* @param int $cachetime Cachetime delay
|
||||
* @return boolean 0 no refresh 1 if refresh needed
|
||||
*/
|
||||
function dol_cache_refresh($directory, $filename, $cachetime)
|
||||
{
|
||||
$now = dol_now();
|
||||
$cachefile = $directory . $filename;
|
||||
$refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile);
|
||||
return $refresh;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read object from cachefile
|
||||
*
|
||||
* @param string $directory Directory of cache
|
||||
* @param string $filename Name of filecache
|
||||
* @return mixed Unserialise from file
|
||||
*/
|
||||
function dol_readcachefile($directory, $filename)
|
||||
{
|
||||
$cachefile = $directory . $filename;
|
||||
$object = unserialize(file_get_contents($cachefile));
|
||||
return $object;
|
||||
}
|
||||
|
||||
@ -46,8 +46,8 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/expedition/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowShipping"),"sending").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date_creation,'day'); ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date_delivery,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
|
||||
@ -41,8 +41,8 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/fichinter/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowIntervention"),"intervention").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->datev,'day'); ?></td>
|
||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||
</tr>
|
||||
|
||||
@ -531,7 +531,17 @@ class CommandeFournisseur extends CommonOrder
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowOrder").': '.$this->ref;
|
||||
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
|
||||
if (! empty($this->ref))
|
||||
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
if (! empty($this->ref_supplier))
|
||||
$label.= '<br><b>' . $langs->trans('RefSupplier') . ':</b> ' . $this->ref_supplier;
|
||||
if (! empty($this->total_ht))
|
||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_tva))
|
||||
$label.= '<br><b>' . $langs->trans('TVA') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_ttc))
|
||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
@ -99,7 +99,7 @@ $offset = $conf->liste_limit * $page ;
|
||||
*/
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, cf.date_commande as dc,";
|
||||
$sql.= " cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ttc, cf.fk_user_author,cf.date_livraison,";
|
||||
$sql.= " cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author,cf.date_livraison,";
|
||||
$sql.= " u.login";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."commande_fournisseur as cf";
|
||||
@ -213,11 +213,18 @@ if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
$objectstatic->ref_supplier = $obj->ref_supplier;
|
||||
$objectstatic->total_ht = $obj->total_ht;
|
||||
$objectstatic->total_tva = $obj->total_tva;
|
||||
$objectstatic->total_ttc = $obj->total_ttc;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Ref
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a>';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->fournisseur->dir_output.'/commande' . '/' . dol_sanitizeFileName($obj->ref);
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
|
||||
@ -4,6 +4,7 @@ Sending=Shipment
|
||||
Sendings=Shipments
|
||||
Shipment=Shipment
|
||||
Shipments=Shipments
|
||||
ShowSending=Show Sending
|
||||
Receivings=Receivings
|
||||
SendingsArea=Shipments area
|
||||
ListOfSendings=List of shipments
|
||||
|
||||
@ -2814,8 +2814,12 @@ class Product extends CommonObject
|
||||
$result='';
|
||||
$newref=$this->ref;
|
||||
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
|
||||
if ($this->type == 0) $label = $langs->trans("ShowProduct").': '.$this->ref.' '.$this->label;
|
||||
if ($this->type == 1) $label = $langs->trans("ShowService").': '.$this->ref.' '.$this->label;
|
||||
if ($this->type == 0) $label = '<u>' . $langs->trans("ShowProduct") . '</u>';
|
||||
if ($this->type == 1) $label = '<u>' . $langs->trans("ShowService") . '</u>';
|
||||
if (! empty($this->ref))
|
||||
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
if (! empty($this->label))
|
||||
$label .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->label;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option == 'supplier') {
|
||||
|
||||
@ -420,6 +420,7 @@ else
|
||||
print '<td class="nowrap">';
|
||||
$product_static->id = $objp->rowid;
|
||||
$product_static->ref = $objp->ref;
|
||||
$product_static->label = $objp->label;
|
||||
$product_static->type = $objp->fk_product_type;
|
||||
print $product_static->getNomUrl(1,'',24);
|
||||
print "</td>\n";
|
||||
|
||||
@ -512,7 +512,10 @@ class Entrepot extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = $langs->trans("ShowStock").': '.$this->libelle;
|
||||
$label = '<u>' . $langs->trans("ShowWarehouse").'</u>';
|
||||
$label.= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->libelle;
|
||||
if (! empty($this->lieu))
|
||||
$label.= '<br><b>' . $langs->trans('LocationSummary').':</b> '.$this->lieu;
|
||||
|
||||
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$lienfin='</a>';
|
||||
|
||||
@ -103,9 +103,12 @@ if ($result)
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$entrepot->id = $objp->rowid;
|
||||
$entrepot->libelle = $objp->ref;
|
||||
$entrepot->lieu = $objp->lieu;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td><a href="card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.'</a></td>';
|
||||
// Location
|
||||
print '<td>' . $entrepot->getNomUrl(1) . '</td>';
|
||||
// Location
|
||||
print '<td>'.$objp->lieu.'</td>';
|
||||
// PMP value
|
||||
print '<td align="right">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user