Page 3 of 4

Re: browse_total_rows

Posted: Thu May 07, 2020 4:59 pm
by kev1n
This is probably due to the browser cache. In particular, if the JavaScript function is located in a linked file, the updated file is not loaded, but the one in the cache.

Re: browse_total_rows

Posted: Sun May 10, 2020 1:05 pm
by kknm
kev1n wrote:
kknm wrote:I tried this with the original browse_total_rows, but that didn't work.
What do you mean, it didn't work? It works for me just fine. After the change you have to log in again.
All the same, the original script rounds off incorrectly. And sometimes it works correctly, but today I again saw such a picture.
total.PNG

Re: browse_total_rows

Posted: Sun May 10, 2020 2:17 pm
by kev1n
When you refresh the form, are the total figures still shown like that?
When using toFixed(1), no more than 1 decimal number should be shown.

Re: browse_total_rows

Posted: Sun May 10, 2020 4:13 pm
by kknm
kev1n wrote:When you refresh the form, are the total figures still shown like that?
When using toFixed(1), no more than 1 decimal number should be shown.
In nuformclass.js write:
var s = Number('0.'+ d).toFixed(F.places).slice(2);

Re: browse_total_rows

Posted: Sun May 10, 2020 4:28 pm
by kev1n
Can you give me the three numbers (33.30, 368.40, 369.40) with all decimal places that sum up to 772.09999999 ?

Re: browse_total_rows

Posted: Sun May 10, 2020 9:13 pm
by kknm
kev1n wrote:Can you give me the three numbers (33.30, 368.40, 369.40) with all decimal places that sum up to 772.09999999 ?
The amount is collected only from those numbers in the table.
err.PNG

Re: browse_total_rows

Posted: Mon May 11, 2020 4:50 am
by kev1n
Are these numbers rounded up or do they have a higher precision in the db?
33.30...?
368.40...?
369.40...?

Re: browse_total_rows

Posted: Mon May 11, 2020 6:34 am
by kknm
kev1n wrote:Are these numbers rounded up or do they have a higher precision in the db?
33.30...?
368.40...?
369.40...?
baza.PNG

Re: browse_total_rows

Posted: Mon May 11, 2020 6:56 am
by kev1n
Ok thanks, so there are also just two decimals in the database and the numbers must be stored as 33.30, 368.40, 369.40 in the table. Right?
I'll try to reproduce the behavior here.

Re: browse_total_rows

Posted: Mon May 11, 2020 7:58 am
by kev1n
Are you sure that there's a format set for the column that shows the total as 772.099999999?

If the format is blank, I get the same output. If I set 1000.00, the correct sum is displayed.
format.png