Found the solution: according to umair 's post here, a journal entry for advanced payment needs to be created first before referencing it at the sales invoice. The journal entry’s form can be autogenerated at the Sales Order, using the make > advance payment button. Fully documented at Advance Payment Entry.