How can I customize 'month end dates'

Hello,

I’m building an app to help an industry with their sales. There is a ‘last selling day’ in this industry, which is typically a few days before the end of the month. If a product is sold before or on this day, then commissions will be paid out in the first paycheck of the following month. If a product is sold after this day, then commissions will be paid out in the first paycheck in the month after the following month.

I’m stuck wrapping my mind around how to set up the database and design the UI so a user can adjust when their ‘last selling day’ is, month by month and for the current year and the following year.

This is important because I have a dashboard the charts sales and goals month to month, and I would prefer if it would be aware of this ‘last selling day’ and update accordingly. This way, if the last selling day is November 26, 2024, the graphs and all data towards goals will switch to December if a sale is made on November 27, 2024.

This is what I have built for the UI so far. A dropdown that filters an option set Years to only present this year and the next two years. And a list of Months with a date picker for each.

In terms of database, I have Data Type ‘User’ linked to a second Data Tyle ’ Last Selling Day’, which includes a field ‘Last Selling Day’ which is a List of dates. Am I on the right track? How should I build this out so each user can create their own last selling days?

Thanks in advance,

Raptorflaptjacks

Hi @raptorflapjacks,

What I would probably recommend doing is allowing the user to specify how many days before the end of the month is the cutoff. That should make it easier overall for you. Or have them pick a specific date (i.e., the 30th), but if you do it that way, you’d need to handle edge cases with February, leap years, etc

1 Like