I'll try.
Supose i have an item wich has an id and a  price .
For example id is 77 and price 41.69.
If I use ScaledDecimal with scale 2 for price , glorp create this string for query execution: 'INSERT INTO item (id,price)  VALUES (77,41.69s2); 
and of course give me a GlorpDatabaseWriteError for the 's2' part of the string.
If i comment the line   "aStream nextPut: $s; print: scale." in printOn: of ScaledDecimal glorp works with no problem.

I hope you understand. Sorry for my bad english

TIA




Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
San Miguel de Tucum��n
Email: pdigonzelli@softsargentina.com
pdigonzelli@gmail.com
Cel: 5493815982714


De: "stepharo" <stepharo@free.fr>
Para: "Any question about pharo is welcome" <pharo-users@lists.pharo.org>
Enviados: Jueves, 5 de Marzo 2015 10:04:06
Asunto: Re: [Pharo-users] scaled decimal number for currency

can you give example?


Le 5/3/15 13:21, Pablo R. Digonzelli a ��crit :
Hi, I want to use scaled decimal numbers for currency amounts. I am using Glorp too.
The problem is that when Glorp generates sql sentences has a problem with #printOn: of ScaledDecimal wich produces output that include the scale value.
I do not want to modify printOn: on ScaledDecimal. Any suggestion for this problem?

TIA





Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
San Miguel de Tucum��n