This order limit and order window needs to be referenced before each order is placed to ensure it meets the requirement.
I need a way to pull up/display a customers order history, their 30-day window and the number of products remaining that they can purchase within that window.
Ideally, I want something that when I look up a customer I can see the current 30 day period that they are in and how many products they can order.
For example, Customer 1's first order was on January 1st and their max order limit for the month is 100$. Customer 1 has until January 30th to order up to 100$ worth of product. After January 30th a new 30-day countdown is started.