Hi Victor,
I am not really sure where your problem is.
If your DownPayment will be identical with your Invoice, then information needed to create a Down Payment Invoice and to create an Invoice are the same.
So why cant you create a down payment invoice first with all the items, qty, and price needed to create the invoice ?
This total amount of the Down Payment should then be the same as the total amount of invoice you will be creating afterwards, isn't it ? or am i missing something ?
Or else, if you still need to create the Invoice first,
1. Start a transaction.
2. Create the Invoice, get the total amount.
3. Rollback the transaction,
4. Create a down payment + Create an Incoming Payment.
5. Create the Invoice + drawing the down payment.
Regards
Edy