Skip to content

Commit cba92c8

Browse files
committed
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
2 parents fa07964 + 2155d56 commit cba92c8

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

htdocs/accountancy/index.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,17 @@
111111
</script>';
112112
}
113113

114-
115114
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
116115

116+
if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) {
117+
print info_admin($langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices"));
118+
print "<br>";
119+
}
120+
117121
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
118122
print "<br>\n";
119123
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
120124
if (!empty($user->rights->accounting->chartofaccount)) {
121-
print "<br>\n"; print "<br>\n";
122-
123125
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
124126
print '<hr>';
125127
print "<br>\n";

htdocs/core/ajax/check_notifications.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
150150
$sql .= ' WHERE a.code <> "AC_OTH_AUTO"';
151151
$sql .= ' AND (';
152-
$sql .= " (ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
152+
$sql .= " ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
153153
$sql .= ' )';
154154
} else {
155155
$sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);

htdocs/public/ticket/create_ticket.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,17 @@
160160
// Le premier contact trouvé est utilisé pour déterminer le contact suivi
161161
$contacts = $object->searchContactByEmail($origin_email);
162162

163+
// Ensure that contact is active and select first active contact
164+
$cid = -1;
165+
foreach ($contacts as $key => $contact) {
166+
if ((int) $contact->statut == 1) {
167+
$cid = $key;
168+
break;
169+
}
170+
}
171+
163172
// Option to require email exists to create ticket
164-
if (!empty($conf->global->TICKET_EMAIL_MUST_EXISTS) && !$contacts[0]->socid) {
173+
if (!empty($conf->global->TICKET_EMAIL_MUST_EXISTS) && ($cid < 0 || empty($contacts[$cid]->socid))) {
165174
$error++;
166175
array_push($object->errors, $langs->trans("ErrorEmailMustExistToCreateTicket"));
167176
$action = '';
@@ -286,9 +295,9 @@
286295
$object->fk_soc = $searched_companies[0]->id;
287296
}
288297

289-
if (is_array($contacts) and count($contacts) > 0) {
290-
$object->fk_soc = $contacts[0]->socid;
291-
$usertoassign = $contacts[0]->id;
298+
if (is_array($contacts) && count($contacts) > 0 && $cid >= 0) {
299+
$object->fk_soc = $contacts[$cid]->socid;
300+
$usertoassign = $contacts[$cid]->id;
292301
}
293302

294303
$ret = $extrafields->setOptionalsFromPost(null, $object);

htdocs/user/class/user.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ public function hasRight($module, $permlevel1, $permlevel2 = '')
716716
'shipping' => 'expedition',
717717
'task' => 'task@projet',
718718
'fichinter' => 'ficheinter',
719+
'propale' => 'propal',
719720
'inventory' => 'stock',
720721
'invoice' => 'facture',
721722
'invoice_supplier' => 'fournisseur',

0 commit comments

Comments
 (0)