diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index a4dcac8c1ad..b50139a2d76 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -732,11 +732,11 @@ class AccountingAccount extends CommonObject global $hookmanager; // Instantiate hooks for external modules - $hookmanager->initHooks(array('accoutancyBindingCalculation')); + $hookmanager->initHooks(array('accountancyBindingCalculation')); - // Execute hook accoutancyBindingCalculation + // Execute hook accountancyBindingCalculation $parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount'=>$accountingAccount, $type); - $reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks + $reshook = $hookmanager->executeHooks('accountancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { if ($type == 'customer') { diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 1e83a9c6c19..9cad28be5d5 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1065,12 +1065,12 @@ if ($rowid > 0) { // Bank account print ''.$langs->trans("FinancialAccount").''; print img_picto('', 'bank_account'); - $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2); + $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2, '', 0, 'minwidth200'); print "\n"; // Payment mode print ''.$langs->trans("PaymentMode").''; - $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2); + $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200'); print "\n"; // Date of payment diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index a36c3698306..f8c2cf0bc06 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -91,7 +91,7 @@ if ($action == 'updateMask') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bom&file=SPECIMEN.pdf"); return; } else { - setEventMessages($module->error, null, 'errors'); + setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } } else { @@ -174,7 +174,7 @@ $head = bomAdminPrepareHead(); print dol_get_fiche_head($head, 'settings', $langs->trans("BOMs"), -1, 'bom'); /* - * BOMs Numbering model + * Numbering module */ print load_fiche_titre($langs->trans("BOMsNumberingModules"), '', ''); @@ -200,10 +200,11 @@ foreach ($dirmodels as $reldir) { while (($file = readdir($handle)) !== false) { if (substr($file, 0, 8) == 'mod_bom_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); + $classname = $file; require_once $dir.$file.'.php'; - $module = new $file($db); + $module = new $classname($db); // Show modules according to features level if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { @@ -218,7 +219,7 @@ foreach ($dirmodels as $reldir) { print $module->info(); print ''; - // Show example of numbering model + // Show example of numbering module print ''; $tmp = $module->getExample(); if (preg_match('/^Error/', $tmp)) { @@ -275,13 +276,13 @@ foreach ($dirmodels as $reldir) { } print ""; print ""; -print "
\n"; /* * Document templates generators */ +print "
\n"; print load_fiche_titre($langs->trans("BOMsModelModule"), '', ''); // Load array def with activated templates @@ -305,8 +306,8 @@ if ($resql) { print '
'; -print "\n"; -print "\n"; +print '
'; +print ''; print ''; print ''; print '\n"; @@ -362,13 +363,13 @@ foreach ($dirmodels as $reldir) { // Active if (in_array($name, $def)) { print ''; } else { print '"; } @@ -377,7 +378,7 @@ foreach ($dirmodels as $reldir) { if ($conf->global->BOM_ADDON_PDF == $name) { print img_picto($langs->trans("Default"), 'on'); } else { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -419,12 +420,12 @@ foreach ($dirmodels as $reldir) { print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print "
'; print '
'; -print "
"; /* * Other options */ +print "
"; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); print '
'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4eca459300a..20bc5462d5e 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2563,7 +2563,7 @@ if ($action == 'create' && $usercancreate) { } // Create intervention - if ($conf->ficheinter->enabled) { + if (!empty($conf->ficheinter->enabled)) { $langs->load("interventions"); if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 8ff229f7ba7..345e3d26419 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -52,7 +52,7 @@ $hookmanager->initHooks(array('paymentcard', 'globalcard')); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. -$result = restrictedArea($user, $object->element, $object->id, 'paiement', ''); +$result = restrictedArea($user, $object->element, $object->id, 'paiement'); // Security check if ($user->socid) { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 216702da9ed..a4a270f5227 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -259,10 +259,6 @@ if (empty($reshook)) { } $id = $object->create($user); - if ($id < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } - if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); @@ -374,6 +370,9 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } + if ($error) { + $action = 'create'; + } } else { $result = $object->create($user); if ($result > 0) { diff --git a/htdocs/core/boxes/box_graph_nb_tickets_type.php b/htdocs/core/boxes/box_graph_nb_tickets_type.php index 2da54d84e7a..f4efce23797 100644 --- a/htdocs/core/boxes/box_graph_nb_tickets_type.php +++ b/htdocs/core/boxes/box_graph_nb_tickets_type.php @@ -131,7 +131,7 @@ class box_graph_nb_tickets_type extends ModeleBoxes } foreach ($listofoppcode as $rowid => $code) { $dataseries[] = array( - 'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_category', 'code', 'label', $code), + 'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_type', 'code', 'label', $code), 'data' => (empty($data[$code]) ? 0 : $data[$code]) ); } diff --git a/htdocs/core/boxes/box_graph_ticket_by_severity.php b/htdocs/core/boxes/box_graph_ticket_by_severity.php index 5e69a49e88e..72e74542b20 100644 --- a/htdocs/core/boxes/box_graph_ticket_by_severity.php +++ b/htdocs/core/boxes/box_graph_ticket_by_severity.php @@ -152,7 +152,7 @@ class box_graph_ticket_by_severity extends ModeleBoxes } foreach ($listofoppcode as $rowid => $code) { $dataseries[] = array( - 'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_category', 'code', 'label', $code), + 'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_severity', 'code', 'label', $code), 'data' => (empty($data[$code]) ? 0 : $data[$code]) ); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index aa88aeb825a..bd8ab4c22f4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6873,7 +6873,7 @@ abstract class CommonObject $out .= ''; } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); - $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%'); + $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, $morecss, 0, '100%'); } elseif ($type == 'radio') { $out = ''; foreach ($param['options'] as $keyopt => $val) { @@ -7846,14 +7846,16 @@ abstract class CommonObject if (!is_numeric($this->array_options['options_'.$key])) { // For backward compatibility $datenotinstring = $this->db->jdate($datenotinstring); } - $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) ? dol_mktime(12, 0, 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring; + $datekey = $keyprefix.'options_'.$key.$keysuffix; + $value = (GETPOSTISSET($datekey)) ? dol_mktime(12, 0, 0, GETPOST($datekey.'month', 'int', 3), GETPOST($datekey.'day', 'int', 3), GETPOST($datekey.'year', 'int', 3)) : $datenotinstring; } if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('datetime'))) { $datenotinstring = $this->array_options['options_'.$key]; if (!is_numeric($this->array_options['options_'.$key])) { // For backward compatibility $datenotinstring = $this->db->jdate($datenotinstring); } - $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) ? dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."sec", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3), 'tzuserrel') : $datenotinstring; + $timekey = $keyprefix.'options_'.$key.$keysuffix; + $value = (GETPOSTISSET($timekey)) ? dol_mktime(GETPOST($timekey.'hour', 'int', 3), GETPOST($timekey.'min', 'int', 3), GETPOST($timekey.'sec', 'int', 3), GETPOST($timekey.'month', 'int', 3), GETPOST($timekey.'day', 'int', 3), GETPOST($timekey.'year', 'int', 3), 'tzuserrel') : $datenotinstring; } // Convert float submited string into real php numeric (value in memory must be a php numeric) if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) { @@ -7861,7 +7863,7 @@ abstract class CommonObject } // HTML, text, select, integer and varchar: take into account default value in database if in create mode - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int'))) { + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int', 'boolean'))) { if ($action == 'create') { $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? $value : $extrafields->attributes[$this->table_element]['default'][$key]; } @@ -7913,7 +7915,7 @@ abstract class CommonObject // a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one $out .= ''; } elseif ($display_type == 'line') { - $out .= '
'; + $out .= '
'; } switch ($mode) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index ff45a028d51..5fc162634a8 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1644,15 +1644,18 @@ class ExtraFields } } } else { - require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $toprint = array(); $obj = $this->db->fetch_object($resql); - $c = new Categorie($this->db); - $c->fetch($obj->rowid); - $ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text - foreach ($ways as $way) { - $toprint[] = '
  • color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'
  • '; + if ($obj->rowid) { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $c = new Categorie($this->db); + $result = $c->fetch($obj->rowid); + if ($result > 0) { + $ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text + foreach ($ways as $way) { + $toprint[] = '
  • color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '
  • '; + } + } } $value = '
      '.implode(' ', $toprint).'
    '; } diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index 97eaa7d0b9e..d1a7cea5d9a 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -128,11 +128,9 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu } else { $ref_prodserv = $prodser->ref; // Show local ref only } - - $ref_prodserv .= " - "; } - $libelleproduitservice = $prefix_prodserv.$ref_prodserv.$libelleproduitservice; + $libelleproduitservice = $prefix_prodserv.$ref_prodserv.($libelleproduitservice ? " - " : "").$libelleproduitservice; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 43a549655b9..03f9e63219c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2203,7 +2203,7 @@ function dol_bc($var, $moreclass = '') */ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs = '', $mode = 0, $extralangcode = '') { - global $conf, $langs; + global $conf, $langs, $hookmanager; $ret = ''; $countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR', 'CN'); // See also MAIN_FORCE_STATE_INTO_ADDRESS @@ -2269,6 +2269,14 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs $langs->load("dict"); $ret .= (empty($object->country_code) ? '' : ($ret ? $sep : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code))); } + if ($hookmanager) { + $parameters = array('withcountry' => $withcountry, 'sep' => $sep, 'outputlangs' => $outputlangs,'mode' => $mode, 'extralangcode' => $extralangcode); + $reshook = $hookmanager->executeHooks('formatAddress', $parameters, $object); + if ($reshook > 0) { + $ret = ''; + } + $ret .= $hookmanager->resPrint; + } return $ret; } @@ -10043,9 +10051,11 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = // Js Confirm button if ($userRight && !empty($params['confirm'])) { if (!is_array($params['confirm'])) { - $params['confirm'] = array( - 'url' => $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes' - ); + $params['confirm'] = array(); + } + + if (empty($params['confirm']['url'])) { + $params['confirm']['url'] = $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes'; } // for js desabled compatibility set $url as call to confirm action and $params['confirm']['url'] to confirmed action diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 74bbf053153..4cfe1722ce2 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -238,7 +238,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); //print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", objectid=".$objectid; - //print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select; + //print ", dbtablename=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select; //print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."
    "; $parentfortableentity = ''; @@ -539,8 +539,8 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if (!$user->rights->fournisseur->facture->creer) { $deleteok = 0; } - } elseif ($feature == 'payment') { // Permission to delete a payment of an invoice is permission to edit an invoice. - if (!$user->rights->facture->creer) { + } elseif ($feature == 'payment') { + if (!$user->rights->facture->paiement) { $deleteok = 0; } } elseif ($feature == 'banque') { diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 463cbc46a24..946d9f32649 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -169,7 +169,7 @@ class doc_generic_bom_odt extends ModelePDFBom $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; } $texte .= '
    '; } @@ -406,10 +406,22 @@ class doc_generic_bom_odt extends ModelePDFBom $foundtagforlines = 0; dol_syslog($e->getMessage(), LOG_INFO); } + if ($foundtagforlines) { $linenumber = 0; foreach ($object->lines as $line) { $linenumber++; + + if ($line->fk_product > 0) { + $line->fetch_product(); + + $line->product_ref = $line->product->ref; + $line->product_desc = $line->product->description; + $line->product_label = $line->product->label; + $line->product_type = $line->product->type; + $line->product_barcode = $line->product->barcode; + } + $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php index a1a2f7774aa..082fb56879f 100644 --- a/htdocs/core/modules/modRecruitment.class.php +++ b/htdocs/core/modules/modRecruitment.class.php @@ -429,7 +429,7 @@ class modRecruitment extends DolibarrModules $sql = array(); // Document template - $moduledir = 'mymodule'; + $moduledir = 'recruitment'; $myTmpObjects = array(); $myTmpObjects['RecruitmentJobPosition'] = array('includerefgeneration'=>1, 'includedocgeneration'=>1); @@ -437,10 +437,10 @@ class modRecruitment extends DolibarrModules if ($myTmpObjectKey == 'MyObject') { continue; } - if ($myTmpObjectArray['includerefgeneration']) { - $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/mymodule/template_myobjects.odt'; - $dirodt = DOL_DATA_ROOT.'/doctemplates/mymodule'; - $dest = $dirodt.'/template_myobjects.odt'; + if ($myTmpObjectArray['includedocgeneration']) { + $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_recruitmentjobposition.odt'; + $dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir; + $dest = $dirodt.'/template_recruitmentjobposition.odt'; if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -456,6 +456,7 @@ class modRecruitment extends DolibarrModules $sql = array_merge($sql, array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity), "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."','".$this->db->escape(strtolower($myTmpObjectKey))."',".((int) $conf->entity).")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".$this->db->escape(strtolower($myTmpObjectKey))."' AND entity = ".((int) $conf->entity), "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".$this->db->escape(strtolower($myTmpObjectKey))."', ".((int) $conf->entity).")" )); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index e02a601c9cd..ab08d5c04f8 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -390,11 +390,15 @@ if (empty($reshook)) { } } } else { - $mesg = $srcobject->error; + $langs->load("errors"); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + $action = 'create'; $error++; } } else { - $mesg = $object->error; + $langs->load("errors"); + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create'; $error++; } } else { @@ -418,12 +422,14 @@ if (empty($reshook)) { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; + $error++; } } } } else { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")); $action = 'create'; + $error++; } } elseif ($action == 'update' && $user->rights->ficheinter->creer) { $object->socid = $socid; diff --git a/htdocs/install/doctemplates/boms/template_bom.odt b/htdocs/install/doctemplates/boms/template_bom.odt index 701753c3dba..573e97a0a84 100644 Binary files a/htdocs/install/doctemplates/boms/template_bom.odt and b/htdocs/install/doctemplates/boms/template_bom.odt differ diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 61f0c4d71bd..1a4250834b2 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -313,8 +313,6 @@ WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connec WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead. -<<<<<<< HEAD -<<<<<<< HEAD # Validate RequireValidValue = Value not valid RequireAtLeastXString = Requires at least %s character(s) @@ -335,9 +333,3 @@ BadSetupOfField = Error bad setup of field BadSetupOfFieldClassNotFoundForValidation = Error bad setup of field : Class not found for validation BadSetupOfFieldFileNotFound = Error bad setup of field : File not found for inclusion BadSetupOfFieldFetchNotCallable = Error bad setup of field : Fetch not callable on class -======= -======= ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 8e773f92788..f163af75cae 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -119,6 +119,8 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; } + } else { + $action = 'edit'; } } else { $action = 'edit'; diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php index 84bfd30401c..089aa720fa7 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php @@ -51,7 +51,7 @@ abstract class ModelePDFRecruitmentCandidature extends CommonDocGenerator // phpcs:enable global $conf; - $type = 'recruitmentjobposition'; + $type = 'recruitmentjobcandidature'; $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index a5837c2557f..56eef9fb632 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -319,8 +319,20 @@ if (empty($reshook)) { if (!$error) { if ($origin && $originid) { - $element = 'supplier_proposal'; - $subelement = 'supplier_proposal'; + $element = $subelement = $origin; + if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { + $element = $regs[1]; + $subelement = $regs[2]; + } + + // For compatibility + if ($element == 'order') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; + $subelement = 'propal'; + } $object->origin = $origin; $object->origin_id = $originid; @@ -1079,8 +1091,20 @@ if ($action == 'create') { // Load objectsrc if (!empty($origin) && !empty($originid)) { - $element = 'supplier_proposal'; - $subelement = 'supplier_proposal'; + $element = $subelement = GETPOST('origin'); + if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs)) { + $element = $regs[1]; + $subelement = $regs[2]; + } + + // For compatibility + if ($element == 'order' || $element == 'commande') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; + $subelement = 'propal'; + } dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 156c996d12d..43dfbf67869 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -7448,6 +7448,11 @@ if (!empty($conf->global->THEME_CUSTOM_CSS)) { ?> + div.extra_inline_chkbxlst, + div.extra_inline_checkbox { + min-width:150px; + } + /* Must be at end */ div.flot-text .flot-tick-label .tickLabel, .fa-color-unset { color: unset;