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

This commit is contained in:
Laurent Destailleur 2023-01-11 21:08:13 +01:00
commit f4b0fa917e
5 changed files with 15 additions and 4 deletions

View File

@ -1288,7 +1288,8 @@ abstract class CommonDocGenerator
}
$extrafields = $this->extrafieldsCache;
$extrafieldOutputContent = $extrafields->showOutputField($extrafieldKey, $object->array_options[$extrafieldOptionsKey], '', $object->table_element);
$extrafieldOutputContent = '';
if (isset($object->array_options[$extrafieldOptionsKey])) $extrafieldOutputContent = $extrafields->showOutputField($extrafieldKey, $object->array_options[$extrafieldOptionsKey], '', $object->table_element);
// TODO : allow showOutputField to be pdf public friendly, ex: in a link to object, clean getNomUrl to remove link and images... like a getName methode ...
if ($extrafields->attributes[$object->table_element]['type'][$extrafieldKey] == 'link') {

View File

@ -40,7 +40,7 @@ if ($action == 'presend') {
$titreform = 'SendMail';
$object->fetch_projet();
if (!isset($file)) $file = null;
$ref = dol_sanitizeFileName($object->ref);
if (!in_array($object->element, array('user', 'member'))) {
//$fileparams['fullname'] can be filled from the card
@ -57,7 +57,7 @@ if ($action == 'presend') {
}
}
$file = $fileparams['fullname'];
$file = isset($fileparams['fullname'])?$fileparams['fullname']:null;
}
// Define output language

View File

@ -52,7 +52,7 @@ $ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$socid = GETPOST('socid', 'int');
$amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT');
$donation_date = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
@ -63,6 +63,13 @@ if ($id > 0 || $ref) {
$object->fetch($id, $ref);
}
if (!empty($socid) && $socid > 0) {
$soc = new Societe($db);
if ($socid > 0) {
$soc->fetch($socid);
}
}
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels

View File

@ -59,6 +59,7 @@ $search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST('search_ref', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
$search_name = GETPOST('search_name', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$optioncss = GETPOST('optioncss', 'alpha');
@ -71,6 +72,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_all = "";
$search_ref = "";
$search_company = "";
$search_thirdparty = "";
$search_name = "";
$search_amount = "";
$search_status = '';

View File

@ -1039,6 +1039,7 @@ if ($source == 'order') {
$amount = price2num($amount);
}
$tag = '';
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {