Forum OpenACS Development: Re: roles in permissions

Collapse
7: Re: roles in permissions (response to 5)
Posted by Torben Brosten on
Tom, your description of typed maps is interesting and pertinent to the porting of sql-ledger to OpenACS as SL uses time-based limits on transactions, where relationships can have a start and end date. This gives me another perspective on the feature which may prove useful to consistently applying it. Thanks!
Collapse
8: Re: roles in permissions (response to 7)
Posted by Tom Jackson on
Wow, I didn't realize you were talking about SL! Definitely my favorite accounting package. I kind of like the way it works where you push enter on a form and it gets updated like an automatic search. OTHO, the values get locked in once they are used. If you add an item to an invoice and then realize you have a 30% discount to that customer, it is hard to then go back and change the conditions. I guess that explains it: it is some kind of transaction or saved state.

I would put transactions in a different category than typed maps because typed maps refers to permanent data. There is a difference. Permanent data doesn't undergo much change, except for things like correcting mistakes, or setting the expire date. But both can be used the same, using the same tables, maybe more effectively than a transaction. The reason is that you can add an order, an invoice which has not been mapped to be valid yet. Once it is mapped as valid, that freezes the date/time of the invoice, now values used in the invoice are based upon that date when building/displaying it at a future date. After that, you can go in change the customer address, expiring the old address, then go print the just added invoice, with the old address.

In the case of discovering an incorrect discount after starting an invoice (as above), this would be immediately reflected in the open invoice since you haven't set the transaction date/time. Admins would always have the ability to see the state of the system at any past time, or selectively look at what a part would look like in the future (given current knowledge).

But this could be time consuming to apply to SL, so this isn't really a recommendation to try it.