From: Vincent Vanwaelscappel Date: Mon, 31 May 2021 15:52:18 +0000 (+0200) Subject: wait #4497 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6946ee4f9cfec563b4ee5eb6aec1adda2d2f1a3c;p=fluidbook-html5.git wait #4497 @1 --- diff --git a/js/libs/fluidbook/fluidbook.stats.js b/js/libs/fluidbook/fluidbook.stats.js index 52fba07d..d5f6c623 100644 --- a/js/libs/fluidbook/fluidbook.stats.js +++ b/js/libs/fluidbook/fluidbook.stats.js @@ -186,7 +186,6 @@ FluidbookStats.prototype = { dl.eventLabel = a3; dl.eventAction = a2; } - console.log('datalayer', dl); dataLayer.push(dl); } else if (this.ga === 'gtag') { var f, o, c, a; diff --git a/js/libs/fluidbook/special/wescosales.js b/js/libs/fluidbook/special/wescosales.js index bbf8193e..cf7ac6d7 100644 --- a/js/libs/fluidbook/special/wescosales.js +++ b/js/libs/fluidbook/special/wescosales.js @@ -118,8 +118,8 @@ function setWescoSalesPanel(ref, e, updateOnly) { if (wlines[d[0]] == null || wlines[d[0]] == undefined) { wlines[d[0]] = {ca: 0, qte: 0}; } - wlines[d[0]].ca += parseInt(d[1].toString().replace(/,/g, '')); - wlines[d[0]].qte += parseInt(d[2].toString().replace(/,/g, '')); + wlines[d[0]].ca += wescoParseNumber(d[1]); + wlines[d[0]].qte += wescoParseNumber(d[2]); } } }); @@ -137,11 +137,11 @@ function setWescoSalesPanel(ref, e, updateOnly) { w += ''; w += ''; - var format = new Intl.NumberFormat('en-US'); + var format = new Intl.NumberFormat('fr-FR'); $.each(wlines, function (date, line) { - var ca = unique ? line.ca : format.format(line.ca); - var qte = unique ? line.qte : format.format(line.qte); + var ca = unique && line.ca.match(/[^0-9, .]/) ? line.ca : format.format(wescoParseNumber(line.ca)); + var qte = unique && line.qte.match(/[^0-9, .]/) ? line.qte : format.format(wescoParseNumber(line.qte)); w += ''; w += ''; w += ''; @@ -168,6 +168,10 @@ function setWescoSalesPanel(ref, e, updateOnly) { setInteractPanel(id, updateOnly); } +function wescoParseNumber(n){ + return parseInt(n.toString().replace(/,/g, '')); +} + function getAllRefs() { if (allrefs === null) { var res = [];
QtéCA
' + date + '' + ca + '