You can use dimensions for each branck on clients, and GL transactions as well as stock and purchases, and use location for the stock. Then you can transfer stock between locations. Each branch would have their own login, but they will still be able to process against the wrong branch if not using correct dimension.
Alternatively each branch could have separate setup and database. You can still run it on the same server with dropdwon to select banch login. Data is then processed separately for each branch. In main branch or Head Office have an income and expense account for each branch depending on your setup to consolidate transactions back to the totals.
Hope this makes sense.