Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
cba92c8bdd
@ -111,15 +111,17 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
|
|||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
|
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
|
||||||
|
|
||||||
|
if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) {
|
||||||
|
print info_admin($langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices"));
|
||||||
|
print "<br>";
|
||||||
|
}
|
||||||
|
|
||||||
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
||||||
if (!empty($user->rights->accounting->chartofaccount)) {
|
if (!empty($user->rights->accounting->chartofaccount)) {
|
||||||
print "<br>\n"; print "<br>\n";
|
|
||||||
|
|
||||||
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (empty($_SESSION['auto_check_events_not_before']) || $time >= $_SESSION['auto
|
|||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
||||||
$sql .= ' WHERE a.code <> "AC_OTH_AUTO"';
|
$sql .= ' WHERE a.code <> "AC_OTH_AUTO"';
|
||||||
$sql .= ' AND (';
|
$sql .= ' AND (';
|
||||||
$sql .= " (ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
|
$sql .= " ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
|
||||||
$sql .= ' )';
|
$sql .= ' )';
|
||||||
} else {
|
} else {
|
||||||
$sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
$sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
||||||
|
|||||||
@ -160,8 +160,17 @@ if (empty($reshook)) {
|
|||||||
// Le premier contact trouvé est utilisé pour déterminer le contact suivi
|
// Le premier contact trouvé est utilisé pour déterminer le contact suivi
|
||||||
$contacts = $object->searchContactByEmail($origin_email);
|
$contacts = $object->searchContactByEmail($origin_email);
|
||||||
|
|
||||||
|
// Ensure that contact is active and select first active contact
|
||||||
|
$cid = -1;
|
||||||
|
foreach ($contacts as $key => $contact) {
|
||||||
|
if ((int) $contact->statut == 1) {
|
||||||
|
$cid = $key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Option to require email exists to create ticket
|
// Option to require email exists to create ticket
|
||||||
if (!empty($conf->global->TICKET_EMAIL_MUST_EXISTS) && !$contacts[0]->socid) {
|
if (!empty($conf->global->TICKET_EMAIL_MUST_EXISTS) && ($cid < 0 || empty($contacts[$cid]->socid))) {
|
||||||
$error++;
|
$error++;
|
||||||
array_push($object->errors, $langs->trans("ErrorEmailMustExistToCreateTicket"));
|
array_push($object->errors, $langs->trans("ErrorEmailMustExistToCreateTicket"));
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -286,9 +295,9 @@ if (empty($reshook)) {
|
|||||||
$object->fk_soc = $searched_companies[0]->id;
|
$object->fk_soc = $searched_companies[0]->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($contacts) and count($contacts) > 0) {
|
if (is_array($contacts) && count($contacts) > 0 && $cid >= 0) {
|
||||||
$object->fk_soc = $contacts[0]->socid;
|
$object->fk_soc = $contacts[$cid]->socid;
|
||||||
$usertoassign = $contacts[0]->id;
|
$usertoassign = $contacts[$cid]->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||||
|
|||||||
@ -716,6 +716,7 @@ class User extends CommonObject
|
|||||||
'shipping' => 'expedition',
|
'shipping' => 'expedition',
|
||||||
'task' => 'task@projet',
|
'task' => 'task@projet',
|
||||||
'fichinter' => 'ficheinter',
|
'fichinter' => 'ficheinter',
|
||||||
|
'propale' => 'propal',
|
||||||
'inventory' => 'stock',
|
'inventory' => 'stock',
|
||||||
'invoice' => 'facture',
|
'invoice' => 'facture',
|
||||||
'invoice_supplier' => 'fournisseur',
|
'invoice_supplier' => 'fournisseur',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user