It is generally better to save the balance. The general rule in accounting systems design is "what can be printed, should be explicitly on disk". for an invoice:
value before tax, tax percentage, value after tax, total before tax, total after tax, etc, should all be saved explicitly. An account should have a balance. Every operation should have balance before operation, value, balance after operation. You should never update an operation. This way when business rules change all previous documents are stored in consistent state. Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general