Receipt: a liability, with VAT
When a customer pays before delivery, credit a liability account called “customer advances” or “advances from customers”, not sales. The amount you owe them in goods or services is a real obligation until you deliver.
For VAT, Article 25 of the VAT Decree-Law makes the date of supply the earliest of events including receipt of payment and issue of a tax invoice. So a taxable advance usually triggers output VAT in the period it is received. Treat the advance as VAT-inclusive and issue a tax invoice for it within 14 days.