Fix phpcs
This commit is contained in:
parent
1bce3f6c6b
commit
2e1b762596
@ -98,6 +98,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to build pdf onto disk
|
* 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)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $user,$conf,$langs,$hookmanager;
|
global $user,$conf,$langs,$hookmanager;
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -637,7 +639,6 @@ class pdf_squille extends ModelePdfReception
|
|||||||
{
|
{
|
||||||
$object->trueVolume= ($object->trueWidth * $object->trueHeight * $object->trueDepth);
|
$object->trueVolume= ($object->trueWidth * $object->trueHeight * $object->trueDepth);
|
||||||
$object->volume_units=$object->size_units * 3;
|
$object->volume_units=$object->size_units * 3;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($totalWeight!='') $totalWeighttoshow=showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs);
|
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->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);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total Weight
|
// Total Weight
|
||||||
@ -769,7 +769,6 @@ class pdf_squille extends ModelePdfReception
|
|||||||
$pdf->SetXY($this->posxtotalht-1, $tab_top+1);
|
$pdf->SetXY($this->posxtotalht-1, $tab_top+1);
|
||||||
$pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"),'','C');
|
$pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"),'','C');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -130,6 +130,7 @@ class mod_reception_beryl extends ModelNumRefReception
|
|||||||
return $this->prefix.$yymm."-".$num;
|
return $this->prefix.$yymm."-".$num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return next free value
|
* Return next free value
|
||||||
*
|
*
|
||||||
@ -139,6 +140,7 @@ class mod_reception_beryl extends ModelNumRefReception
|
|||||||
*/
|
*/
|
||||||
function reception_get_num($objsoc,$objforref)
|
function reception_get_num($objsoc,$objforref)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->getNextValue($objsoc,$objforref);
|
return $this->getNextValue($objsoc,$objforref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -574,7 +574,6 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
unset($_POST["lineid"]);
|
unset($_POST["lineid"]);
|
||||||
}
|
}
|
||||||
@ -616,11 +615,8 @@ if (empty($reshook))
|
|||||||
$line->fk_product = $lines[$i]->fk_product;
|
$line->fk_product = $lines[$i]->fk_product;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($lines[$i]->fk_product > 0)
|
if ($lines[$i]->fk_product > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// single warehouse reception line
|
// single warehouse reception line
|
||||||
$stockLocation = "entl".$line_id;
|
$stockLocation = "entl".$line_id;
|
||||||
$qty = "qtyl".$line_id;
|
$qty = "qtyl".$line_id;
|
||||||
@ -645,16 +641,11 @@ if (empty($reshook))
|
|||||||
$line->sellby = strtotime($sellbydate);
|
$line->sellby = strtotime($sellbydate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($line->update($user) < 0)
|
if ($line->update($user) < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($line->error, $line->errors, 'errors');
|
setEventMessages($line->error, $line->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else // Product no predefined
|
else // Product no predefined
|
||||||
{
|
{
|
||||||
@ -713,7 +704,6 @@ if (empty($reshook))
|
|||||||
$mode='emailfromreception';
|
$mode='emailfromreception';
|
||||||
$trackid='shi'.$object->id;
|
$trackid='shi'.$object->id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1191,15 +1181,8 @@ if ($action == 'create')
|
|||||||
|
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Display lines extrafields
|
//Display lines extrafields
|
||||||
if (is_array($extralabelslines) && count($extralabelslines)>0)
|
if (is_array($extralabelslines) && count($extralabelslines)>0)
|
||||||
{
|
{
|
||||||
@ -1308,7 +1291,6 @@ else if ($id || $ref)
|
|||||||
if ($action == 'annuler')
|
if ($action == 'annuler')
|
||||||
{
|
{
|
||||||
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelReception'),$langs->trans("ConfirmCancelReception",$object->ref),'confirm_cancel','',0,1);
|
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelReception'),$langs->trans("ConfirmCancelReception",$object->ref),'confirm_cancel','',0,1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $formconfirm) {
|
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="modify" value="'.$langs->trans("Modify").'" type="submit">';
|
||||||
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1920,7 +1901,6 @@ else if ($id || $ref)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1967,7 +1947,6 @@ else if ($id || $ref)
|
|||||||
$detail ='';
|
$detail ='';
|
||||||
if ($lines[$i]->product->status_batch)
|
if ($lines[$i]->product->status_batch)
|
||||||
{
|
{
|
||||||
|
|
||||||
$detail.= $langs->trans("Batch").': '.$lines[$i]->batch;
|
$detail.= $langs->trans("Batch").': '.$lines[$i]->batch;
|
||||||
$detail.= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby,"day");
|
$detail.= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby,"day");
|
||||||
$detail.= ' - '.$langs->trans("EatByDate").': '.dol_print_date($lines[$i]->eatby,"day");
|
$detail.= ' - '.$langs->trans("EatByDate").': '.dol_print_date($lines[$i]->eatby,"day");
|
||||||
@ -2066,8 +2045,7 @@ else if ($id || $ref)
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
// modified by hook
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -619,7 +619,6 @@ class Reception extends CommonObject
|
|||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change status of order to "reception in process"
|
// Change status of order to "reception in process"
|
||||||
@ -1286,6 +1285,7 @@ class Reception extends CommonObject
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fetch deliveries method and return an array. Load array this->meths(rowid=>label).
|
* 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
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fetch all deliveries method and return an array. Load array this->listmeths.
|
* Fetch all deliveries method and return an array. Load array this->listmeths.
|
||||||
@ -1394,7 +1395,6 @@ class Reception extends CommonObject
|
|||||||
$sql.= ' WHERE rowid='.$id;
|
$sql.= ' WHERE rowid='.$id;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
@ -1412,7 +1412,6 @@ class Reception extends CommonObject
|
|||||||
$sql.= ' WHERE rowid='.$id;
|
$sql.= ' WHERE rowid='.$id;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1598,6 +1597,7 @@ class Reception extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
|
* Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
|
||||||
@ -1912,7 +1912,6 @@ class Reception extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$this->statut=self::STATUS_DRAFT;
|
$this->statut=self::STATUS_DRAFT;
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user