diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 8364c139baef4..a62fe016946ff 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -87,7 +87,7 @@ $value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2'); } else { if ($key == 'lang') { - $value = GETPOST($key, 'aZ09'); + $value = GETPOST($key, 'aZ09')?GETPOST($key, 'aZ09'):""; } else { $value = GETPOST($key, 'alphanohtml'); } diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index 528f45ee96245..7f487fdcf94a5 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -35,7 +35,7 @@ /** * Class to build documents using ODF templates generator */ -class pdf_stdandard extends ModelePDFMovement +class pdf_standard extends ModelePDFMovement { /** * @var DoliDb Database handler diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 5374245cea4da..0c627322d69b1 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -208,8 +208,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); - $nblines = count($object->lines); - if ($conf->stock->dir_output) { // Definition of $dir and $file if ($object->specimen) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 0e8f3a12514c9..e9fa70e53d213 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -226,7 +226,7 @@ // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql .= preg_replace('/^,/', ',', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { @@ -371,7 +371,7 @@ // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), + 'validate'=>$langs->trans("Validate"), //'generate_doc'=>$langs->trans("ReGeneratePDF"), //'builddoc'=>$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index a11df25611702..929e82824d6f7 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -726,6 +726,14 @@ print $langs->trans("Warehouse"); } print ''; + if ($conf->productbatch->enabled) { + // Available + print ''; + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Stock"); + } + print ''; + } // Lot - serial if ($conf->productbatch->enabled) { print ''; @@ -867,8 +875,17 @@ } print ' '.$alreadyconsumed; print ''; - print ''; // Warehouse + // Warehouse + print ''; print ''; + if ($conf->stock->enabled) { + print ''; + if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { + print img_warning($langs->trans('StockTooLow')).' '; + } + print $tmpproduct->stock_reel; // Available + print ''; + } if ($conf->productbatch->enabled) { print ''; // Lot } diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 1147869a7165f..916e9a4e01dce 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -748,7 +748,7 @@ function disablebuttonmakemovementandclose() { print $warehouse_static->getNomUrl(1); print ''; print ''; - print $product_static->getNomUrl(1); + print $product_static->getNomUrl(1).' - '.$product_static->label; print ''; if ($conf->productbatch->enabled) { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 161eec9904755..a3ceb84ed2348 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -864,6 +864,7 @@ // List of mass actions available $arrayofmassactions = array( + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), // 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), // 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), );