How to solve a circular reference but not lose data comparisonability
Hello, I have the next Data Model:
Of course it is simplified, it contains more fields and more tables.
I am having a circular reference error because of the date through the MasterCalendar.
I am developing a functionality that allows the user to see the budget amount per month and what amount is already paid on each category. Categories are the units in which I want to group payments and budgets. For example I would have a category "Food" and then I would have a BudgetLine which says that I have $500 for that category and then I'll have several InvoiceLines pointing to products of that Category which says that I've already spent $200 in "Food".
For that reason for me it's extremely important that the two tables (payments and budget) share the same MasterCalendar. But I obviously need to solve the circular reference...
So in what way do you think that I could solve this issue? Thanks!