how to maintain the stock updation based on customer online order and local store purchase
Is your online transactions enabled through ERPNext? Or are you using (or planning to use) WooCommerce or Magento or Shopify…?
In all cases you will have a designate a Warehouse on ERPNext that you expose quantities to your online market place. Transactions on website will be updated on ERPNext. Local store purchase: This is what ERPNext does wonderfully well anyways.
Hope this helps.