DecimalSeparator returns empty value in web function
Aldevinas Katkus
2-24-23
Operating system: Windows
I am importing invoices and could not figure out why 200.10 becomes 210.00.
DecimalSeparator returns empty value.
Everything is OK if importing is done with periodic task which loads csv file.

Maybe someone has an idea why DecimalSeparator() returns empty value even though the decimal separator is set in the "Company date and numeric format"?
Aldevinas Katkus
2-27-23
What is more interesting, that output to the log file knows about decimal separator and it is a different separator (dot), than that set in the "Company date and numeric format" (comma). for example:


2023-02-27 08:52:04 AD WARNING: DecimalSeparator returns blank, failing over to company decimal separator ,
2023-02-27 08:52:04 AD LineNr 2 tstr=110.25 SubTotal=110.25 VAT=756.36 Total=866.61
Carolina Valentino
3-2-23
hello, i will ask a programmer, but i hear about that issue from an argentinean partner
Carolina Valentino
3-6-23
Hi

the programmers said that It sounds like a bug and you should report it and create backup so that we can repeat

please detail every step. are you doing any company switching in import routine is also question. Probably not but this seems like it fails to load numeric format from the company it is importing in


please tell me if you report it thanks
Aldevinas Katkus
3-8-23
Unfortunately, I could not replicate it with test procedures, but it has something to do with qupdating calls. If I make web procedure updating and all calls are non qupdating, then DecimalSepator is nonblank.
If nonupdating WebStoreTabInvoice() calls qupdating.ImportSalesInvoicesFromArea(), then ImportSalesInvoicesFromArea does not know about the decimal separator:

2023-03-08 11:59:19 AD executing WebStoreTabInvoice CurrentCompany=1 DecimalSeparator=,
2023-03-08 11:59:19 AD ImportSalesInvoicesFromArea DecimalSeparator=
5-1-23
Hi. Try to use SetCompany(x, false); where x is the target company number, even if there is only one company on the server, before you call DecimalSepator().
Aldevinas Katkus
5-3-23
Created by10:14 1 May 2023
Hi. Try to use SetCompany(x, false); where x is the target company number, even if there is only one company on the server, before you call DecimalSepator().
I am using SetCompany(x, false)
David Delač
5-10-23
Are you calling it inside ImportSalesInvoicesFromArea or before that qupdating function is called?
Yavuz Yigiterhan
6-26-23
Hello Aldevinas,

Thank you for below discussion. We will consider it is closed , unless there is an update from yourside to above.
Aldevinas Katkus
7-4-23
Created byDavid Delač16:29 10 May 2023
Are you calling it inside ImportSalesInvoicesFromArea or before that qupdating function is called?
It is like this. Just checked again. As you can see ImportSalesInvoicesFromArea() forgets DecimalSeparator.

2023-07-04 17:15:48 AD executing WebStoreTabInvoice CurrentCompany=1 DecimalSeparator=,
2023-07-04 17:15:48 AD ImportSalesInvoicesFromArea DecimalSeparator=

global
updating procedure ImportSalesInvoicesFromArea(...)
begin
Logtext(0,"ImportSalesInvoicesFromArea DecimalSeparator=" & DecimalSeparator);
...
end;

global
procedure WebStoreTabInvoice()
begin
LogText(0,"executing WebStoreTabInvoice CurrentCompany=" & CurrentCompany & " DecimalSeparator=" & DecimalSeparator);
qupdating.ImportSalesInvoicesFromArea(..) //removing qupdating helps to remember DecimalSeparator
queued.StoreResultsEMail(Mailr);
end;

global
procedure WebExtraAPI()
begin

...
oldcomp = CurrentCompany;
//if (newcomp!=oldcomp) then begin <- commenting this out didn't help
if (SetCompany(newcomp,false)) then begin
WebStoreTabInvoice();

end;
end;
Aldevinas Katkus
7-7-23
We can put this on hold, because there is a workaround.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024