How to add Purchase Invoice with Negative Balance

we are migrating from SAP B1 to ERP Next.
In SAP I was able to create a purchase invoice with negative balance.
Example:

Price:10000
Advance:5000
Charges:-10000
Balance :(10000-5000) -10000 =-5000.

The same scenario when i am trying to create it in ERP, i am able to do so,could anyone help.