AppGini 5.81 number format
AppGini 5.81 number format
Hello
I am looking for help to get number format like this " 5 000" instead of this "5000"
How to custom these code
Code 1
SELECT `caisse`.`recettes` - `caisse`.`depenses`
FROM `caisse`
WHERE `caisse`.`idcaisse`='%ID%'
Code 2
SELECT
SUM(montant) depenses
FROM
depenses;
Thank you
I am looking for help to get number format like this " 5 000" instead of this "5000"
How to custom these code
Code 1
SELECT `caisse`.`recettes` - `caisse`.`depenses`
FROM `caisse`
WHERE `caisse`.`idcaisse`='%ID%'
Code 2
SELECT
SUM(montant) depenses
FROM
depenses;
Thank you
Re: AppGini 5.81 number format
Hi,
you can use
replace(format( VALUE ,0),',',' ')
like
SELECT replace(format(`caisse`.`recettes` - `caisse`.`depenses`,0),',',' ') FROM `caisse`
WHERE `caisse`.`idcaisse`='%ID%'
you can use
replace(format( VALUE ,0),',',' ')
like
SELECT replace(format(`caisse`.`recettes` - `caisse`.`depenses`,0),',',' ') FROM `caisse`
WHERE `caisse`.`idcaisse`='%ID%'
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
You can try to use MySql number format function with your locale as 3rd parameter:
http://www.mysqltutorial.org/mysql-format-function/
Available locales:
https://dev.mysql.com/doc/refman/5.7/en ... pport.html
http://www.mysqltutorial.org/mysql-format-function/
Available locales:
https://dev.mysql.com/doc/refman/5.7/en ... pport.html
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: AppGini 5.81 number format
Hello
Thank you for your help
Regards
Thank you for your help
Regards
Re: AppGini 5.81 number format
Hello
I have try many type but still not working for me
SELECT replace(format(`membres`.`montant` * `membres`.`duree`,0),',','')
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
"montante is set to decimal and "duree" is set to integer (for reference)
Thank you for any help.
Best regards
I have try many type but still not working for me
SELECT replace(format(`membres`.`montant` * `membres`.`duree`,0),',','')
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
"montante is set to decimal and "duree" is set to integer (for reference)
Thank you for any help.
Best regards
Re: AppGini 5.81 number format
Hi,
can you post the result you get from the native sql statement.
SELECT `membres`.`montant` * `membres`.`duree`
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
can you post the result you get from the native sql statement.
SELECT `membres`.`montant` * `membres`.`duree`
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
Hi
Sorry, I am not sure to get your question, but this is what I get.
When I put 1000 I get 1000
I want to get this 1 000
Thank you
Sorry, I am not sure to get your question, but this is what I get.
When I put 1000 I get 1000
I want to get this 1 000
Thank you
Re: AppGini 5.81 number format
Hi,
if the montante is set to decimal, you should have a result with decimal precision. Can you check that.
if the montante is set to decimal, you should have a result with decimal precision. Can you check that.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
ok, I set the field "montant" as this
Decimal with precision 0
Decimal with precision 0
Re: AppGini 5.81 number format
Hi,
can you try
SELECT replace(format(`membres`.`montant` * `membres`.`duree`,0,'en_EN'),',',' ')
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
watch the space at the end ',','SPACE')
can you try
SELECT replace(format(`membres`.`montant` * `membres`.`duree`,0,'en_EN'),',',' ')
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
watch the space at the end ',','SPACE')
Last edited by pböttcher on 2019-11-18 21:20, edited 1 time in total.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
thank you, please give a moment to try and back to you
best regards,
best regards,
Re: AppGini 5.81 number format
not working, maybe I miss some point
- Attachments
-
- app.zip
- (6.56 KiB) Downloaded 168 times
-
- number_format-2.jpg (72.66 KiB) Viewed 9800 times
Re: AppGini 5.81 number format
Hi,
the statement itself is only
the statement itself is only
Code: Select all
SELECT replace(format(`membres`.`montant` * `membres`.`duree`,0,'en_EN'),',',' ')
FROM `membres`
WHERE `membres`.`idmembre`='%ID%'
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
thank you Olaf, and sorry for my poor knowledge. back to you once fixed.
regards,
regards,
Re: AppGini 5.81 number format
Even so I'm not Olaf, hope it works now.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
my bad !
sorry
sorry
Re: AppGini 5.81 number format
ok, I correct the code but still not working for me unfortunately !!!
Re: AppGini 5.81 number format
Hi,
I think you need to change the type for the field Montant TOTAL to varchar (10) or what suits you best.
I think you need to change the type for the field Montant TOTAL to varchar (10) or what suits you best.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
ok I will try all type until I find the correct.
Thank you
Thank you
Re: AppGini 5.81 number format
yes it is working. When I change to varchar (10) it is working.
but the problem is I cannot use the option "show column sum" with varchar
but the problem is I cannot use the option "show column sum" with varchar
Re: AppGini 5.81 number format
Hi,
ok, so there was a missunderstanding. If you want to see the result in the table view with your format, you should change back the type to decimal, or integer (if you do not use decimals).
montant total
you can create in the hooks folder a file called membres-tv.js. Add the following to the file.
ok, so there was a missunderstanding. If you want to see the result in the table view with your format, you should change back the type to decimal, or integer (if you do not use decimals).
montant total
you can create in the hooks folder a file called membres-tv.js. Add the following to the file.
Code: Select all
$j(document).ready(function(){
$j('tr td.parent-credit').each(function(){var value=$j(this).text(); $j(this).text(Intl.NumberFormat('en-ZA').format(value))});
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: AppGini 5.81 number format
Hello
thank sir for your help and support, I am going to check and let you know.
Best regards,
thank sir for your help and support, I am going to check and let you know.
Best regards,