Bugfix to deal with a complex subtle interaction on unit floorplan. IF following is done (generally there is no logical business reason for doing this because it doesn't model any meaningful business workflow that actually occurs, but c9 doesn't prevent it).
- unit on system under floorplan with a TR but no upfront invoice
- Curtailment is added to pay out floorplan with a supplier selected
- Unit is then modified to record an upfront invoice, flipping floorplan from tax invoice at payout to tax invoice at initial floorplan entry
- Curtailment on step 2 is then modified (e.g. to change the reference #)
- Curtailment is modified yet again
Step 4 above would damage the unit record in c9 such that subsequent modifications to the curtailment would result in duplicate bills being added to the creditor. Core problem was steps 1 to 3 would result in all sorts of complex adjustments made to the general ledger to account for the variations in floorplan structure being made. Step 4 itself would effectively rollback step 2 which impacts the journal posted on step 3 which needs to be adjusted for. So journal posted in step 4 would effectively merge postings of step 2 and 3 into a new journal posting. The result is a single journal that merges curtailments + unit purchase tweaks. Subsequent modifies (step 5) would not allow the curtailment effect to be deleted since it involves a posting that touches the original purchase of the unit as well as a result of the merged journal posted in step 4, resulting in duplicated bill records on the creditor. Solution is to make sure step 4 does two postings, one for the curtailment and another to redo floorplan purchase posting of step 2+3 to keep operations separated and allow the curtailment to be subsequently deleted.