To add deposit note from Sales Order, open the Sales Order, click Invoice > select Create Deposit note.
Enter the amount for the Sales order and save, this will go to Credit Note.
Then convert the Sales Order to Invoice, you will be able to allocate the Invoice balance using Credit Deposit. Click Use Credit Deposit for this Invoice and pay, done!