Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2021-09-18 18:28:17 +02:00
7 changed files with 24 additions and 8 deletions

View File

@@ -87,7 +87,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
$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');
}

View File

@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/**
* Class to build documents using ODF templates generator
*/
class pdf_stdandard extends ModelePDFMovement
class pdf_standard extends ModelePDFMovement
{
/**
* @var DoliDb Database handler

View File

@@ -208,8 +208,6 @@ class pdf_standard extends ModelePDFStock
// 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) {

View File

@@ -226,7 +226,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
// 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 @@ $param .= $hookmanager->resPrint;
// 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"),

View File

@@ -726,6 +726,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans("Warehouse");
}
print '</td>';
if ($conf->productbatch->enabled) {
// Available
print '<td>';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Stock");
}
print '</td>';
}
// Lot - serial
if ($conf->productbatch->enabled) {
print '<td>';
@@ -867,8 +875,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print ' '.$alreadyconsumed;
print '</td>';
print '<td>'; // Warehouse
// Warehouse
print '<td>';
print '</td>';
if ($conf->stock->enabled) {
print '<td>';
if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) {
print img_warning($langs->trans('StockTooLow')).' ';
}
print $tmpproduct->stock_reel; // Available
print '</td>';
}
if ($conf->productbatch->enabled) {
print '<td></td>'; // Lot
}

View File

@@ -748,7 +748,7 @@ if ($object->id > 0) {
print $warehouse_static->getNomUrl(1);
print '</td>';
print '<td id="id_'.$obj->rowid.'_product">';
print $product_static->getNomUrl(1);
print $product_static->getNomUrl(1).' - '.$product_static->label;
print '</td>';
if ($conf->productbatch->enabled) {

View File

@@ -864,6 +864,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// 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"),
);