Welcome Guest, Not a member yet? Register   Sign In
FIFO / LIFO method in Inventory System
#1

I have an inventory system with sales, purchase, purchase return , sales return and purchase addition. But I have to add FIFO / LIFO method in this system. What is the best way to do it. I haven't done this kind of thing so I am new to it. If anyone has experience in this type of project please help. Thanks.
Reply
#2

I'm not sure if you actually need FIFO for this, but PHP has native helper functions to achieve this. You can quickly create your own library for such a task such as ->

https://www.ignitedcms.com/documentation/list
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#3

I found this may help.

PHP stack with SplStack - FIFO LIFO
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

Thanks for the reply, but I am looking for something that helps in valuation of product, cost of good of product and at the end profit / loss from that product. It needs some accounting concepts.
Reply
#5

Not much on it I did find this one also is this what your looking for?

Inventory Valuation — LIFO vs. FIFO
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(05-27-2022, 12:22 AM)InsiteFX Wrote: Not much on it I did find this one also is this what your looking for?

Inventory Valuation — LIFO vs. FIFO

Yes something like that.
Reply
#7

Here are a couple more links.

LIFO (Last-In-First-Out) approach in Programming

FIFO vs LIFO approach in Programming
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

Thanks for the reply. I read through the links and it helped me a lot. But my problem is a little bit different from them. I have to manage Purchase, Purchase Return, Sales and Sales Return in fifo methodology and calculate inventory valuation. My scenario is something like this.
1. When purchase, it creates a stack with quantity. if it is the first stack then it will be open stack
2. Sales reduces quantity from the open stack.
3. Purchase Return reduces quantity from the open stack.
4. Sales Return creates a new stack.
5. When the stack is empty it gets closed and the second stack gets open from fifo logic.

Well thats the basic logic and then I have to calculate the profit / loss from them.
Reply
#9

Sorry but I cannot find anything on the way you are describing, you will need to break the problem
down into smaller problems and solve them one by one.

First off I would break it down into what type of data you will need to work with and store.
Then work on your seperate methods.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#10

(05-30-2022, 12:58 AM)InsiteFX Wrote: Sorry but I cannot find anything on the way you are describing, you will need to break the problem
down into smaller problems and solve them one by one.

First off I would break it down into what type of data you will need to work with and store.
Then work on your seperate methods.

Thanks I will try out that way. hope I will be able to complete this.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB