Naming Series for Sales order

I want to change my naming series of Sales order. Based on the branch i want to set the series. For a branch i want to start the counter from 660 and reset it in the next year onwards. for other branches start with 280 as the counter and donot want to reset for year wise.

Please help me to figure it out.

create 2 naming series and change it manually whenever you create a sales order . or create a js script to change series when branch changes

To Update naming series and counter use Document Naming Setting Doctype. In this doctype there are two options available, one to add your custom series and one to update your counter. First create series and then update counter.
To use the branch-wise series, write simple JS code.
To reset the series counter yearly, possible use cases are: If you have Year or Financial Year in your series then I believe it will automatically reset when Year or FY changes. If you don’t have Year or FY in series, then you can do it manually just before year changes or you can run a scheduler event to reset the counter in DB.