Change Default Source warehouse on change of company

In the sales invoice, when we change the company the Accounting Details Chnaged automatically
same i want in the “source warehouse”

Example-
If choose 1st Company then source warehouse will automatically set “Store-1c”
if comapny choose 2nd then source warehouse will automatically set “Store-2c”

Please help me if anyone knows.
Thank You.

Possible using the client script.