The reason for this is let’s think about the Multi Location Store, in order for the Manager at each Location A to verify if any Sales Invoice miss out, they need Location Wise Running Number. They need the info for the Daily Cashier Settlement before the document submitted to HQ for final checking.
What you actually want is not feasible because warehouse is mentioned item wise in a child table of Sales Invoice.
Therefore, it is not feasible to generate number based upon warehouse.
Apart from that, there can only be one number you can’t have 2 running numbers altogether.
If you do it like this, it can solve your problem at an extent but not what you want.
But in my opinion your requirement is not feasible.
As, I mentioned above that the warehouse is selected in the child table therefore there is no guarantee to select only 1 warehouse in all the rows of Sales Order Child Table,
I’m now split the naming series based on locations instead of Double Running Number as abovementioned. However, I found a issue, since I separate the Naming Series based on Location. But if customer cancel the document and amend it, it allow the user the Change the Location, but the naming series will be follow the previous document running number. Anyone have any idea on how to control this ?