Set Tax Category Automatically Based on Customer Address and Place of Supply in Sales Invoice

when a customer is selected in the Sales Invoice, if the customer’s address is in Gujarat, the tax_category should automatically be set to ‘In-State’. And if the place_of_supply is not Gujarat, then the tax_category should automatically be set to ‘Out-State’ Before Save showing me Tax.