Co-authored-by: Hystepik <lucas.marcouiller@gmail.com>
@@ -10450,7 +10450,7 @@ abstract class CommonObject
$project_result = $this->fetch_projet();
if ($project_result >= 0) {
- $element = 'projet/'.dol_sanitizeFileName($object->project->ref).'/';
+ $element = 'projet/'.dol_sanitizeFileName($this->project->ref).'/';
}
default:
$element = $this->element;
@@ -590,6 +590,8 @@ class pdf_strato extends ModelePDFContract
// phpcs:enable
global $conf, $langs, $hookmanager;
+ $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, (is_object($outputlangsbis) ? $outputlangsbis : null));
+
$ltrdirection = 'L';
if ($outputlangs->trans("DIRECTION") == 'rtl') {
$ltrdirection = 'R';
@@ -143,6 +143,22 @@ abstract class DolibarrTriggers
+ /**
+ * setErrorsFromObject
+ *
+ * @param CommonObject $object commonobject
+ * @return void
+ */
+ public function setErrorsFromObject($object)
+ {
+ if (!empty($object->error)) {
+ $this->errors = array_merge($this->errors, array($object->error));
+ }
+ if (!empty($object->errors)) {
+ $this->errors = array_merge($this->errors, $object->errors);
/**
* Function called when a Dolibarrr business event is done.
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
@@ -534,7 +534,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
if (isModEnabled('ficheinter') && isModEnabled('ticket') && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_CREATE_INTERVENTION)) {
$fichinter = new Fichinter($this->db);
$fichinter->socid = (int) $object->fk_soc;
- $fichinter->fk_project = $projectid;
+ $fichinter->fk_project = (int) $object->fk_project;
$fichinter->fk_contrat = (int) $object->fk_contract;
$fichinter->author = $user->id;
$fichinter->model_pdf = (!empty($conf->global->FICHEINTER_ADDON_PDF)) ? $conf->global->FICHEINTER_ADDON_PDF : 'soleil';
@@ -205,7 +205,7 @@ class ActionsDatapolicy extends CommonHookActions
/* print_r($parameters); print_r($object); echo "action: " . $action; */
if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2'
- $this->resprints = '<option value="0"'.($disabled ? ' disabled="disabled"' : '').'>'.$langs->trans("datapolicyMassAction").'</option>';
+ $this->resprints = '<option value="0"'.(!empty($disabled) ? ' disabled="disabled"' : '').'>'.$langs->trans("datapolicyMassAction").'</option>';
if (!$error) {
@@ -193,6 +193,7 @@ function displayPositionCard(&$object)
global $user, $langs, $db, $conf, $extrafields, $hookmanager, $action, $permissiontoadd, $permissiontodelete;
$id = $object->id;
+ $ref = $object->ref;
/*
* View