From 6e7fa5ffeb0378e19a298663f0ddb23c03e9231d Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Tue, 3 Aug 2021 16:53:44 +0200 Subject: [PATCH] FIX : stickler feddbacks --- .../stocktransfer/doc/pdf_eagle.modules.php | 8 +++++++- .../stock/stocktransfer/stocktransfer_card.php | 16 ++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index ccdfee026d0..9edf386833c 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -864,7 +864,13 @@ class pdf_eagle extends ModelePdfStockTransfer }*/ } - function atLeastOneBatch($object) + /** + * Used to know if at least one line of Stock Transfer object has a batch set + * + * @param $object Stock Transfer object + * @return bool true if at least one line has batch set, false if not + */ + public function atLeastOneBatch($object) { global $conf; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 9de775f29d6..c21c9ef220a 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -505,30 +505,22 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Create an array for form $formquestion = array(); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); - } - // Destock confirmation - elseif ($action == 'destock') { + } elseif ($action == 'destock') { // Destock confirmation // Create an array for form $formquestion = array( 'text' => '', array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size'=>40)); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1); - } - // Destock confirmation cancel - elseif ($action == 'destockcancel') { + } elseif ($action == 'destockcancel') { // Destock confirmation cancel // Create an array for form $formquestion = array( 'text' => '', array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size'=>40)); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1); - } - // Addstock confirmation - elseif ($action == 'addstock') { + } elseif ($action == 'addstock') { // Addstock confirmation // Create an array for form $formquestion = array( 'text' => '', array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size'=>40)); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1); - } - // Addstock confirmation cancel - elseif ($action == 'addstockcancel') { + } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel // Create an array for form $formquestion = array( 'text' => '', array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size'=>40));