NEW Add status of warehouse in tooltip of a warehouse.

This commit is contained in:
Laurent Destailleur 2019-08-26 23:44:20 +02:00
parent 9e04eccf54
commit db6b1b6ffb
2 changed files with 6 additions and 1 deletions

View File

@ -686,6 +686,8 @@ class Entrepot extends CommonObject
$label.= '<br><b>' . $langs->trans('Ref') . ':</b> ' . (empty($this->ref)?(empty($this->label)?$this->libelle:$this->label):$this->ref);
if (! empty($this->lieu))
$label.= '<br><b>' . $langs->trans('LocationSummary').':</b> '.$this->lieu;
if (isset($this->statut))
$label.= '<br><b>' . $langs->trans("Status").":</b> ".$this->getLibStatut(2);
$url = DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id;

View File

@ -827,7 +827,7 @@ if (! $variants) {
print '</tr>';
}
$sql = "SELECT e.rowid, e.ref as label, e.lieu, ps.reel, ps.rowid as product_stock_id, p.pmp";
$sql = "SELECT e.rowid, e.ref as label, e.lieu, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp";
$sql .= " FROM " . MAIN_DB_PREFIX . "entrepot as e,";
$sql .= " " . MAIN_DB_PREFIX . "product_stock as ps";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = ps.fk_product";
@ -851,9 +851,12 @@ if (! $variants) {
$var = false;
while ($i < $num) {
$obj = $db->fetch_object($resql);
$entrepotstatic->id = $obj->rowid;
$entrepotstatic->libelle = $obj->label;
$entrepotstatic->lieu = $obj->lieu;
$entrepotstatic->statut = $obj->statut;
$stock_real = price2num($obj->reel, 'MS');
print '<tr class="oddeven">';
print '<td colspan="4">' . $entrepotstatic->getNomUrl(1) . '</td>';