Checkstyle
This commit is contained in:
parent
47c83603f4
commit
bacf2003f1
@ -201,7 +201,7 @@ if ($id || $ref)
|
||||
|
||||
// Number of subproducts
|
||||
$prodsfather = $product->getFather(); //Parent Products
|
||||
$product->get_sousproduits_arbo ();
|
||||
$product->get_sousproduits_arbo();
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>'.count($product->get_arbo_each_prod()).'</td>';
|
||||
|
||||
dol_fiche_end();
|
||||
@ -287,7 +287,7 @@ if ($id || $ref)
|
||||
|
||||
// Number of subproducts
|
||||
$prodsfather = $product->getFather(); //Parent Products
|
||||
$product->get_sousproduits_arbo ();
|
||||
$product->get_sousproduits_arbo();
|
||||
print '<tr><td>'.$langs->trans("AssociatedProductsNumber").'</td><td>'.count($product->get_arbo_each_prod()).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -154,12 +154,12 @@ if ($product->id)
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ if ($id || $ref)
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ else
|
||||
$sql.= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte";
|
||||
//if (GETPOST("toolowstock")) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1 ,$offset);
|
||||
$sql.= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog("sql=".$sql);
|
||||
$resql = $db->query($sql);
|
||||
@ -202,7 +202,7 @@ else
|
||||
if (isset($catid))
|
||||
{
|
||||
print "<div id='ways'>";
|
||||
$c = new Categorie ($db, $catid);
|
||||
$c = new Categorie($db, $catid);
|
||||
$ways = $c->print_all_ways(' > ','product/liste.php');
|
||||
print " > ".$ways[0]."<br>\n";
|
||||
print "</div><br>";
|
||||
|
||||
@ -123,12 +123,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ $sql.= " AND p.entity = ".$conf->entity;
|
||||
if (isset($_GET['type'])) $sql.= " AND fk_product_type = ".$_GET['type'];
|
||||
$sql.= " GROUP BY (p.rowid)";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit ,$offset);
|
||||
$sql.= $db->plimit($limit, $offset);
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
|
||||
@ -264,7 +264,7 @@ else
|
||||
}
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||
print $object->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -327,7 +327,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
||||
// Price
|
||||
print '<tr><td width="20%">';
|
||||
$text=$langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),1,1);
|
||||
print '</td><td>';
|
||||
if ($object->price_base_type == 'TTC')
|
||||
{
|
||||
@ -342,7 +342,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
||||
// Price minimum
|
||||
print '<tr><td>' ;
|
||||
$text=$langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),1,1);
|
||||
if ($object->price_base_type == 'TTC')
|
||||
{
|
||||
print '<td><input name="price_min" size="10" value="'.price($object->price_min_ttc).'">';
|
||||
@ -385,7 +385,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
||||
// Selling price
|
||||
print '<tr><td width="20%">';
|
||||
$text=$langs->trans('SellingPrice').' '.$i;
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),1,1);
|
||||
print '</td><td>';
|
||||
if ($object->multiprices_base_type["$i"] == 'TTC')
|
||||
{
|
||||
@ -401,7 +401,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
||||
// Min price
|
||||
print '<tr><td>';
|
||||
$text=$langs->trans('MinPrice').' '.$i;
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
||||
print $form->textwithpicto($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),1,1);
|
||||
if ($object->multiprices_base_type["$i"] == 'TTC')
|
||||
{
|
||||
print '<td><input name="price_min_'.$i.'" size="10" value="'.price($object->multiprices_min_ttc["$i"]).'">';
|
||||
|
||||
@ -148,7 +148,7 @@ $sql.= " p.fk_product_type, p.tms,";
|
||||
$sql.= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte";
|
||||
if ($toolowstock) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1 ,$offset);
|
||||
$sql.= $db->plimit($limit + 1, $offset);
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
|
||||
@ -97,12 +97,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -92,12 +92,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -97,12 +97,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -99,12 +99,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -100,12 +100,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -80,12 +80,12 @@ if (! empty($id) || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->libelle.'</td></tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||
print $object->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||
print $object->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -94,12 +94,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ class Entrepot extends CommonObject
|
||||
* Update properties of a warehouse
|
||||
*
|
||||
* @param int $id id of warehouse to modify
|
||||
* @param User $user
|
||||
* @param User $user User object
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function update($id, $user)
|
||||
@ -225,7 +225,7 @@ class Entrepot extends CommonObject
|
||||
/**
|
||||
* Load warehouse data
|
||||
*
|
||||
* @param int $id Warehouse id
|
||||
* @param int $id Warehouse id
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function fetch($id)
|
||||
@ -287,6 +287,7 @@ class Entrepot extends CommonObject
|
||||
* Load warehouse info data
|
||||
*
|
||||
* @param int $id warehouse id
|
||||
* @return void
|
||||
*/
|
||||
function info($id)
|
||||
{
|
||||
@ -333,8 +334,9 @@ class Entrepot extends CommonObject
|
||||
|
||||
/**
|
||||
* Return list of all warehouses
|
||||
*
|
||||
* @return array Array list of warehouses
|
||||
*
|
||||
* @param int $status Status
|
||||
* @return array Array list of warehouses
|
||||
*/
|
||||
function list_array($status=1)
|
||||
{
|
||||
@ -407,9 +409,9 @@ class Entrepot extends CommonObject
|
||||
/**
|
||||
* Return label of a given status
|
||||
*
|
||||
* @param status Statut
|
||||
* @param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label of status
|
||||
* @param int $statut Status
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
|
||||
@ -325,6 +325,7 @@ class MouvementStock
|
||||
* @param int $qty Quantity
|
||||
* @param int $price Price
|
||||
* @param string $label Label of stock movement
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function reception($user, $fk_product, $entrepot_id, $qty, $price=0, $label='')
|
||||
{
|
||||
|
||||
@ -62,8 +62,8 @@ $sql = "SELECT e.label, e.rowid, e.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " WHERE e.statut in (0,1)";
|
||||
$sql.= " AND e.entity = ".$conf->entity;
|
||||
$sql.= " ORDER BY e.statut DESC ";
|
||||
$sql.= $db->plimit(15 ,0);
|
||||
$sql.= $db->order('e.statut','DESC');
|
||||
$sql.= $db->plimit(15, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ if ($page < 0) $page = 0;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.ville, e.fk_pays";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||
$sql.= " WHERE e.entity = ".$conf->entity;
|
||||
@ -57,7 +57,7 @@ if ($sall)
|
||||
$sql.= " AND (e.description like '%".$sall."%' OR e.lieu like '%".$sall."%' OR e.address like '%".$sall."%' OR e.ville like '%".$sall."%')";
|
||||
}
|
||||
$sql.= " ORDER BY $sortfield $sortorder";
|
||||
$sql.= $db->plimit($limit + 1 ,$offset);
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
|
||||
@ -122,7 +122,7 @@ if (! empty($_GET['idproduct']))
|
||||
$sql.= " AND p.rowid = '".$_GET['idproduct']."'";
|
||||
}
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit + 1 ,$offset);
|
||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
|
||||
@ -191,12 +191,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</tr>';
|
||||
|
||||
// Status (to sell)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||
print $product->getLibStatut(2,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to buy)
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||
print $product->getLibStatut(2,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user