Fix phpcs

This commit is contained in:
Laurent Destailleur 2018-12-15 15:01:49 +01:00
parent 1bce3f6c6b
commit 2e1b762596
4 changed files with 24 additions and 46 deletions

View File

@ -98,6 +98,7 @@ class pdf_squille extends ModelePdfReception
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Function to build pdf onto disk
*
@ -111,6 +112,7 @@ class pdf_squille extends ModelePdfReception
*/
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
// phpcs:enable
global $user,$conf,$langs,$hookmanager;
$object->fetch_thirdparty();
@ -637,7 +639,6 @@ class pdf_squille extends ModelePdfReception
{
$object->trueVolume= ($object->trueWidth * $object->trueHeight * $object->trueDepth);
$object->volume_units=$object->size_units * 3;
}
if ($totalWeight!='') $totalWeighttoshow=showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs);
@ -665,7 +666,6 @@ class pdf_squille extends ModelePdfReception
$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
@ -769,7 +769,6 @@ class pdf_squille extends ModelePdfReception
$pdf->SetXY($this->posxtotalht-1, $tab_top+1);
$pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"),'','C');
}
}
}

View File

@ -130,6 +130,7 @@ class mod_reception_beryl extends ModelNumRefReception
return $this->prefix.$yymm."-".$num;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Return next free value
*
@ -139,6 +140,7 @@ class mod_reception_beryl extends ModelNumRefReception
*/
function reception_get_num($objsoc,$objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc,$objforref);
}
}

View File

@ -574,7 +574,6 @@ if (empty($reshook))
{
$error++;
}
}
unset($_POST["lineid"]);
}
@ -616,11 +615,8 @@ if (empty($reshook))
$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;
@ -645,16 +641,11 @@ if (empty($reshook))
$line->sellby = strtotime($sellbydate);
}
if ($line->update($user) < 0)
{
setEventMessages($line->error, $line->errors, 'errors');
$error++;
}
}
else // Product no predefined
{
@ -713,7 +704,6 @@ if (empty($reshook))
$mode='emailfromreception';
$trackid='shi'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@ -1191,15 +1181,8 @@ if ($action == 'create')
}
print "</tr>\n";
}
//Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0)
{
@ -1308,7 +1291,6 @@ else if ($id || $ref)
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) {
@ -1475,7 +1457,6 @@ else if ($id || $ref)
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
{
@ -1904,23 +1885,22 @@ else if ($id || $ref)
{
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
{
@ -1967,7 +1947,6 @@ else if ($id || $ref)
$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");
@ -2066,8 +2045,7 @@ else if ($id || $ref)
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))
{

View File

@ -619,7 +619,6 @@ class Reception extends CommonObject
$this->error=$this->db->error();
return -2;
}
}
// Change status of order to "reception in process"
@ -1286,6 +1285,7 @@ class Reception extends CommonObject
return -2;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Fetch deliveries method and return an array. Load array this->meths(rowid=>label).
@ -1313,6 +1313,7 @@ class Reception extends CommonObject
}
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Fetch all deliveries method and return an array. Load array this->listmeths.
@ -1394,7 +1395,6 @@ class Reception extends CommonObject
$sql.= ' WHERE rowid='.$id;
$resql = $this->db->query($sql);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
@ -1412,7 +1412,6 @@ class Reception extends CommonObject
$sql.= ' WHERE rowid='.$id;
$resql = $this->db->query($sql);
}
@ -1598,6 +1597,7 @@ class Reception extends CommonObject
return -1;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
@ -1912,7 +1912,6 @@ class Reception extends CommonObject
}
}
if (!$error) {
$this->statut=self::STATUS_DRAFT;
$this->db->commit();