Functionality
A new table (Max4SaleCounts) was created, ancillary to Max4Sale and Points4sale capabilities, that stores the limits associated with each limit.
This allows limits to be selectively identified to use the Max4SaleCounts table. Dynamic timespan limits are not be allowed with this approach. Any limit not specifically identified would be calculated every call.
Entries in the Max4SaleCounts table are created when an item falling into that limit was added/changed in the transact/tr_save table. Or, entries would be created when a call was made in order to retrieve the value that affected that particular limit. Only the limits that are requested are stored. Max4SaleCounts can be deleted at any time and the limits refresh.