The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Active user
Rating: 4
Joined: Jan 11, 2013
Company: Brighteye AB

Hi, anyone that can help?
Have a conversion from HTML to text as:

Code
    HTMLReader = New HTMLReader;
    HTMLReader.SetString(FileObject,"UTF8");
   
    DOMBuilder =  New DOMBuilder;
    HTMLDocument = DOMBuilder.Read(HTMLReader);
   textDoc.Clear();
   textDoc.InsertLine(itemlines,title);
   itemlines = itemlines + 1;
   inContent = HTMLDocument.GetElementById("body_content_inner");
   txtInner = inContent.TextContent;

When looping through the lines and get number with decimals the amount increases 100 times, e.g. decimal at wrong place?

Uses following for extracting the number:
Code
 lVAT =Number(TrimAll(getString(includeLine,"inkluderar","kr")));
            lVAT = Format(lVAT,"L=sv_SE; ND=10; NFD=2; NDS=,");


Works OK in Client/Server but not in WebClient
Regards
Keijo

 
#2
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Keijo!

Maybe the problem is in language that your web client uses. Does it match thin client?
Can you provide includeLine value and lVAT that you receive in both cases?
This is the line where you experience the problem, right?

Code
lVAT =Number(TrimAll(getString(includeLine,"inkluderar","kr")));

 
#3
People who like this: 0 Yes / 0 No
Active user
Rating: 4
Joined: Jan 11, 2013
Company: Brighteye AB

Hi,
sorry - my error!
Had  set the parameters, decimal separator, etc but did not unmark "Use regional settings from current session'.
When unmarked, web client works fine and correct with the numbers.
The script 'lVAT =Number(TrimAll(getString(includeLine,"inkluderar","kr")));' returned the decimal separator at the wrong place, e.g. 100 times bigger before.
Thanks for your reply, got the hint wh ere to look from you
Regards
Keijo

 
#4
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

I ran the same problem before. Where is the mark "Use regional settings from current session"?

 
#5
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Alexey, in Designer mode select Administration menu and then click Regional infobase settings...

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)