This solution automatically creates an invoice document after a sales order is created, equivalent to the deposit paid by the customer.