hello everyone

this is my 1st post here
i want to create inventory which i want to use fifo & lifo system,
i have 6 table likes open stock, purchase, sales, purchase return, sales return, dead stock, now i want to implement fifo & lifo method inventory with valuation of closing stock or current stock

experts please guide me how to implement this