Sales Invoice posting error when prepayment is used


I am getting following error when we process the sales order through prepayment option.

We have already received the prepayment against this sales order in cash receipt,

but when we are posting the invoice for this sales order it is showing following error

“you must specify Gen.Prod.Posting Group in Sales Line Document Type=‘Invoice’,Document No= ‘’”

when we post sales order without prepayment option the invoices gets posted sucessfully.

Can anyone help on this.


The “Gen. prod. Posting group” needs to be setup for the Prepayment G/L account (See GL Account CardPosting).