mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
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>';
|
||||
}
|
||||
|
||||
|
||||
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 "<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
||||
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 '<hr>';
|
||||
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 .= ' WHERE a.code <> "AC_OTH_AUTO"';
|
||||
$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 .= ' )';
|
||||
} else {
|
||||
$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
|
||||
$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
|
||||
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++;
|
||||
array_push($object->errors, $langs->trans("ErrorEmailMustExistToCreateTicket"));
|
||||
$action = '';
|
||||
|
|
@ -286,9 +295,9 @@ if (empty($reshook)) {
|
|||
$object->fk_soc = $searched_companies[0]->id;
|
||||
}
|
||||
|
||||
if (is_array($contacts) and count($contacts) > 0) {
|
||||
$object->fk_soc = $contacts[0]->socid;
|
||||
$usertoassign = $contacts[0]->id;
|
||||
if (is_array($contacts) && count($contacts) > 0 && $cid >= 0) {
|
||||
$object->fk_soc = $contacts[$cid]->socid;
|
||||
$usertoassign = $contacts[$cid]->id;
|
||||
}
|
||||
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
|
|
|
|||
|
|
@ -716,6 +716,7 @@ class User extends CommonObject
|
|||
'shipping' => 'expedition',
|
||||
'task' => 'task@projet',
|
||||
'fichinter' => 'ficheinter',
|
||||
'propale' => 'propal',
|
||||
'inventory' => 'stock',
|
||||
'invoice' => 'facture',
|
||||
'invoice_supplier' => 'fournisseur',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user