Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
ba21d9ff83
@ -1069,16 +1069,18 @@ class FormSetupItem
|
|||||||
} elseif ($this->type == 'yesno') {
|
} elseif ($this->type == 'yesno') {
|
||||||
$out.= ajax_constantonoff($this->confKey);
|
$out.= ajax_constantonoff($this->confKey);
|
||||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
if ($this->fieldValue > 0) {
|
||||||
$formmail = new FormMail($this->db);
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||||
|
$formmail = new FormMail($this->db);
|
||||||
|
|
||||||
$tmp = explode(':', $this->type);
|
$tmp = explode(':', $this->type);
|
||||||
|
|
||||||
$template = $formmail->getEMailTemplate($this->db, $tmp[1], $user, $this->langs, $this->fieldValue);
|
$template = $formmail->getEMailTemplate($this->db, $tmp[1], $user, $this->langs, $this->fieldValue);
|
||||||
if ($template<0) {
|
if ($template<0) {
|
||||||
$this->setErrors($formmail->errors);
|
$this->setErrors($formmail->errors);
|
||||||
|
}
|
||||||
|
$out.= $this->langs->trans($template->label);
|
||||||
}
|
}
|
||||||
$out.= $this->langs->trans($template->label);
|
|
||||||
} elseif (preg_match('/category:/', $this->type)) {
|
} elseif (preg_match('/category:/', $this->type)) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$c = new Categorie($this->db);
|
$c = new Categorie($this->db);
|
||||||
@ -1103,6 +1105,9 @@ class FormSetupItem
|
|||||||
$out.= $this->langs->trans("NorProspectNorCustomer");
|
$out.= $this->langs->trans("NorProspectNorCustomer");
|
||||||
}
|
}
|
||||||
} elseif ($this->type == 'product') {
|
} elseif ($this->type == 'product') {
|
||||||
|
if (!class_exists("Product")) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
}
|
||||||
$product = new Product($this->db);
|
$product = new Product($this->db);
|
||||||
$resprod = $product->fetch($this->fieldValue);
|
$resprod = $product->fetch($this->fieldValue);
|
||||||
if ($resprod > 0) {
|
if ($resprod > 0) {
|
||||||
|
|||||||
@ -2940,7 +2940,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
if (isset($objectidnext) && $objectidnext > 0) {
|
if (isset($objectidnext) && $objectidnext > 0) {
|
||||||
$facthatreplace = new FactureFournisseur($db);
|
$facthatreplace = new FactureFournisseur($db);
|
||||||
$facthatreplace->fetch($facidnext);
|
$facthatreplace->fetch($objectidnext);
|
||||||
print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')';
|
print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')';
|
||||||
}
|
}
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) {
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) {
|
||||||
|
|||||||
@ -55,9 +55,6 @@ global $langs, $user;
|
|||||||
// Libraries
|
// Libraries
|
||||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||||
require_once '../lib/mymodule.lib.php';
|
require_once '../lib/mymodule.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|
||||||
|
|
||||||
|
|
||||||
//require_once "../class/myclass.class.php";
|
//require_once "../class/myclass.class.php";
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user