From db6b1b6ffb37b159eb0273d695fc25f63a3a48ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 23:44:20 +0200 Subject: [PATCH] NEW Add status of warehouse in tooltip of a warehouse. --- htdocs/product/stock/class/entrepot.class.php | 2 ++ htdocs/product/stock/product.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index e857166e392..ad475436932 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -686,6 +686,8 @@ class Entrepot extends CommonObject $label.= '
' . $langs->trans('Ref') . ': ' . (empty($this->ref)?(empty($this->label)?$this->libelle:$this->label):$this->ref); if (! empty($this->lieu)) $label.= '
' . $langs->trans('LocationSummary').': '.$this->lieu; + if (isset($this->statut)) + $label.= '
' . $langs->trans("Status").": ".$this->getLibStatut(2); $url = DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 2c0515d309c..9dd46428ffb 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -827,7 +827,7 @@ if (! $variants) { print ''; } - $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 ''; print '' . $entrepotstatic->getNomUrl(1) . '';