[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pennies

On Thu, Aug 06, 2015 at 08:31:22AM -0700, Bob Crandell wrote:

> We don't do pennies so I'm trying to figure out how to either 
> truncate the dollar amount or round up so that $74.29 
> shows up on an invoice or receipt as either $74.00 or $75.00.  
> I don't care which.

> How do I make the pennies go away when I sell something?

You could use psql to execute something like:

    update parts set sellprice=round(sellprice);

(or trunc()) to set all your prices as you like.

After that, if necessary, you could add a sql trigger that would
round the sellprice on an update or insertion to parts.

This should set your default prices in invoice forms and such, but
would probably allow users to enter decimals if they so choose.  Which
sounds "good enough" because the direction of useless effort is

Be warned: I'm just a beginner here.


Ledger-smb-users mailing list