Wrong prepayment entry posted after updating Base Quantity on Sales Order.
Describe the bug When we update the base Quantity on a Sales Order where Prepayment Invoices have been posted already, then the final invoice gets generated with Prepayment Line showing incorrect amount.
To Reproduce
- Create a Sales Order with line having Quantity 1 and Unit Price 100. (Sales Tax Liable and Tax Area Code should not be blank) Assume Tax Amount as '8'.
- Enter Prepayment percentage as 50 % and check "Prepmt. Include Tax" field.
- Post Prepayment Invoice. (Expected Amount '54')
- Click on Reopen Action on the Sales Order.
- Update the "Quantity" to 2 on the same line.
- Again Post a Prepayment invoice. (Expected Amount '54')
- Open Posted Prepayment Invoices.

- Now Ship & Invoice the Sales Order completely.
- Open Posted Sales Invoice. (Final)
Expected behavior Prepayment Amount adjustment line created in the Posted Sales Invoice should have cumulative amount as per both the Prepayment Invoices. (Prepayment Amount should be '106')
Actual behavior Prepayment Amount adjustment line in the Posted Sales Invoice is not created with the cumulative amount as per both the Prepayment Invoices. (Prepayment Amount is '53')

Version Docker BC Version: US Business Central 16.0 (Platform 16.0.11233.12078 + Application 16.0.11240.12085) OnPremise BC Version: NA Business Central 16.0 (Platform 16.0.11233.12061 + Application 16.0.12076.0)
Can you create bugs using Support? This forum is for extensibility requests related with events, enums etc. We do not resolve bugs here.
Sure will do that. Thanks.