Cost (COG) cost of gods

In my region, inventory costs are managed with the weighted average, but even if you choose to work with Fifo, it is not functional either because each location of the same item would have a different cost (either Fifo or average), for example, in a hardware store I can receive the purchases in a warehouse X at an average cost per item but when moving part of the stock to another location Y would be stored at that cost and if I buy again in the warehouse in the main warehouse X I would have a new average cost different from warehouse Y. Is there a configuration in ERPNext to manage the costs so that they are the same in the whole company and not by warehouse?