PSR-0 coding style

This commit is contained in:
Raphaël Doursenaud 2013-07-05 16:45:27 +02:00 committed by Cédric Salvador
parent 18ec06a7f9
commit 7d573bce1d
2 changed files with 13 additions and 16 deletions

View File

@ -41,7 +41,6 @@ $result=restrictedArea($user,'produit|service');
//checks if a product has been ordered //checks if a product has been ordered
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$sref = GETPOST('sref', 'alpha'); $sref = GETPOST('sref', 'alpha');
$snom = GETPOST('snom', 'alpha'); $snom = GETPOST('snom', 'alpha');
@ -138,7 +137,7 @@ if ($action == 'order') {
exit; exit;
} }
} }
if ($box == 0){ if ($box == 0) {
setEventMessage($langs->trans('SelectProduct'), 'warnings'); setEventMessage($langs->trans('SelectProduct'), 'warnings');
} }
} }
@ -423,9 +422,9 @@ if ($resql) {
//virtual stock to compute the stock to buy value //virtual stock to compute the stock to buy value
$stocktobuy = max($objp->desiredstock - $stock - $ordered, 0); $stocktobuy = max($objp->desiredstock - $stock - $ordered, 0);
$disabled = ''; $disabled = '';
if($ordered > 0) { if ($ordered > 0) {
$picto = img_picto('','tick'); $picto = img_picto('','tick');
if($ordered + $stock >= $objp->desiredstock) { if ($ordered + $stock >= $objp->desiredstock) {
$disabled = 'disabled="disabled"'; $disabled = 'disabled="disabled"';
} }
} else { } else {
@ -519,10 +518,11 @@ if ($resql) {
$db->free($resql); $db->free($resql);
echo ' <script type="text/javascript"> echo ' <script type="text/javascript">
function toggle(source) { function toggle(source)
{
checkboxes = document.getElementsByClassName("check"); checkboxes = document.getElementsByClassName("check");
for(var i=0; i < checkboxes.length;i++) { for (var i=0; i < checkboxes.length;i++) {
if(!checkboxes[i].disabled) { if (!checkboxes[i].disabled) {
checkboxes[i].checked = source.checked; checkboxes[i].checked = source.checked;
} }
} }

View File

@ -93,7 +93,7 @@ $sql .= ' AND cf.entity = ' . $conf->entity;
if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) {
$sql .= ' AND cf.fk_statut < 3'; $sql .= ' AND cf.fk_statut < 3';
} else if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { } elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) {
$sql .= ' AND cf.fk_statut < 6'; $sql .= ' AND cf.fk_statut < 6';
} else { } else {
$sql .= ' AND cf.fk_statut < 5'; $sql .= ' AND cf.fk_statut < 5';
@ -129,16 +129,13 @@ if ($sdate) {
} else { } else {
$elts = explode('/', $sdate); $elts = explode('/', $sdate);
$datearray = array(); $datearray = array();
if($elts[2]) if ($elts[2]) {
{
$datearray[0] = $elts[2]; $datearray[0] = $elts[2];
} }
if($elts[1]) if ($elts[1]) {
{
$datearray[1] = $elts[1]; $datearray[1] = $elts[1];
} }
if($elts[0]) if ($elts[0]) {
{
$datearray[2] = $elts[0]; $datearray[2] = $elts[0];
} }
$date = implode('-', $datearray); $date = implode('-', $datearray);
@ -263,7 +260,7 @@ if ($resql) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$var = !$var; $var = !$var;
if(!dispatched($obj->rowid)) { if (!dispatched($obj->rowid)) {
$href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid; $href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid;
echo '<tr ' . $bc[$var] . '>', echo '<tr ' . $bc[$var] . '>',
// Ref // Ref