Merge branch '19.0' of github.com:Dolibarr/dolibarr into 20.0

This commit is contained in:
Maxime Kohlhaas 2025-01-09 18:18:36 +01:00
commit b754994543
5 changed files with 20 additions and 5 deletions

View File

@ -231,7 +231,11 @@ class pdf_standard_asset extends ModelePDFAsset
// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

View File

@ -282,7 +282,11 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

View File

@ -251,7 +251,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

View File

@ -852,7 +852,10 @@ $arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
if ($user->hasRight($rightskey, 'creer')) {
$arrayofmassactions['preupdateprice'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("UpdatePrice");
if (getDolGlobalString('PRODUCT_PRICE_UNIQ') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
$arrayofmassactions['preupdateprice'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("UpdatePrice");
}
$arrayofmassactions['switchonsalestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnSaleStatus");
$arrayofmassactions['switchonpurchasestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnPurchaseStatus");
}

View File

@ -235,7 +235,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) {
exit(1);
}
}
$user->getrights();
$user->getrights('', 1); // We force rights reload to have the correct permissions for user in the entity we just switched in
}
// Reload langs