Perhaps the transaction should know how to save itself - and roll back if it can't. I don't know much about accounting though: what exactly do you need to keep records of?
Well, it is a real double entry accounting system, which also needs to support threelegged transactions. But I am not sure how to design this - whether the transaction should be two or threelegged would be determined from the account type (whether it is an account where Tax are added or not - or for some accounts you also have to add a calculated amount and put it on another account).
And I need to save the stuff in the database. However, Kyberfabrikken kind of showed me how he would do that, and I updated my code accordingly. I havent added rollback, because I never really understood how that will work in a reallife appl. What would it look like exactly.
Bookmarks