Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
f0547438f8
@ -87,7 +87,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
$value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2');
|
$value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2');
|
||||||
} else {
|
} else {
|
||||||
if ($key == 'lang') {
|
if ($key == 'lang') {
|
||||||
$value = GETPOST($key, 'aZ09');
|
$value = GETPOST($key, 'aZ09')?GETPOST($key, 'aZ09'):"";
|
||||||
} else {
|
} else {
|
||||||
$value = GETPOST($key, 'alphanohtml');
|
$value = GETPOST($key, 'alphanohtml');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
/**
|
/**
|
||||||
* Class to build documents using ODF templates generator
|
* Class to build documents using ODF templates generator
|
||||||
*/
|
*/
|
||||||
class pdf_stdandard extends ModelePDFMovement
|
class pdf_standard extends ModelePDFMovement
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DoliDb Database handler
|
* @var DoliDb Database handler
|
||||||
|
|||||||
@ -208,8 +208,6 @@ class pdf_standard extends ModelePDFStock
|
|||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||||
|
|
||||||
$nblines = count($object->lines);
|
|
||||||
|
|
||||||
if ($conf->stock->dir_output) {
|
if ($conf->stock->dir_output) {
|
||||||
// Definition of $dir and $file
|
// Definition of $dir and $file
|
||||||
if ($object->specimen) {
|
if ($object->specimen) {
|
||||||
|
|||||||
@ -226,7 +226,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
|||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$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 = preg_replace('/,\s*$/', '', $sql);
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
$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'])) {
|
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
|
// List of mass actions available
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
//'validate'=>$langs->trans("Validate"),
|
'validate'=>$langs->trans("Validate"),
|
||||||
//'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
//'generate_doc'=>$langs->trans("ReGeneratePDF"),
|
||||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||||
//'presend'=>$langs->trans("SendByMail"),
|
//'presend'=>$langs->trans("SendByMail"),
|
||||||
|
|||||||
@ -726,6 +726,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print $langs->trans("Warehouse");
|
print $langs->trans("Warehouse");
|
||||||
}
|
}
|
||||||
print '</td>';
|
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
|
// Lot - serial
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -867,8 +875,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
print ' '.$alreadyconsumed;
|
print ' '.$alreadyconsumed;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'; // Warehouse
|
// Warehouse
|
||||||
|
print '<td>';
|
||||||
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) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<td></td>'; // Lot
|
print '<td></td>'; // Lot
|
||||||
}
|
}
|
||||||
|
|||||||
@ -748,7 +748,7 @@ if ($object->id > 0) {
|
|||||||
print $warehouse_static->getNomUrl(1);
|
print $warehouse_static->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td id="id_'.$obj->rowid.'_product">';
|
print '<td id="id_'.$obj->rowid.'_product">';
|
||||||
print $product_static->getNomUrl(1);
|
print $product_static->getNomUrl(1).' - '.$product_static->label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
|
|||||||
@ -864,6 +864,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
|||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
|
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
|
||||||
// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||||
// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user