Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/lib/website.lib.php
This commit is contained in:
commit
90b5ed9908
@ -440,7 +440,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
||||
$s .= '</script>'."\n";
|
||||
|
||||
// Local calendar
|
||||
$s .= '<div class="nowrap clear inline-block minheight20"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
$s .= '<div class="nowrap inline-block minheight20"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
|
||||
// External calendars
|
||||
if (is_array($showextcals) && count($showextcals) > 0)
|
||||
|
||||
@ -987,12 +987,12 @@ class FormTicket
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// 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__'])) {
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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".'</script>'."\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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
|
||||
print "
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag)."\"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '".trim($tmptag)."');
|
||||
</script>";
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add Xdebug coverage of code
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -763,7 +763,8 @@ function getSocialNetworkSharingLinks()
|
||||
// Reddit
|
||||
$out .= '<div class="dol-social-share-reddit">'."\n";
|
||||
$out .= '<a href="https://www.reddit.com/submit" target="_blank" onclick="window.location = \'https://www.reddit.com/submit?url='.$fullurl.'\'; return false">';
|
||||
$out .= '<span class="dol-social-share-reddit-span">Reddit</a>';
|
||||
$out .= '<span class="dol-social-share-reddit-span">Reddit</span>';
|
||||
$out .= '</a>';
|
||||
$out .= '</div>'."\n";
|
||||
|
||||
// Facebook
|
||||
|
||||
@ -220,7 +220,7 @@ class modContrat extends DolibarrModules
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $langs;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$this->remove($options);
|
||||
|
||||
@ -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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
|
||||
print "
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag)."\"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '".trim($tmptag)."');
|
||||
</script>";
|
||||
print "\n";
|
||||
print '<script type="text/javascript">'."\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";
|
||||
print '</script>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -272,13 +272,19 @@ if ($line->special_code == 3) { ?>
|
||||
$tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht);
|
||||
$tooltiponprice .= '<br>'.$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 .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
|
||||
else $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||
if ($mysoc->useLocalTax(1)) {
|
||||
if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(1)) {
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1);
|
||||
} else {
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||
}
|
||||
}
|
||||
if ($object->thirdparty->useLocalTax(1)) {
|
||||
if (price2num($line->total_localtax2)) $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
|
||||
else $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||
if ($mysoc->useLocalTax(2)) {
|
||||
if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(2)) {
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2);
|
||||
} else {
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc);
|
||||
|
||||
@ -205,7 +205,13 @@ if (!empty($morelogincontent)) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
|
||||
<!-- Common footer is not used for passwordforgotten page, this is same than footer but inside passwordforgotten tpl -->
|
||||
|
||||
<?php
|
||||
if (!empty($conf->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 '<!-- Javascript by hook -->';
|
||||
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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
|
||||
print "
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".trim($tmptag)."\"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '".trim($tmptag)."');
|
||||
</script>";
|
||||
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))
|
||||
{
|
||||
?>
|
||||
<div class="center"><br>
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
|
||||
google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
|
||||
google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
|
||||
google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div> <!-- end of center -->
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ div.mainmenu.tools::before {
|
||||
}
|
||||
|
||||
div.mainmenu.website::before {
|
||||
content: "\f542";
|
||||
content: "\f57d";
|
||||
}
|
||||
|
||||
div.mainmenu.generic1::before {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user