This commit is contained in:
paolo 2016-06-04 18:31:31 +02:00
parent 4e0f2d624e
commit ff95bb1644

View File

@ -241,7 +241,7 @@ $form = new Form($db);
$title = $langs->trans('Status');
$sql = 'SELECT p.rowid, p.ref, p.label, p.price,';
$sql = 'SELECT p.rowid, p.ref, p.label,p.description, p.price,';
$sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,';
$sql.= ' p.tms as datem, p.duration, p.tobuy,';
$sql.= ' p.desiredstock, p.seuil_stock_alerte as alertstock,';
@ -490,7 +490,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
// Multilangs
if (! empty($conf->global->MAIN_MULTILANGS))
{
$sql = 'SELECT label';
$sql = 'SELECT label,description';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product_lang';
$sql .= ' WHERE fk_product = ' . $objp->rowid;
$sql .= ' AND lang = "' . $langs->getDefaultLang() . '"';
@ -500,6 +500,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
if ($resqlm)
{
$objtp = $db->fetch_object($resqlm);
if (!empty($objtp->description)) $objp->description = $objtp->description;
if (!empty($objtp->label)) $objp->label = $objtp->label;
}
}
@ -557,7 +558,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
print '<td class="nowrap">'.$prod->getNomUrl(1, '').'</td>';
print '<td>' . $objp->label . '<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" ></td>';
print '<td>' . $objp->label . '<input type="hidden" name="desc' . $i . '" value="' . $objp->description . '" ></td>';
if (!empty($conf->service->enabled) && $type == 1)
{