Add status (tosell/tobuy) on stock list
This commit is contained in:
parent
141933d2d0
commit
f9eabf9966
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/boxes/box_produits.php
|
||||
* \ingroup produits,services
|
||||
* \brief Module de generation de l'affichage de la box produits
|
||||
* \brief Module to generate box of last products/services
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
@ -71,7 +71,7 @@ class box_produits extends ModeleBoxes {
|
||||
|
||||
if ($user->rights->produit->lire || $user->rights->service->lire)
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell";
|
||||
$sql = "SELECT p.rowid, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)';
|
||||
@ -136,9 +136,12 @@ class box_produits extends ModeleBoxes {
|
||||
'text' => dol_print_date($datem,'day'));
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"',
|
||||
'text' => $productstatic->LibStatut($objp->tosell,3));
|
||||
'text' => $productstatic->LibStatut($objp->tosell,3,0));
|
||||
|
||||
$i++;
|
||||
$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("NoRecordedProducts"));
|
||||
}
|
||||
|
||||
@ -2231,8 +2231,8 @@ class Product extends CommonObject
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ProductStatusNotOnSell'),'statut5');
|
||||
if ($status == 1) return img_picto($langs->trans('ProductStatusOnSell'),'statut4');
|
||||
if ($status == 0) return img_picto(($type==0 ? $langs->trans('ProductStatusNotOnSell') : $langs->trans('ProductStatusNotOnBuy')),'statut5');
|
||||
if ($status == 1) return img_picto(($type==0 ? $langs->trans('ProductStatusOnSell') : $langs->trans('ProductStatusOnBuy')),'statut4');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user