diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index c73657a8e1d..3f49be10660 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -426,7 +426,7 @@ if (empty($reshook)) else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) { - $result = $object->delete(); + $result = $object->delete($user); if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/reception/index.php'); @@ -567,7 +567,6 @@ if (empty($reshook)) { if ($lines[$i]->id == $line_id) { - // delete single warehouse line $line->id = $line_id; if (! $error && $line->delete($user) < 0) @@ -1163,7 +1162,8 @@ if ($action == 'create') if (!empty($conf->productbatch->enabled)) { - if( !empty($product->status_batch)){ + if (!empty($product->status_batch)) + { print ''; print ''; print $form->select_date($dispatchLines[$indiceAsked]['DLC'],'dlc' . $indiceAsked, '', '', 1, ""); @@ -1171,9 +1171,9 @@ if ($action == 'create') print ''; print $form->select_date($dispatchLines[$indiceAsked]['DLUO'],'dluo' . $indiceAsked, '', '', 1, ""); print ''; - }else { + } + else { print ''; - } } print "\n"; @@ -1624,19 +1624,17 @@ else if ($id || $ref) // Lines of products - if ($action == 'editline') { - print '
+ print ' - - '; + '; } print '
'; - print '
'; + print '
'; print ''; print ''; // # diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index fd5847e45ee..513911e0104 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -862,7 +862,8 @@ class Reception extends CommonObject /** * Delete reception. * - * @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO + * @param User $user Object user + * @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO */ function delete(User $user) { @@ -1012,7 +1013,6 @@ class Reception extends CommonObject $this->db->rollback(); return -1; } - } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps @@ -1129,6 +1129,7 @@ class Reception extends CommonObject return $this->LibStatut($this->statut,$mode); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return label of a status * @@ -1138,6 +1139,7 @@ class Reception extends CommonObject */ function LibStatut($statut,$mode) { + // phpcs:enable global $langs; if ($mode==0) @@ -1846,8 +1848,8 @@ class Reception extends CommonObject if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; - $error++; break; - + $error++; + break; } } else