Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
browse_total_rows
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
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.
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: browse_total_rows
All the same, the original script rounds off incorrectly. And sometimes it works correctly, but today I again saw such a picture.kev1n wrote:What do you mean, it didn't work? It works for me just fine. After the change you have to log in again.kknm wrote:I tried this with the original browse_total_rows, but that didn't work.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
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.
When using toFixed(1), no more than 1 decimal number should be shown.
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: browse_total_rows
In nuformclass.js write: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.
var s = Number('0.'+ d).toFixed(F.places).slice(2);
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
Can you give me the three numbers (33.30, 368.40, 369.40) with all decimal places that sum up to 772.09999999 ?
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: browse_total_rows
The amount is collected only from those numbers in the table.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 ?
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
Are these numbers rounded up or do they have a higher precision in the db?
33.30...?
368.40...?
369.40...?
33.30...?
368.40...?
369.40...?
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: browse_total_rows
kev1n wrote:Are these numbers rounded up or do they have a higher precision in the db?
33.30...?
368.40...?
369.40...?
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
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.
I'll try to reproduce the behavior here.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: browse_total_rows
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.
If the format is blank, I get the same output. If I set 1000.00, the correct sum is displayed.
You do not have the required permissions to view the files attached to this post.