Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
cfc2ec63f3
@ -198,11 +198,21 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
|
||||
if (empty($conf->global->TICKET_DISABLE_CUSTOMER_MAILS) && empty($object->context['disableticketemail']) && $object->notify_tiers_at_create) {
|
||||
$sendto = '';
|
||||
if (empty($user->socid) && empty($user->email)) {
|
||||
$object->fetch_thirdparty();
|
||||
$sendto = $object->thirdparty->email;
|
||||
} else {
|
||||
$sendto = $user->email;
|
||||
|
||||
//if contact selected send to email's contact else send to email's thirdparty
|
||||
|
||||
$contactid = GETPOST('contactid', 'alpha');
|
||||
|
||||
if(!empty($contactid)) {
|
||||
$contact = new Contact($this->db);
|
||||
$res = $contact->fetch($contactid);
|
||||
}
|
||||
|
||||
if($res > 0 && !empty($contact->email) && !empty($contact->statut)) {
|
||||
$sendto = $contact->email;
|
||||
} elseif (!empty($object->fk_soc)) {
|
||||
$object->fetch_thirdparty();
|
||||
$sendto = $object->thirdparty->email;
|
||||
}
|
||||
|
||||
if ($sendto) {
|
||||
|
||||
@ -1513,12 +1513,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
//}
|
||||
|
||||
// Supplier
|
||||
//if ($object->fournisseur) {
|
||||
print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
//}
|
||||
if (!empty($conf->fournisseur->enabled)) {
|
||||
print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
@ -2133,17 +2133,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print "</td></tr>";
|
||||
|
||||
// Supplier
|
||||
print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>';
|
||||
print '<td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1);
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER);
|
||||
$arrayselected = array();
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
if (!empty($conf->fournisseur->enabled)) {
|
||||
print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>';
|
||||
print '<td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1);
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER);
|
||||
$arrayselected = array();
|
||||
foreach($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
@ -2520,7 +2522,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
}
|
||||
|
||||
// Supplier
|
||||
if ($object->fournisseur) {
|
||||
if (!empty($conf->fournisseur->enabled) && $object->fournisseur) {
|
||||
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user