Closed pierced closed 12 years ago
Proposed fix: 2ba7f8ba152d98e251d06b5b3ec5fbead4842e14
This adds a new table called dateRestrict. Restrictions can be specified by UPC or department #. Restrictions can also be specified by a specific date (e.g., holiday) or by weekday (1=Sunday, 7=Saturday). The time fields are optional. If they're filled in, the restriction applies during that period. If they're NULL, the restriction applies all day.
For the moment, I'm only checking date restrictions on items that have idEnforced set. Extra lookups on every ring aren't ideal from a performance standpoint.
Nicely done! @DonaldGonzalez @pierced I've merged and applied this patch to the testlane. I've populated the dateRestrict table w/ 1 row for now to test. You can test any Wines, today, btwn 12pm and 4pm to see the date restriction in action.
Once it's fully tested i'll merge into lane05 w/ live data. (e.g. No booze sales on sundays b4 noon)
Tested on the test lane and verified that it worked!
I get the message "product cannot be sold right now"
We might want to change that message. What do you think @pierced @dhermann-harvest ?
Also, one more request. From now on can the messages that appear in the messages boxes be capitalized correctly?
It's a minor issue but it just seems more formal.
Thanks @gohanman @joelbrock !
I just threw something in there as a place holder. We can change the wording however.
Capitalization is a more involved fix just because there's lots of message strings to revise, but it should be possible.
added the dateRestrict tbl to replication. updated lane05 with new code.
Harvest cannot sell alcohol on Sundays before noon and on holidays. We need to be able to restrict the sale of certain items at the PLU/UPC level for calendar date and time.