Comment 1 for bug 1669445

Revision history for this message
Mike Rylander (mrylander) wrote :

For clarification about the database layer, the different payment types are not views but child tables. The reason to use table inheritance is to provide for the differing fields of different payment types.

Doing this also improves the code as it avoids the possibility of whole classes bugs. For instance, the business logic code does not have to make sure to conditionally use (or avoid) some fields for one payment type and others for another.

It also simplifies reporting, providing layers of abstraction such as when payments are tied to a particular location, or not.

I can certainly see a benefit to being able to "disable" certain payment types, and that would not be too hard to do. We could definitely improve the process of adding new types, as well, but because we're dealing with recording incoming money I feel strongly that the precision and bug-avoidance of the existing scheme has major benefits