I have a multiseller store. I'm creating a seperate seller invoice within series. My table data is like below
id seller_id invoice_id invoice_series order_id
For example if a seller name is John, I need his first invoice_series like JOH000001 and next invoice_series will be like JOH000002. I have seller_id to differentiate the sellers. I couldn't find the logic to insert invoice_series in incremental value with prefix of seller code based on seller id.