I have table that contain all of my product details. and I want to get store value by FIFO Method,
If my stock is 3 sql give me 9000,means (3*3000)
If my stock is 5 sql give me 15000,means (5*3000)
If my stock is 6 sql give me 17000,means (5*3000)+(1*2000)
If my stock is 15 sql give me 36000,means (5*3000)+(8*2000)+(2*2500)
Thanks in advance