Skip to content

Commit

Permalink
Fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 15, 2018
1 parent 1bce3f6 commit 2e1b762
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 46 deletions.
5 changes: 2 additions & 3 deletions htdocs/core/modules/reception/doc/pdf_squille.modules.php
Expand Up @@ -98,6 +98,7 @@ function __construct($db=0)
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Function to build pdf onto disk
*
Expand All @@ -111,6 +112,7 @@ function __construct($db=0)
*/
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
// phpcs:enable
global $user,$conf,$langs,$hookmanager;

$object->fetch_thirdparty();
Expand Down Expand Up @@ -637,7 +639,6 @@ function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOr
{
$object->trueVolume= ($object->trueWidth * $object->trueHeight * $object->trueDepth);
$object->volume_units=$object->size_units * 3;

}

if ($totalWeight!='') $totalWeighttoshow=showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs);
Expand Down Expand Up @@ -665,7 +666,6 @@ function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOr

$pdf->SetXY($this->posxtotalht, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1);

}

// Total Weight
Expand Down Expand Up @@ -769,7 +769,6 @@ function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0,
$pdf->SetXY($this->posxtotalht-1, $tab_top+1);
$pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"),'','C');
}

}
}

Expand Down
2 changes: 2 additions & 0 deletions htdocs/core/modules/reception/mod_reception_beryl.php
Expand Up @@ -130,6 +130,7 @@ function getNextValue($objsoc,$shipment)
return $this->prefix.$yymm."-".$num;
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Return next free value
*
Expand All @@ -139,6 +140,7 @@ function getNextValue($objsoc,$shipment)
*/
function reception_get_num($objsoc,$objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc,$objforref);
}
}
56 changes: 17 additions & 39 deletions htdocs/reception/card.php
Expand Up @@ -574,7 +574,6 @@
{
$error++;
}

}
unset($_POST["lineid"]);
}
Expand Down Expand Up @@ -616,11 +615,8 @@
$line->fk_product = $lines[$i]->fk_product;




if ($lines[$i]->fk_product > 0)
{

// single warehouse reception line
$stockLocation = "entl".$line_id;
$qty = "qtyl".$line_id;
Expand All @@ -645,16 +641,11 @@
$line->sellby = strtotime($sellbydate);
}



if ($line->update($user) < 0)
{
setEventMessages($line->error, $line->errors, 'errors');
$error++;
}



}
else // Product no predefined
{
Expand Down Expand Up @@ -713,7 +704,6 @@
$mode='emailfromreception';
$trackid='shi'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';

}


Expand Down Expand Up @@ -1191,15 +1181,8 @@

}
print "</tr>\n";




}




//Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0)
{
Expand Down Expand Up @@ -1308,7 +1291,6 @@
if ($action == 'annuler')
{
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelReception'),$langs->trans("ConfirmCancelReception",$object->ref),'confirm_cancel','',0,1);

}

if (! $formconfirm) {
Expand Down Expand Up @@ -1475,7 +1457,6 @@
print ' <input class="button" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
print '</form>';

}
else
{
Expand Down Expand Up @@ -1904,23 +1885,22 @@
{
if ($lines[$i]->fk_product > 0)
{
print '<!-- case edit 1 -->';
print '<tr>';
// Qty to receive or received
print '<td>' . '<input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty.'">' . '</td>';
// Warehouse source
print '<td>' . $formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1). '</td>';
// Batch number managment
if($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)){
print '<td> <input name="batch'.$line_id.'" id="batch'.$line_id.'" type="text" value="'.$lines[$i]->batch.'"> </br>';
print $langs->trans('EatByDate').' : ';
print $form->select_date($lines[$i]->eatby,'dlc' .$line_id , '', '', 1, ""). '</br>';
print $langs->trans('SellByDate').' : ';
print $form->select_date($lines[$i]->sellby,'dluo' .$line_id , '', '', 1, "");
print '</td>';
}
print '</tr>';

print '<!-- case edit 1 -->';
print '<tr>';
// Qty to receive or received
print '<td>' . '<input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty.'">' . '</td>';
// Warehouse source
print '<td>' . $formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1). '</td>';
// Batch number managment
if($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)){
print '<td> <input name="batch'.$line_id.'" id="batch'.$line_id.'" type="text" value="'.$lines[$i]->batch.'"> </br>';
print $langs->trans('EatByDate').' : ';
print $form->select_date($lines[$i]->eatby,'dlc' .$line_id , '', '', 1, ""). '</br>';
print $langs->trans('SellByDate').' : ';
print $form->select_date($lines[$i]->sellby,'dluo' .$line_id , '', '', 1, "");
print '</td>';
}
print '</tr>';
}
else
{
Expand Down Expand Up @@ -1967,7 +1947,6 @@
$detail ='';
if ($lines[$i]->product->status_batch)
{

$detail.= $langs->trans("Batch").': '.$lines[$i]->batch;
$detail.= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby,"day");
$detail.= ' - '.$langs->trans("EatByDate").': '.dol_print_date($lines[$i]->eatby,"day");
Expand Down Expand Up @@ -2066,8 +2045,7 @@
print '<div class="tabsAction">';

$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
// modified by hook
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{

Expand Down
7 changes: 3 additions & 4 deletions htdocs/reception/class/reception.class.php
Expand Up @@ -619,7 +619,6 @@ function valid($user, $notrigger=0)
$this->error=$this->db->error();
return -2;
}

}

// Change status of order to "reception in process"
Expand Down Expand Up @@ -1286,6 +1285,7 @@ function set_date_livraison($user, $date_livraison)
return -2;
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Fetch deliveries method and return an array. Load array this->meths(rowid=>label).
Expand Down Expand Up @@ -1313,6 +1313,7 @@ function fetch_delivery_methods()
}
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Fetch all deliveries method and return an array. Load array this->listmeths.
Expand Down Expand Up @@ -1394,7 +1395,6 @@ function activ_delivery_method($id)
$sql.= ' WHERE rowid='.$id;

$resql = $this->db->query($sql);

}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
Expand All @@ -1412,7 +1412,6 @@ function disable_delivery_method($id)
$sql.= ' WHERE rowid='.$id;

$resql = $this->db->query($sql);

}


Expand Down Expand Up @@ -1598,6 +1597,7 @@ function setClosed()
return -1;
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
Expand Down Expand Up @@ -1912,7 +1912,6 @@ function set_draft($user)
}
}


if (!$error) {
$this->statut=self::STATUS_DRAFT;
$this->db->commit();
Expand Down

0 comments on commit 2e1b762

Please sign in to comment.