From 79177b0a11ad37e9963e1c4daa13ff564f1fc676 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Oct 2021 14:38:12 +0200 Subject: [PATCH] Rename method into selectLotDataList --- htdocs/admin/tools/export_files.php | 6 ++---- htdocs/core/class/utils.class.php | 6 ++---- htdocs/mrp/mo_production.php | 2 +- htdocs/product/class/html.formproduct.class.php | 9 ++++----- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 9fabaa3b0b2..e0fdb740782 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -157,11 +157,9 @@ if ($compression == 'zip') { } else { if ($compression == 'gz') { $cmd = "gzip -f ".$outputdir."/".$file; - } - elseif ($compression == 'bz') { + } elseif ($compression == 'bz') { $cmd = "bzip2 -f ".$outputdir."/".$file; - } - elseif ($compression == 'zstd') { + } elseif ($compression == 'zstd') { $cmd = "zstd -z -9 -q --rm ".$outputdir."/".$file; } diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 6bfbbdb98ad..d56fcddafa7 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -249,11 +249,9 @@ class Utils $compression = $compression ? $compression : 'none'; if ($compression == 'gz') { $outputfile .= '.gz'; - } - elseif ($compression == 'bz') { + } elseif ($compression == 'bz') { $outputfile .= '.bz2'; - } - elseif ($compression == 'zstd') { + } elseif ($compression == 'zstd') { $outputfile .= '.zst'; } $outputerror = $outputfile.'.err'; diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 533e81f80a2..0e2edb81203 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -975,7 +975,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($tmpproduct->status_batch) { $preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : ''); print ''; - print $formproduct->selectLot('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', ''); + print $formproduct->selectLotDataList('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', ''); } print ''; } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 1b6b9bbf0a5..da10faa4f34 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -543,7 +543,7 @@ class FormProduct { global $conf, $langs; - dol_syslog(get_class($this)."::selectLot $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $fk_entrepot, $empty_label, $forcecombo, $morecss", LOG_DEBUG); + dol_syslog(get_class($this)."::selectLotStock $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $fk_entrepot, $empty_label, $forcecombo, $morecss", LOG_DEBUG); $out = ''; $productIdArray = array(); @@ -613,21 +613,20 @@ class FormProduct /** - * Return list of lot numbers (stock from product_batch) with stock location and stock qty + * Return list of lot numbers (stock from product_batch) for product and warehouse. * * @param string $htmlname Name of key that is inside attribute "list" of an input text field. * @param int $empty 1=Can be empty, 0 if not * @param int $fk_product show lot numbers of product with id fk_product. All from objectLines if 0. * @param int $fk_entrepot filter lot numbers for warehouse with id fk_entrepot. All if 0. * @param array $objectLines Only cache lot numbers for products in lines of object. If no lines only for fk_product. If no fk_product, all. - * * @return string HTML datalist */ - public function selectLot($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array()) + public function selectLotDataList($htmlname = 'batch_id', $empty = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array()) { global $conf, $langs; - dol_syslog(get_class($this)."::selectLot $htmlname, $empty, $fk_product, $fk_entrepot,$objectLines", LOG_DEBUG); + dol_syslog(get_class($this)."::selectLotDataList $htmlname, $empty, $fk_product, $fk_entrepot,$objectLines", LOG_DEBUG); $out = ''; $productIdArray = array();