I have three products in my order, with a 20% prepayment. I created a prepayment invoice and received the payment. Then I made multiple shipments directly on the order. The first shipment was normal, but when I made the second shipment, the following error popped up:
You cannot post the document of type Order with the number IT.182025-0090-2 before all related prepayment invoices are posted.
After debugging, it was found that the prepayment line amount is not equal to the prepayment invoice amount.
The Prepayment invoice amount in the sales line is calculated by distributing the total amount from the Prepayment invoice according to the products. The Prepayment line amount in the sales line is calculated based on the quantity and unit price of the corresponding line. Due to precision issues, there is a discrepancy of 0.01. However, the order prepayment amount is consistent. I think this might be a bug? Or is there a setting somewhere to use a consistent calculation method for both?