K
kagard
Greetings:
I'm putting together a database for a contractor. They bill their
clients monthly on projects that may last a year or two. Each project
has a budget and each month's billing items are charged to specific
lines in the budget. Each line item also carries retainage - a
percentage that is due but withheld by the client to assure completion
of the project. This retainage percentage can vary from line item to
line item and from month to month. Here's the problem:
I have to show total retainage on each new bill. Since I'm not storing
calculated values I essentially have to recalculate the entire billing
history from the start of the project to the current date in order to
show retainage to date. That is: Sum(ValueOfWorkDone *
LineItemRetainagePercentage) for all activity less than the current
bill date. Is there a more efficient way to do this?
I thought about storing the results of the calculation but that seemed
to raise as many questions as it solved. For example what if the
contractor has to make an adjustment to an earlier bill? Then I'd have
to write code to update every subsequent bill to keep them in sync.
Any suggestions? TIA
Keithy
I'm putting together a database for a contractor. They bill their
clients monthly on projects that may last a year or two. Each project
has a budget and each month's billing items are charged to specific
lines in the budget. Each line item also carries retainage - a
percentage that is due but withheld by the client to assure completion
of the project. This retainage percentage can vary from line item to
line item and from month to month. Here's the problem:
I have to show total retainage on each new bill. Since I'm not storing
calculated values I essentially have to recalculate the entire billing
history from the start of the project to the current date in order to
show retainage to date. That is: Sum(ValueOfWorkDone *
LineItemRetainagePercentage) for all activity less than the current
bill date. Is there a more efficient way to do this?
I thought about storing the results of the calculation but that seemed
to raise as many questions as it solved. For example what if the
contractor has to make an adjustment to an earlier bill? Then I'd have
to write code to update every subsequent bill to keep them in sync.
Any suggestions? TIA
Keithy