* * *

Author Topic: Accountancy format of 'Floats'  (Read 1698 times)

molly

  • Hero Member
  • *****
  • Posts: 1393
Re: Accountancy format of 'Floats'
« Reply #30 on: January 11, 2017, 10:02:10 pm »
@jujibo:
Thanks for the clarification. I did not took the time to see how you got things implemented, so was oblivious to portions that are already present or not.

@J-G:
I forgot to mention: make sure you've un-installed the previous version of jujibo utils before attempting to install the updated version from source.

J-G

  • Sr. Member
  • ****
  • Posts: 252
Re: Accountancy format of 'Floats'
« Reply #31 on: January 11, 2017, 10:09:17 pm »
@J-G:
I forgot to mention: make sure you've un-installed the previous version of jujibo utils before attempting to install the updated version from source.
Thanks Molly  -  that's a timely warning, I wouldn't have considered looking for an 'Uninstall Packages' option but I've now found it.

jujibo

  • Jr. Member
  • **
  • Posts: 57
Re: Accountancy format of 'Floats'
« Reply #32 on: January 12, 2017, 11:32:58 am »
@J-G:

I have implemented custom color for negative values in every jujiboutils numeric component DB aware and non DB aware (integer, float and currency). Mask for negative value format was already working. You can download latest code from lazarus-ccr SVN

In your case, set DisplayFormat to: #,0.00€;(#,0.00)€  and NegativeColor to cl_red to get the desired result.

I suggest you to use currency components to deal with currency values instead of float one.

J-G

  • Sr. Member
  • ****
  • Posts: 252
Re: Accountancy format of 'Floats'
« Reply #33 on: January 12, 2017, 12:09:16 pm »
@J-G:
I have implemented custom color for negative values in every jujiboutils numeric component DB aware and non DB aware (integer, float and currency). Mask for negative value format was already working. You can download latest code from lazarus-ccr SVN
Thanks jujibo, I'm sure that will be useful for all users. When writing components of this nature it is difficult to foresee what other users may think is useful and great that you are in a position to take suggestions on board.

Quote from: jujibo
In your case, set DisplayFormat to: #,0.00€;(#,0.00)€  and NegativeColor to cl_red to get the desired result.

Since I am UK based and using the £ preceding the value, I presume that  £#,0.00;£(#,0.00) will work as well.

Quote from: jujibo
I suggest you to use currency components to deal with currency values instead of float one.
That would have been my intention as well, thanks.

jujibo

  • Jr. Member
  • **
  • Posts: 57
Re: Accountancy format of 'Floats'
« Reply #34 on: January 12, 2017, 12:35:27 pm »
Thanks jujibo, I'm sure that will be useful for all users. When writing components of this nature it is difficult to foresee what other users may think is useful and great that you are in a position to take suggestions on board.

I'm open to suggestions to make it better.  ;)

Since I am UK based and using the £ preceding the value, I presume that  £#,0.00;£(#,0.00) will work as well.

Yes, look at the images.

The last one is using the mask: £#,0.00;£-(#,0.00)

GAN

  • Jr. Member
  • **
  • Posts: 53
Re: Accountancy format of 'Floats'
« Reply #35 on: January 12, 2017, 09:38:18 pm »
@jujibo where i can download the last version? Thank you.

*Spanish: Hola, uso constantemente el componente que has desarrollado, podría decirse que son un fan de los componentes jujibo  :D y la verdad no entiendo nada ni de SVN ni trunk y quisiera contar con la última versión, uso Lazarus 1.6. Gracias por el excelente trabajo.
Saludos.
Lazarus 1.6 FPC 3.0.0 Linux Mint Mate 17.2 x86_64 GTK-2
Zeos 7.1.3 - Sqlite 3.8.2

Foro Lazarus en español http://forum.lazarus.freepascal.org/index.php/board,73.0.html

jujibo

  • Jr. Member
  • **
  • Posts: 57
Re: Accountancy format of 'Floats'
« Reply #36 on: January 13, 2017, 10:46:03 am »
@jujibo where i can download the last version? Thank you.

You can download from Lazarus-CCR sourceforge page: https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/  (Click on 'Download snapshot')

or click on this link:
https://sourceforge.net/code-snapshots/svn/l/la/lazarus-ccr/svn/lazarus-ccr-svn-5633.zip

It will dowload a 97,7Mb archive. Extract it. Components are in /lazarus-ccr-svn-5633/components/jujiboutils/ folder.

*Spanish: Hola, uso constantemente el componente que has desarrollado, podría decirse que son un fan de los componentes jujibo  :D y la verdad no entiendo nada ni de SVN ni trunk y quisiera contar con la última versión, uso Lazarus 1.6. Gracias por el excelente trabajo.
Saludos.

Hola GAN. Me alegro que te sean de utilidad los componentes. Cualquier consulta sobre su uso y sugerencias, no dudes en preguntar  :)

¡Un saludo!


GAN

  • Jr. Member
  • **
  • Posts: 53
Re: Accountancy format of 'Floats'
« Reply #37 on: January 13, 2017, 09:53:54 pm »
Thanks a lot. I've downloaded from this link  https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/ (The other link gives me 404 error).

Los componentes funcionan perfectos, como sugerencia se me ocurre valor máximo y mínimo tanto para fechas como para numéricos.

Saludos!
Lazarus 1.6 FPC 3.0.0 Linux Mint Mate 17.2 x86_64 GTK-2
Zeos 7.1.3 - Sqlite 3.8.2

Foro Lazarus en español http://forum.lazarus.freepascal.org/index.php/board,73.0.html

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus