diff --git a/ChangeLog b/ChangeLog
index 68cd7695057..dafa90b9632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,83 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
+***** ChangeLog for 11.0.4 compared to 11.0.3 *****
+FIX: #13749
+FIX: #7594 Expense report multi pagebreak
+FIX: Access to undeclared static property: Contact::$table_element
+FIX: actions on supplier proposal not saved (bad trigger name)
+FIX: Add function "completeTabsHead" to "addreplace" type hook.
+FIX: All forms must use newToken()
+FIX: Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element"
+FIX: author search supplier proposal list
+FIX: A variable was erased by a temporary variable
+FIX: Avoid infinite loop when a fetch is inside a compute field.
+FIX: Backto link
+FIX: Bad position of total in column
+FIX: bad value in currency into discount created from down payment
+FIX: buyprice extrafield langfile and tooltip
+FIX: Buyprice was updated only if min price for this qty had same qty
+FIX: Can switch from double to price type for extrafields
+FIX: Can use decimal value in virtual products
+FIX: child categories only with good entity rights
+FIX: cloning of emailing when no content selected
+FIX: closing tags
+FIX: Combo list of available users to filter on the list of leaves.
+FIX: Compatibility with multicompany, bad numerotation of task.
+FIX: consistency of price w/wo vat wrong when price entered with tax
+FIX: default value of selectMasssAction broken
+FIX: draftordered replenish virtual stock
+FIX: Error update SQL into stock reception
+FIX: expensereport status in generated pdf
+FIX: extra date field incorrect check
+FIX: Extrafields of type price must be '' and not '0' if not defined
+FIX: Foreign currency lost when splitting a discount
+FIX: get remain to pay with rounding decimals
+FIX: gzip and bzip2 must use option -f
+FIX: IHM, unexpected quote
+FIX: keep viewstatut for doli 3.5
+FIX: Link missing into email of some notification
+FIX: Look and feel v11
+FIX: md stylesheet to be included by external modules like eldy
+FIX: missing array option
+FIX: missing default accountancy product buy code
+FIX: missing fk_bank during export of suppliers invoices
+FIX: missing member entity
+FIX: missing selectedlines on supplier order but checkbox are displayed
+FIX: Missing token and take into account max date when it can.
+FIX: model export list must be sorted by label
+FIX: multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL
+FIX: Must escape shell
+FIX: Must exclude logs and some dirs for compressed backup
+FIX: ordered stock already in $stock
+FIX: picture migration script from doli 9.0
+FIX: print pictures on shipment docs
+FIX: product get purchase prices
+FIX: product purchase prices
+FIX: Protection when database has a corrupted product id
+FIX: remove unused var, $usercancreate can be change by Multicompany
+FIX: replenish stock to buy
+FIX: Sanitizing menu parameter
+FIX: Send email from bulk action of list of thirdparties
+FIX: setup of suggested payment mode on proposals and orders
+FIX: Several pb in export of documents
+FIX: Situation invoice take into account the credit notes.
+FIX: some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report
+FIX: sort by default role makes no sense
+FIX: sort on company on member list
+FIX: TakePOS buying price
+FIX: text version of html emailing (removed the body style)
+FIX: The "test smtp connectivity" failed on page to setup mass emailing
+FIX: Error logs an Orderline::delete error, but this is an Orderline::insert error
+FIX: Translation of tooltips of extrafields
+FIX: Use getNomURL instead of hard coded link. Fix limit.
+FIX: Use of image into free text for PDF if DOL_DATA_DIR is outside of
+FIX: viewstatut to search status
+FIX: we must export company mail address on contact vcard only if contact email address is empty
+FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
+FIX: Wrong Sql on getListOfTowns api method
+FIX: wrong user right's name to top menu "commercial"
+FIX: XSS Vulnerability
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
For Users:
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index c06dc51aec1..24b32dcff91 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -19,7 +19,7 @@ use Term::ANSIColor;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
-$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
+$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index 8c9203c8a58..c7c717e702b 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -54,7 +54,8 @@ $statut = GETPOST('statut', 'int');
$search_ref = GETPOST('search_ref', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
-$bon = new BonPrelevement($db, "");
+$bon = new BonPrelevement($db);
+$hookmanager->initHooks(array('withdrawalsreceiptslist'));
/*
diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php
index 68f40999aa7..4dcd9f33388 100644
--- a/htdocs/compta/prelevement/card.php
+++ b/htdocs/compta/prelevement/card.php
@@ -58,7 +58,7 @@ $pagenext = $page + 1;
if (!$sortfield) $sortfield = 'pl.fk_soc';
if (!$sortorder) $sortorder = 'DESC';
-$object = new BonPrelevement($db, "");
+$object = new BonPrelevement($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
@@ -321,7 +321,7 @@ if ($id > 0 || $ref)
}
- $ligne = new LignePrelevement($db, $user);
+ $ligne = new LignePrelevement($db);
/*
* Lines into withdraw request
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 0a033e2df53..0c21a3e6d2b 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -83,18 +83,16 @@ class BonPrelevement extends CommonObject
* Constructor
*
* @param DoliDB $db Database handler
- * @param string $filename Filename of withdraw receipt
*/
- public function __construct($db, $filename = '')
+ public function __construct($db)
{
global $conf, $langs;
- $error = 0;
$this->db = $db;
- $this->filename = $filename;
+ $this->filename = '';
- $this->date_echeance = time();
+ $this->date_echeance = dol_now();
$this->raison_sociale = "";
$this->reference_remise = "";
@@ -892,7 +890,7 @@ class BonPrelevement extends CommonObject
if ($bac->verif() >= 1)
{
$factures_prev[$i] = $fac;
- /* second tableau necessaire pour BonPrelevement */
+ /* second array necessary for BonPrelevement */
$factures_prev_id[$i] = $fac[0];
$i++;
//dol_syslog(__METHOD__."::RIB is ok", LOG_DEBUG);
diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php
index dd24ad9522c..88b612554df 100644
--- a/htdocs/compta/prelevement/class/ligneprelevement.class.php
+++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php
@@ -48,14 +48,12 @@ class LignePrelevement
* Constructor
*
* @param DoliDb $db Database handler
- * @param User $user Objet user
*/
- public function __construct($db, $user)
+ public function __construct($db)
{
global $conf, $langs;
$this->db = $db;
- $this->user = $user;
// List of language codes for status
diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php
index 74626baed13..8c033353637 100644
--- a/htdocs/compta/prelevement/class/rejetprelevement.class.php
+++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php
@@ -247,6 +247,7 @@ class RejetPrelevement
$sendto = $emuser->getFullName($langs)." <".$emuser->email.">";
$from = $this->user->getFullName($langs)." <".$this->user->email.">";
$msgishtml = 1;
+ $trackid = 'use'.$emuser->id;
$arr_file = array();
$arr_mime = array();
@@ -258,7 +259,7 @@ class RejetPrelevement
$message = $langs->trans("InfoRejectMessage", $facref, $socname, $amount, $userinfo);
- $mailfile = new CMailFile($subject, $sendto, $from, $message, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $this->user->email);
+ $mailfile = new CMailFile($subject, $sendto, $from, $message, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $this->user->email, '', $trackid);
$result = $mailfile->sendfile();
if ($result)
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index ec004717946..fb0a5548426 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -53,7 +53,7 @@ $pagenext = $page + 1;
if (!$sortfield) $sortfield = 'p.ref';
if (!$sortorder) $sortorder = 'DESC';
-$object = new BonPrelevement($db, "");
+$object = new BonPrelevement($db);
diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php
index 44be3d1cd01..1cc454a3d4d 100644
--- a/htdocs/compta/prelevement/fiche-rejet.php
+++ b/htdocs/compta/prelevement/fiche-rejet.php
@@ -51,7 +51,7 @@ $offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
-$object = new BonPrelevement($db, "");
+$object = new BonPrelevement($db);
diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php
index 6e8e8390ae8..18028e2059a 100644
--- a/htdocs/compta/prelevement/fiche-stat.php
+++ b/htdocs/compta/prelevement/fiche-stat.php
@@ -50,7 +50,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
-$object = new BonPrelevement($db, "");
+$object = new BonPrelevement($db);
/*
@@ -142,7 +142,7 @@ if ($prev_id > 0 || $ref)
/*
* Stats
*/
- $ligne = new LignePrelevement($db, $user);
+ $ligne = new LignePrelevement($db);
$sql = "SELECT sum(pl.amount), pl.statut";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php
index 6eef29d1e3e..29bb5c435e3 100644
--- a/htdocs/compta/prelevement/line.php
+++ b/htdocs/compta/prelevement/line.php
@@ -90,7 +90,7 @@ if ($action == 'confirm_rejet')
if (!$error)
{
- $lipre = new LignePrelevement($db, $user);
+ $lipre = new LignePrelevement($db);
if ($lipre->fetch($id) == 0)
@@ -132,7 +132,7 @@ $h++;
if ($id)
{
- $lipre = new LignePrelevement($db, $user);
+ $lipre = new LignePrelevement($db);
if ($lipre->fetch($id) == 0)
{
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index 5598168a436..48f9bcc7c54 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -64,10 +64,13 @@ $search_code = GETPOST('search_code', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$statut = GETPOST('statut', 'int');
-$bon = new BonPrelevement($db, "");
-$ligne = new LignePrelevement($db, $user);
+$bon = new BonPrelevement($db);
+$line = new LignePrelevement($db);
$company = new Societe($db);
+$hookmanager->initHooks(array('withdrawalsreceiptslineslist'));
+
+
/*
* Actions
*/
@@ -194,7 +197,7 @@ if ($result)
print '
';
print '';
- print $ligne->LibStatut($obj->statut_ligne, 2);
+ print $line->LibStatut($obj->statut_ligne, 2);
print " ";
print '';
print substr('000000'.$obj->rowid_ligne, -6);
diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php
index 602c57b5ad4..6d1994b7a4b 100644
--- a/htdocs/compta/prelevement/rejets.php
+++ b/htdocs/compta/prelevement/rejets.php
@@ -43,6 +43,7 @@ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortorder = GETPOST('sortorder', 'alpha');
$sortfield = GETPOST('sortfield', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -56,7 +57,10 @@ if ($sortorder == "") $sortorder = "DESC";
if ($sortfield == "") $sortfield = "p.datec";
$rej = new RejetPrelevement($db, $user);
-$ligne = new LignePrelevement($db, $user);
+$line = new LignePrelevement($db);
+
+$hookmanager->initHooks(array('withdrawalsreceiptsrejectedlist'));
+
/*
* Liste des factures
@@ -84,7 +88,7 @@ if ($result)
print_barre_liste($langs->trans("WithdrawsRefused"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num);
print"\n\n";
- print '';
+ print '';
print '';
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], "p.ref", '', $urladd);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd);
@@ -98,7 +102,7 @@ if ($result)
$obj = $db->fetch_object($result);
print ' | ';
- print $ligne->LibStatut($obj->statut, 2).' ';
+ print $line->LibStatut($obj->statut, 2).' ';
print '';
print substr('000000'.$obj->rowid, -6)." | ";
diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php
index c19603df967..c6d1962ff46 100644
--- a/htdocs/compta/prelevement/stats.php
+++ b/htdocs/compta/prelevement/stats.php
@@ -73,7 +73,7 @@ if ($resql)
print ' ';
print load_fiche_titre($langs->trans("WithdrawStatistics"), '', '');
-$ligne = new LignePrelevement($db, $user);
+$ligne = new LignePrelevement($db);
$sql = "SELECT sum(pl.amount), count(pl.amount), pl.statut";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 11e8d1369c4..29b136b89e7 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1645,16 +1645,16 @@ class Form
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Return select list of users
+ * Return the HTML select list of users
*
- * @param string $selected Id user preselected
- * @param string $htmlname Field name in form
- * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
- * @param array $exclude Array list of users id to exclude
- * @param int $disabled If select list must be disabled
- * @param array $include Array list of users id to include
- * @param int $enableonly Array list of users id to be enabled. All other must be disabled
- * @param string $force_entity '0' or Ids of environment to force
+ * @param string $selected Id user preselected
+ * @param string $htmlname Field name in form
+ * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
+ * @param array $exclude Array list of users id to exclude
+ * @param int $disabled If select list must be disabled
+ * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
+ * @param int $enableonly Array list of users id to be enabled. All other must be disabled
+ * @param string $force_entity '0' or Ids of environment to force
* @return void
* @deprecated Use select_dolusers instead
* @see select_dolusers()
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 6a7fac8044f..a930cc97d2d 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -401,6 +401,9 @@ class Notify
$sendto = dolGetFirstLastname($obj->firstname, $obj->lastname)." <".$obj->email.">";
$notifcodedefid = $obj->adid;
+ $trackid = '';
+ if ($obj->type_target == 'tocontactid') $trackid = 'con'.$obj->id;
+ if ($obj->type_target == 'touserid') $trackid = 'use'.$obj->id;
if (dol_strlen($obj->email))
{
@@ -417,100 +420,100 @@ class Notify
switch ($notifcode) {
case 'BILL_VALIDATE':
- $link = '/compta/facture/card.php?facid='.$object->id;
+ $link = '' . $newref . '';
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoiceValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoiceValidated", $link);
break;
case 'BILL_PAYED':
- $link = '/compta/facture/card.php?facid='.$object->id;
+ $link ='' . $newref . '';
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoicePayed", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoicePayed", $link);
break;
case 'ORDER_VALIDATE':
- $link = '/commande/card.php?id='.$object->id;
+ $link = '' . $newref . '';
$dir_output = $conf->commande->dir_output;
$object_type = 'order';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $link);
break;
case 'PROPAL_VALIDATE':
- $link = '/comm/propal/card.php?id='.$object->id;
+ $link = '' . $newref . '';
$dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalValidated", $link);
break;
case 'PROPAL_CLOSE_SIGNED':
- $link = '/comm/propal/card.php?id='.$object->id;
+ $link = '' . $newref . '';
$dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedSigned", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedSigned", $link);
break;
case 'FICHINTER_ADD_CONTACT':
- $link = '/fichinter/card.php?id='.$object->id;
+ $link = ''.$newref.'';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $link);
break;
case 'FICHINTER_VALIDATE':
- $link = '/fichinter/card.php?id='.$object->id;
+ $link = ''.$newref.'';
$dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionValidated", $link);
break;
case 'ORDER_SUPPLIER_VALIDATE':
- $link = '/fourn/commande/card.php?id='.$object->id;
+ $link = ''.$newref.'';
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $newref, $user->getFullName($outputlangs));
+ $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $link, $user->getFullName($outputlangs));
$mesg .= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'ORDER_SUPPLIER_APPROVE':
- $link = '/fourn/commande/card.php?id='.$object->id;
+ $link = ''.$newref.'';
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $newref, $user->getFullName($outputlangs));
+ $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($outputlangs));
$mesg .= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'ORDER_SUPPLIER_REFUSE':
- $link = '/fourn/commande/card.php?id='.$object->id;
+ $link = '' . $newref . '';
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $newref, $user->getFullName($outputlangs));
+ $mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $link, $user->getFullName($outputlangs));
$mesg .= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'SHIPPING_VALIDATE':
$link = ''.$newref.'';
$dir_output = $conf->expedition->dir_output.'/sending/';
$object_type = 'expedition';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpeditionValidated", $link);
break;
case 'EXPENSE_REPORT_VALIDATE':
$link = ''.$newref.'';
$dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $link);
break;
case 'EXPENSE_REPORT_APPROVE':
$link = ''.$newref.'';
$dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $link);
break;
case 'HOLIDAY_VALIDATE':
$link = ''.$newref.'';
$dir_output = $conf->holiday->dir_output;
$object_type = 'holiday';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $link);
break;
case 'HOLIDAY_APPROVE':
$link = ''.$newref.'';
$dir_output = $conf->holiday->dir_output;
$object_type = 'holiday';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref);
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $link);
break;
}
$ref = dol_sanitizeFileName($newref);
@@ -529,7 +532,6 @@ class Notify
$message .= $outputlangs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n";
$message .= "\n";
$message .= $mesg;
- if ($link) $message .= "\n".$urlwithroot.$link;
$parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list);
if (!isset($action)) $action = '';
@@ -555,7 +557,7 @@ class Notify
-1,
'',
'',
- '',
+ $trackid,
'',
'notification'
);
@@ -606,6 +608,7 @@ class Notify
{
foreach ($conf->global as $key => $val)
{
+ $reg = array();
if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue;
$threshold = (float) $reg[1];
@@ -620,6 +623,7 @@ class Notify
$sendto = $conf->global->$param;
$notifcodedefid = dol_getIdFromCode($this->db, $notifcode, 'c_action_trigger', 'code', 'rowid');
if ($notifcodedefid <= 0) dol_print_error($this->db, 'Failed to get id from code');
+ $trackid = '';
$object_type = '';
$link = '';
@@ -660,7 +664,7 @@ class Notify
break;
case 'FICHINTER_ADD_CONTACT':
$link = ''.$newref.'';
- $dir_output = $conf->facture->dir_output;
+ $dir_output = $conf->ficheinter->dir_output;
$object_type = 'ficheinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $link);
break;
@@ -706,31 +710,31 @@ class Notify
$link = ''.$newref.'';
$dir_output = $conf->expedition->dir_output.'/sending/';
$object_type = 'order_supplier';
- $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref);
+ $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $link);
break;
case 'EXPENSE_REPORT_VALIDATE':
$link = ''.$newref.'';
$dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport';
- $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref);
+ $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $link);
break;
case 'EXPENSE_REPORT_APPROVE':
$link = ''.$newref.'';
$dir_output = $conf->expensereport->dir_output;
$object_type = 'expensereport';
- $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref);
+ $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $link);
break;
case 'HOLIDAY_VALIDATE':
$link = ''.$newref.'';
$dir_output = $conf->holiday->dir_output;
$object_type = 'holiday';
- $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref);
+ $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $link);
break;
case 'HOLIDAY_APPROVE':
$link = ''.$newref.'';
$dir_output = $conf->holiday->dir_output;
$object_type = 'holiday';
- $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref);
+ $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $link);
break;
}
$ref = dol_sanitizeFileName($newref);
@@ -745,11 +749,9 @@ class Notify
$filepdf = $pdf_path;
}
- $message = $langs->transnoentities("YouReceiveMailBecauseOfNotification", $application, $mysoc->name)."\n";
$message .= $langs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n";
$message .= "\n";
$message .= $mesg;
- //if ($link) $message.= "\n" . $urlwithroot . $link; // link already added around the ref into the text
$message = nl2br($message);
@@ -792,7 +794,7 @@ class Notify
0,
1,
'',
- '',
+ $trackid,
'',
'',
'notification'
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 8566575e5ca..cc27a4ae825 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -227,19 +227,21 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
$tmpentry = array(
'enabled'=>(!empty($conf->propal->enabled) ||
!empty($conf->commande->enabled) ||
- !empty($conf->supplier_order->enabled) ||
- !empty($conf->supplier_proposal->enabled) ||
- !empty($conf->contrat->enabled) ||
+ !empty($conf->fournisseur->enabled) ||
+ !empty($conf->supplier_proposal->enabled) ||
+ !empty($conf->supplier_order->enabled) ||
+ !empty($conf->contrat->enabled) ||
!empty($conf->ficheinter->enabled)
) ? 1 : 0,
'perms'=>(!empty($user->rights->propal->lire) ||
!empty($user->rights->commande->lire) ||
- !empty($user->rights->supplier_order->lire) ||
+ !empty($user->rights->fournisseur->lire) ||
!empty($user->rights->supplier_proposal->lire) ||
+ !empty($user->rights->supplier_order->lire) ||
!empty($user->rights->contrat->lire) ||
!empty($user->rights->ficheinter->lire)
),
- 'module'=>'propal|commande|supplier_order|supplier_proposal|contrat|ficheinter'
+ 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter'
);
$onlysupplierorder = !empty($user->rights->fournisseur->commande->lire) &&
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index 5fc268013c6..0fb1aff011d 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -813,7 +813,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
jQuery("#prod_entry_mode_free").prop('checked',true).change();
jQuery("#prod_entry_mode_predef").prop('checked',false).change();
jQuery("#search_idprod, #idprod, #search_idprodfournprice, #buying_price").val('');
- jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #price_ttc, #fourn_ref, #tva_tx, #buying_price, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").show();
+ jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #price_ttc, #fourn_ref, #tva_tx, #buying_price, #title_fourn_ref, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").show();
jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").show();
jQuery("#fournprice_predef").hide();
}
@@ -825,11 +825,13 @@ if (!empty($usemargins) && $user->rights->margins->creer)
global->MAIN_DISABLE_EDIT_PREDEF_PRICEHT)) { ?>
jQuery("#price_ht").val('').show();
jQuery("#multicurrency_price_ht").val('').show();
+ jQuery("#title_up_ht, #title_up_ht_currency").show();
jQuery("#price_ht").val('').hide();
jQuery("#multicurrency_price_ht").val('').hide();
+ jQuery("#title_up_ht, #title_up_ht_currency").hide();
- jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide();
+ jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_fourn_ref, #title_vat, #title_up_ttc, #title_up_ttc_currency").hide();
jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").hide();
jQuery("#buying_price").show();
jQuery('#trlinefordates, .divlinefordates').show();
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index daa5a37b51b..549267fca3b 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -1,9 +1,9 @@
- * Copyright (C) 2013-2018 Laurent Destailleur
+ * Copyright (C) 2013-2020 Laurent Destailleur
* Copyright (C) 2012-2016 Regis Houssin
* Copyright (C) 2018 Charlene Benke
- * Copyright (C) 2019 Frédéric France
+ * Copyright (C) 2019 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -475,7 +475,7 @@ if ($resql)
$include = '';
- if (!empty($user->rights->holiday->read_all)) $include = 'hierarchyme'; // Can see all
+ if (empty($user->rights->holiday->read_all)) $include = 'hierarchyme'; // Can see only its hierarchyl
print ' |