Checkstyle
This commit is contained in:
parent
47c83603f4
commit
bacf2003f1
@ -154,12 +154,12 @@ if ($product->id)
|
|||||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -226,7 +226,7 @@ if ($id || $ref)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -123,12 +123,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -264,7 +264,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $object->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
// Price
|
// Price
|
||||||
print '<tr><td width="20%">';
|
print '<tr><td width="20%">';
|
||||||
$text=$langs->trans('SellingPrice');
|
$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>';
|
print '</td><td>';
|
||||||
if ($object->price_base_type == 'TTC')
|
if ($object->price_base_type == 'TTC')
|
||||||
{
|
{
|
||||||
@ -342,7 +342,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
// Price minimum
|
// Price minimum
|
||||||
print '<tr><td>' ;
|
print '<tr><td>' ;
|
||||||
$text=$langs->trans('MinPrice');
|
$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')
|
if ($object->price_base_type == 'TTC')
|
||||||
{
|
{
|
||||||
print '<td><input name="price_min" size="10" value="'.price($object->price_min_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
|
// Selling price
|
||||||
print '<tr><td width="20%">';
|
print '<tr><td width="20%">';
|
||||||
$text=$langs->trans('SellingPrice').' '.$i;
|
$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>';
|
print '</td><td>';
|
||||||
if ($object->multiprices_base_type["$i"] == 'TTC')
|
if ($object->multiprices_base_type["$i"] == 'TTC')
|
||||||
{
|
{
|
||||||
@ -401,7 +401,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
// Min price
|
// Min price
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$text=$langs->trans('MinPrice').' '.$i;
|
$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')
|
if ($object->multiprices_base_type["$i"] == 'TTC')
|
||||||
{
|
{
|
||||||
print '<td><input name="price_min_'.$i.'" size="10" value="'.price($object->multiprices_min_ttc["$i"]).'">';
|
print '<td><input name="price_min_'.$i.'" size="10" value="'.price($object->multiprices_min_ttc["$i"]).'">';
|
||||||
|
|||||||
@ -97,12 +97,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
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>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -97,12 +97,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -99,12 +99,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -100,12 +100,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
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>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->libelle.'</td></tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $object->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $object->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -94,12 +94,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class Entrepot extends CommonObject
|
|||||||
* Update properties of a warehouse
|
* Update properties of a warehouse
|
||||||
*
|
*
|
||||||
* @param int $id id of warehouse to modify
|
* @param int $id id of warehouse to modify
|
||||||
* @param User $user
|
* @param User $user User object
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function update($id, $user)
|
function update($id, $user)
|
||||||
@ -287,6 +287,7 @@ class Entrepot extends CommonObject
|
|||||||
* Load warehouse info data
|
* Load warehouse info data
|
||||||
*
|
*
|
||||||
* @param int $id warehouse id
|
* @param int $id warehouse id
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function info($id)
|
function info($id)
|
||||||
{
|
{
|
||||||
@ -334,6 +335,7 @@ class Entrepot extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return list of all warehouses
|
* Return list of all warehouses
|
||||||
*
|
*
|
||||||
|
* @param int $status Status
|
||||||
* @return array Array list of warehouses
|
* @return array Array list of warehouses
|
||||||
*/
|
*/
|
||||||
function list_array($status=1)
|
function list_array($status=1)
|
||||||
@ -407,8 +409,8 @@ class Entrepot extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return label of a given status
|
* Return label of a given status
|
||||||
*
|
*
|
||||||
* @param status Statut
|
* @param int $statut Status
|
||||||
* @param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @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
|
* @return string Label of status
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibStatut($statut,$mode=0)
|
||||||
|
|||||||
@ -325,6 +325,7 @@ class MouvementStock
|
|||||||
* @param int $qty Quantity
|
* @param int $qty Quantity
|
||||||
* @param int $price Price
|
* @param int $price Price
|
||||||
* @param string $label Label of stock movement
|
* @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='')
|
function reception($user, $fk_product, $entrepot_id, $qty, $price=0, $label='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,7 +62,7 @@ $sql = "SELECT e.label, e.rowid, e.statut";
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
|
||||||
$sql.= " WHERE e.statut in (0,1)";
|
$sql.= " WHERE e.statut in (0,1)";
|
||||||
$sql.= " AND e.entity = ".$conf->entity;
|
$sql.= " AND e.entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY e.statut DESC ";
|
$sql.= $db->order('e.statut','DESC');
|
||||||
$sql.= $db->plimit(15, 0);
|
$sql.= $db->plimit(15, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -191,12 +191,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// 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 $product->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// 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 $product->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user