Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/commonobject.class.php htdocs/langs/en_US/errors.lang htdocs/projet/card.php
This commit is contained in:
commit
0bb7defa88
@ -741,11 +741,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)) {
|
||||
$const_name = '';
|
||||
|
||||
@ -93,7 +93,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 {
|
||||
@ -176,7 +176,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"), '', '');
|
||||
@ -202,10 +202,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) {
|
||||
@ -220,7 +221,7 @@ foreach ($dirmodels as $reldir) {
|
||||
print $module->info();
|
||||
print '</td>';
|
||||
|
||||
// Show example of numbering model
|
||||
// Show example of numbering module
|
||||
print '<td class="nowrap">';
|
||||
$tmp = $module->getExample();
|
||||
if (preg_match('/^Error/', $tmp)) {
|
||||
@ -277,13 +278,13 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
|
||||
print "<br>\n";
|
||||
print load_fiche_titre($langs->trans("BOMsModelModule"), '', '');
|
||||
|
||||
// Load array def with activated templates
|
||||
@ -307,8 +308,8 @@ if ($resql) {
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
@ -364,13 +365,13 @@ foreach ($dirmodels as $reldir) {
|
||||
// Active
|
||||
if (in_array($name, $def)) {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@ -379,7 +380,7 @@ foreach ($dirmodels as $reldir) {
|
||||
if ($conf->global->BOM_ADDON_PDF == $name) {
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -421,12 +422,12 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print "<br>";
|
||||
|
||||
/*
|
||||
* Other options
|
||||
*/
|
||||
|
||||
print "<br>";
|
||||
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
||||
@ -264,10 +264,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');
|
||||
|
||||
@ -379,6 +375,9 @@ if (empty($reshook)) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($error) {
|
||||
$action = 'create';
|
||||
}
|
||||
} else {
|
||||
$result = $object->create($user);
|
||||
if ($result > 0) {
|
||||
|
||||
@ -8054,7 +8054,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 .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="valuefieldcreate '.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||
} elseif ($display_type == 'line') {
|
||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="valuefieldcreate '.$this->element.'_extras_'.$key.'">';
|
||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="valuefieldcreate '.$this->element.'_extras_'.$key.' extra_inline_'.$extrafields->attributes[$this->table_element]['type'][$key].'">';
|
||||
}
|
||||
|
||||
switch ($mode) {
|
||||
|
||||
@ -1677,15 +1677,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[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
|
||||
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[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10331,9 +10331,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
|
||||
|
||||
@ -169,7 +169,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
|
||||
// Show list of found files
|
||||
foreach ($listoffiles as $file) {
|
||||
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=boms&file=invoices/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
|
||||
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=boms/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
|
||||
}
|
||||
$texte .= '</div>';
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -394,11 +394,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 {
|
||||
@ -422,12 +426,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;
|
||||
|
||||
Binary file not shown.
@ -322,11 +322,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
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
# Validate
|
||||
RequireValidValue = Value not valid
|
||||
RequireAtLeastXString = Requires at least %s character(s)
|
||||
@ -347,12 +342,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
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
=======
|
||||
=======
|
||||
>>>>>>> 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
|
||||
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
@ -120,6 +120,8 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'edit';
|
||||
}
|
||||
} else {
|
||||
$action = 'edit';
|
||||
}
|
||||
} else {
|
||||
$action = 'edit';
|
||||
|
||||
@ -321,8 +321,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;
|
||||
@ -1138,8 +1150,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');
|
||||
|
||||
|
||||
@ -7630,6 +7630,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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user