diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 56d77aa22c9..17b1307fb89 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -440,7 +440,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
$s .= ''."\n";
// Local calendar
- $s .= '
'.$langs->trans("LocalAgenda").'
';
+ $s .= ' '.$langs->trans("LocalAgenda").'
';
// External calendars
if (is_array($showextcals) && count($showextcals) > 0)
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index a8654f6bfc5..8dcd4965c65 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -987,12 +987,12 @@ class FormTicket
print '';
}
- // MESSAGE
- $defaultmessage = "";
- if (is_array($arraydefaultmessage) && count($arraydefaultmessage) > 0 && $arraydefaultmessage->content) {
+ // MESSAGE
+ $defaultmessage="";
+ if (is_object($arraydefaultmessage) && $arraydefaultmessage->content) {
$defaultmessage = $arraydefaultmessage->content;
}
- $defaultmessage = str_replace('\n', "\n", $defaultmessage);
+ $defaultmessage = str_replace('\n', "\n", $defaultmessage);
// Deal with format differences between message and signature (text / HTML)
if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 3f6e8563a50..f9849cded57 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -1408,7 +1408,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$langs->load("mails");
$sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type";
- $sql2 .= ", '' as fk_element, '' as elementtype, '' as contact_id";
+ $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id";
$sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto";
$sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname";
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8f1f54edaa1..119a981891c 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7474,23 +7474,6 @@ function printCommonFooter($zone = 'private')
print '});'."\n";
- // Google Analytics
- // TODO Add a hook here
- if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
- {
- print "\n";
- print "/* JS CODE TO ENABLE for google analtics tag */\n";
- print ' var _gaq = _gaq || [];'."\n";
- print ' _gaq.push([\'_setAccount\', \''.$conf->global->MAIN_GOOGLE_AN_ID.'\']);'."\n";
- print ' _gaq.push([\'_trackPageview\']);'."\n";
- print ''."\n";
- print ' (function() {'."\n";
- print ' var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;'."\n";
- print ' ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';'."\n";
- print ' var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);'."\n";
- print ' })();'."\n";
- }
-
// End of tuning
if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO']) || !empty($conf->global->MAIN_SHOW_TUNING_INFO))
{
@@ -7519,6 +7502,28 @@ function printCommonFooter($zone = 'private')
}
print "\n".''."\n";
+
+ // Google Analytics
+ // TODO Add a hook here
+ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
+ {
+ $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ foreach($tmptagarray as $tmptag) {
+ print "\n";
+ print "\n";
+ print "
+
+
+ ";
+ print "\n";
+ }
+ }
}
// Add Xdebug coverage of code
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index dbd26cc1f75..df2b1a086c8 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -410,7 +410,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$langs->load("mails");
$sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type";
- $sql2 .= ", '' as fk_element, '' as elementtype, '' as contact_id";
+ $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id";
$sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto";
$sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname";
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index b3fa0dfb023..f0d380c58b7 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -763,7 +763,8 @@ function getSocialNetworkSharingLinks()
// Reddit
$out .= ''."\n";
// Facebook
diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php
index d3b1c56b054..31c7a136aac 100644
--- a/htdocs/core/modules/modContrat.class.php
+++ b/htdocs/core/modules/modContrat.class.php
@@ -220,7 +220,7 @@ class modContrat extends DolibarrModules
*/
public function init($options = '')
{
- global $conf;
+ global $conf, $langs;
// Nettoyage avant activation
$this->remove($options);
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 5d2374a9f60..6f2ca762a7c 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -334,23 +334,25 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
echo $moreloginextracontent;
}
-// Google Analytics (need Google module)
+// Google Analytics
+// TODO Add a hook here
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
{
- if (empty($conf->dol_use_jmobile))
- {
+ $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ foreach($tmptagarray as $tmptag) {
+ print "\n";
+ print "\n";
+ print "
+
+
+ ";
print "\n";
- print ''."\n";
}
}
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index 1e90b04fba7..742a7862100 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -272,13 +272,19 @@ if ($line->special_code == 3) { ?>
$tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht);
$tooltiponprice .= '
'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva);
if (!$senderissupplier && is_object($object->thirdparty)) {
- if ($object->thirdparty->useLocalTax(1)) {
- if (price2num($line->total_localtax1)) $tooltiponprice .= '
'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
- else $tooltiponprice .= '
'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").'';
+ if ($mysoc->useLocalTax(1)) {
+ if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(1)) {
+ $tooltiponprice .= '
'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
+ } else {
+ $tooltiponprice .= '
'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").'';
+ }
}
- if ($object->thirdparty->useLocalTax(1)) {
- if (price2num($line->total_localtax2)) $tooltiponprice .= '
'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
- else $tooltiponprice .= '
'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").'';
+ if ($mysoc->useLocalTax(2)) {
+ if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(2)) {
+ $tooltiponprice .= '
'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
+ } else {
+ $tooltiponprice .= '
'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").'';
+ }
}
}
$tooltiponprice .= '
'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc);
diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php
index ad62ad43686..4a37ea8ab3e 100644
--- a/htdocs/core/tpl/passwordforgotten.tpl.php
+++ b/htdocs/core/tpl/passwordforgotten.tpl.php
@@ -205,7 +205,13 @@ if (!empty($morelogincontent)) {
-
+
+global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER;
+
+if (!empty($morelogincontent) && is_array($morelogincontent)) {
foreach ($morelogincontent as $format => $option)
{
if ($format == 'js') {
@@ -217,8 +223,53 @@ if (!empty($morelogincontent)) {
echo '';
echo $moreloginextracontent;
}
+
+// Google Analytics
+// TODO Add a hook here
+if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
+{
+ $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ foreach($tmptagarray as $tmptag) {
+ print "\n";
+ print "\n";
+ print "
+
+
+ ";
+ print "\n";
+ }
+}
+
+// Google Adsense
+if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT))
+{
+ if (empty($conf->dol_use_jmobile))
+ {
+ ?>
+
+
+
+
+
+
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 1e0e64fb695..3e5f0ddb8af 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
if (!empty($conf->product->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
}
if (!empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang
index 010a7521846..760ff884fa0 100644
--- a/htdocs/langs/en_US/receptions.lang
+++ b/htdocs/langs/en_US/receptions.lang
@@ -43,3 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Product quantity from open supplie
ValidateOrderFirstBeforeReception=You must first validate the order before being able to make receptions.
ReceptionsNumberingModules=Numbering module for receptions
ReceptionsReceiptModel=Document templates for receptions
+NoMorePredefinedProductToDispatch=No more predefined products to dispatch
+
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 3a7f94f4f84..c6f1e44f113 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -3766,7 +3766,6 @@ class Societe extends CommonObject
elseif ($localTaxNum == 1) $sql .= " AND t.localtax1_type <> '0'";
elseif ($localTaxNum == 2) $sql .= " AND t.localtax2_type <> '0'";
- dol_syslog("useLocalTax", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 28ed396bac3..df3ed9987d8 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -155,6 +155,9 @@ input[name=duration_value]
input[type=submit], input[type=submit]:hover {
margin-left: 5px;
}
+input[type=checkbox], input[type=radio] {
+ margin: 0 3px 0 3px;
+}
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
border: none;
}
diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php
index b77dc86765c..2286f19e355 100644
--- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php
+++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php
@@ -124,7 +124,7 @@ div.mainmenu.tools::before {
}
div.mainmenu.website::before {
- content: "\f542";
+ content: "\f57d";
}
div.mainmenu.generic1::before {
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index e2607ef1d09..4555884c536 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -2364,8 +2364,9 @@ class Ticket extends CommonObject
// If destination file already exists, we add a suffix to avoid to overwrite
if (is_file($destfile))
{
+ $pathinfo = pathinfo($filename[$i]);
$now = dol_now();
- $destfile .= '.'.dol_print_date($now, 'dayhourlog');
+ $destfile = $destdir.'/'.$pathinfo['filename'].' - '.dol_print_date($now, 'dayhourlog').'.'.$pathinfo['extension'];
}
$res = dol_move($filepath[$i], $destfile, 0, 1);