The user wants to generate a new invoice before being paid for the last, and they want to break it out by user using the distribution tab.
The problem is that the distribution tab doesn't remove invoiced hours from its calculation, only paid hours. So people could have some of their hours counted twice on invoices.
The hack solution is to generate the payments on the first invoice, so that the workers are paid for it. Then calculate the new invoice amounts with the distribution algo. Then, go back and delete the first invoice payments.
The non-hack solution is TBD. Probably would require an interface change for the distribution calc bit.
Probably want a 'calc invoice' and a 'calc payment' button. Calc invoice would compute distributions based on invoiced money, and calc payments would compute distributions based on paid money.
A corner case:
The user wants to generate a new invoice before being paid for the last, and they want to break it out by user using the distribution tab.
The problem is that the distribution tab doesn't remove invoiced hours from its calculation, only paid hours. So people could have some of their hours counted twice on invoices.
The hack solution is to generate the payments on the first invoice, so that the workers are paid for it. Then calculate the new invoice amounts with the distribution algo. Then, go back and delete the first invoice payments.
The non-hack solution is TBD. Probably would require an interface change for the distribution calc bit.