InterstitialTech / timeclonk

GNU General Public License v3.0
1 stars 0 forks source link

invoicing a second time, before being paid for the first one #48

Open bburdette opened 1 year ago

bburdette commented 1 year ago

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.

bburdette commented 1 year ago

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.