I think there is a bug in the prepayments functionality, and it's a bit hard to reproduce, but this has happened to us a few times, and it's a dead end.
1. Create a Sales Order with a Product type Sales Line, Qty 3, Unit Price 350 Total Price 1050, Total with Tax 1123,50 (7% Tax)
2. Post shipment for Qty 1
3. Post another Shipment for Qty 1
4. Post last Shipment for Qty1, so we have 3 shipments in total
5. Now make 1 prepayment for 350
6. Create another prepayment for 350, so we have 2 prepayments of total 700
7. Create Sales Invoice, and Create lines from Shipment lines. Bring all 3 posted Shipment Lines
8. Now when you post the invoice, you get an error. Prepayment Amount must be at least 700. As the Prepayment Amount has been distributed among 3 invoices Lines, the total prepayment amount is 699,99 so there is a rounding issue here. 700/3 = 233,33, so 1 cent missing
The system should distribute 233,33 for 2 lines, and 233,34 to the remaining line.