New: Add stock in product lists

This commit is contained in:
Laurent Destailleur 2009-05-27 16:11:33 +00:00
parent fb6a137b80
commit 3a690c7643
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,7 @@ For users:
- New: Can use inline images in emails.
- New: Add predefined invoices (can be use for repeated invoices).
- New: Add a confirmation when cloning products.
- New: Add stock in product lists
- Fix: Customer code was not correct on PDF it if contains special
characters.
- Fix: Can update price even with "NPR" VAT rates.

View File

@ -774,7 +774,7 @@ class Form
{
$sql.="DISTINCT";
}
$sql.= " p.rowid, p.label, p.ref, p.price, p.price_ttc, p.price_base_type, p.duration";
$sql.= " p.rowid, p.label, p.ref, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.duration, p.stock";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p ";
if ($conf->categorie->enabled && ! $user->rights->categorie->voir)
{
@ -907,6 +907,11 @@ class Form
$opt.= price($objp->price_ttc,1).' '.$langs->trans("Currency".$conf->monnaie).' '.$langs->trans("TTC");
}
if ($conf->stock->enabled && isset($objp->stock) && $objp->fk_product_type == 0)
{
$opt.= ' - '.$langs->trans("Stock").':'.$objp->stock;
}
if ($objp->duration)
{
$duration_value = substr($objp->duration,0,strlen($objp->duration)-1);