Fix phpcs
This commit is contained in:
parent
e3358b5b60
commit
39d244eeb2
@ -1003,9 +1003,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
|
||||
print '<td align="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>';
|
||||
|
||||
}
|
||||
if (!empty($conf->productbatch->enabled))
|
||||
{
|
||||
@ -1152,9 +1150,8 @@ if ($action == 'create')
|
||||
$tmpentrepot_id = is_numeric(GETPOST($ent,'int'))?GETPOST($ent,'int'):$warehouse_id;
|
||||
if ($line->fk_product > 0)
|
||||
{
|
||||
print '<!-- Show warehouse selection -->';
|
||||
print '<!-- Show warehouse selection -->';
|
||||
print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 0 , 0, $line->fk_product, '', 1);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1164,7 +1161,8 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if(!empty($conf->productbatch->enabled) ){
|
||||
if (!empty($conf->productbatch->enabled))
|
||||
{
|
||||
if( !empty($product->status_batch)){
|
||||
print '<td><input name="batch'.$indiceAsked.'" value="'.$dispatchLines[$indiceAsked]['lot'].'"></td>';
|
||||
print '<td>';
|
||||
@ -1177,8 +1175,6 @@ if ($action == 'create')
|
||||
print '<td colspan="3"></td>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -1285,8 +1281,8 @@ else if ($id || $ref)
|
||||
}
|
||||
|
||||
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateReception'),$text,'confirm_valid','',0,1);
|
||||
|
||||
}
|
||||
|
||||
// Confirm cancelation
|
||||
if ($action == 'annuler')
|
||||
{
|
||||
@ -1337,7 +1333,8 @@ else if ($id || $ref)
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>' . $langs->trans('Project') . ' ';
|
||||
if (0) { // Do not change on reception
|
||||
@ -1494,7 +1491,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
|
||||
{
|
||||
@ -1881,7 +1877,7 @@ else if ($id || $ref)
|
||||
{
|
||||
// edit mode
|
||||
print '<td colspan="'.$editColspan.'" align="center"><table class="nobordernopadding">';
|
||||
if (! empty($conf->stock->enabled))
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
if ($lines[$i]->fk_product > 0)
|
||||
{
|
||||
@ -1892,7 +1888,8 @@ else if ($id || $ref)
|
||||
// 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)){
|
||||
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>';
|
||||
@ -2122,7 +2119,6 @@ else if ($id || $ref)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -857,14 +857,14 @@ class Reception extends CommonObject
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete reception.
|
||||
*
|
||||
* @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO
|
||||
*/
|
||||
function delete()
|
||||
function delete(User $user)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@ -874,10 +874,11 @@ class Reception extends CommonObject
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Stock control
|
||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
||||
|
||||
$langs->load("agenda");
|
||||
|
||||
@ -902,7 +903,6 @@ class Reception extends CommonObject
|
||||
// we do not log origin because it will be deleted
|
||||
$mouvS->origin = null;
|
||||
|
||||
|
||||
$result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ReceptionDeletedInDolibarr", $this->ref),'', $obj->eatby, $obj->sellby, $obj->batch); // Price is set to 0, because we don't want to see WAP changed
|
||||
}
|
||||
}
|
||||
@ -1014,6 +1014,7 @@ class Reception extends CommonObject
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Load lines
|
||||
@ -1066,10 +1067,10 @@ class Reception extends CommonObject
|
||||
}
|
||||
|
||||
return 1;
|
||||
}else {
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1247,7 +1248,6 @@ class Reception extends CommonObject
|
||||
$this->lines[]=$line;
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
@ -1546,7 +1546,6 @@ class Reception extends CommonObject
|
||||
$this->errors = $mouvS->errors;
|
||||
$error++; break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1561,7 +1560,6 @@ class Reception extends CommonObject
|
||||
$error++; break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1628,7 +1626,6 @@ class Reception extends CommonObject
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
} else {
|
||||
$error++;
|
||||
$this->errors[]=$this->db->lasterror;
|
||||
@ -1750,7 +1747,6 @@ class Reception extends CommonObject
|
||||
$commande->fetch($this->origin_id);
|
||||
$commande->setStatus($user,4);
|
||||
}
|
||||
|
||||
} else {
|
||||
$error++;
|
||||
$this->errors[]=$this->db->lasterror();
|
||||
@ -1866,7 +1862,6 @@ class Reception extends CommonObject
|
||||
$error++; break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1945,8 +1940,8 @@ class Reception extends CommonObject
|
||||
|
||||
$langs->load("receptions");
|
||||
|
||||
if (! dol_strlen($modele)) {
|
||||
|
||||
if (! dol_strlen($modele))
|
||||
{
|
||||
$modele = 'squille';
|
||||
|
||||
if ($this->modelpdf) {
|
||||
@ -1973,10 +1968,8 @@ class Reception extends CommonObject
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'reception'
|
||||
);
|
||||
$tables = array('reception');
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user