Hi,
I have created this database, allowing users to make orders etc. There are several tables in the database, such as tblCustomers, tblProducts, tblOrders,...
Every user (from the table tblCustomers) is allowed to place orders for certain product groups. So a certain user may not be allowed to place an order for certain products.
Therefore I made a table tblBudget. In this table, there's a joining between the customer and a product group.
A record in the table could be:
Customer ProductGroup StartBudget CurrentBudget
-------- ------------ ----------- -------------
customer1 food 10000 9000
-------------------------------------------
A user has a budget for 1 year. When he places an order, the total amount of the order is substracted from his budget(CurrentBudget). The user can also, at all times have a look at what he has already spent for a certain product productgroup (so how much there's left of his budget(StartBudget-CurrentBudget)), and on which products he spent his budget (I can easily find this using the table tblOrders).
Now, with the turn of the year, the current budgets should be set to their original values. The overviews of the expenditures(how much and on which products) should still be available, but of course the expenditures from the new year have to be seperated from the expenditures of last year.
Every order a customer makes has of course an order date (including the year), so I guess I will have to use that, to seperate the orders from different years. So I should probably base the form where the customer gets the overview of his expenditures on the current year. Still, I'm not really sure and I don't know how I can test this. On the other hand a user should also be able to see his expenditures of last year. Maybe it should be better to create a new table tblOrders for the new year as well, but again I'm not very experienced with this.
Has anyone had experiences with a problem like this? I would realy appreciate any help!
Thanks in advance,
dj.
I have created this database, allowing users to make orders etc. There are several tables in the database, such as tblCustomers, tblProducts, tblOrders,...
Every user (from the table tblCustomers) is allowed to place orders for certain product groups. So a certain user may not be allowed to place an order for certain products.
Therefore I made a table tblBudget. In this table, there's a joining between the customer and a product group.
A record in the table could be:
Customer ProductGroup StartBudget CurrentBudget
-------- ------------ ----------- -------------
customer1 food 10000 9000
-------------------------------------------
A user has a budget for 1 year. When he places an order, the total amount of the order is substracted from his budget(CurrentBudget). The user can also, at all times have a look at what he has already spent for a certain product productgroup (so how much there's left of his budget(StartBudget-CurrentBudget)), and on which products he spent his budget (I can easily find this using the table tblOrders).
Now, with the turn of the year, the current budgets should be set to their original values. The overviews of the expenditures(how much and on which products) should still be available, but of course the expenditures from the new year have to be seperated from the expenditures of last year.
Every order a customer makes has of course an order date (including the year), so I guess I will have to use that, to seperate the orders from different years. So I should probably base the form where the customer gets the overview of his expenditures on the current year. Still, I'm not really sure and I don't know how I can test this. On the other hand a user should also be able to see his expenditures of last year. Maybe it should be better to create a new table tblOrders for the new year as well, but again I'm not very experienced with this.
Has anyone had experiences with a problem like this? I would realy appreciate any help!
Thanks in advance,
dj.