In business, when you purchase new products, you usually sell the older stock first. This rule is called FIFO in accounting.It means, very simply— The product that came first will be sold first..
For small and medium businesses in Bangladesh (pharmacies, grocery stores, supermarkets, clothing shops, etc.), FIFO is the most practical and straightforward method. When managing stock in a business, it is very important to accurately track at what cost products are sold and what profit is being made. FIFO (First In, First Out) is a method where it is assumed that the products purchased first are the ones sold first.
Advantages of Using the FIFO Method in Business
- Easily understood (the items purchased first will be sold first)
- Stock cost calculation becomes easy
- More effective for perishable items (such as medicines, food)
Let’s now discuss in detail the FIFO method and its use in the HishabPati app.
This blog contains-
In HishabPati, how will a batch or lot be determined?
In business, whenever you purchase products, HishabPati treats each purchase as a separate batch & will be tracked accordingly.
- If you purchase 50 pieces at 100 BDT each for the first time → this will be First Batch
- Next time, if you purchase 50 pieces at 120 BDT each → this will be Second Batch
In this way, every time products are purchased at a new price, they will be recorded as a new batch. In HishabPati, besides purchasing products, you can also add products to stock. For example— By Increasing Stock from Stock Adjustment. If, after the above two purchases, you increase the stock through stock adjustment, it will be added as the third batch.
Similarly, whenever you add a product you can add a purchase price & its initial stock. If you add an existing stock of a particular product at the very beginning, it will be recorded as the first batch, and the purchase price you set for that product will be tracked as the purchase price of that batch. If you add previous stock by editing the product after making two purchases, it will be recorded as the third batch. On HishabPati’s product list page, you can see both the purchase price and the selling price of each product. While under the FIFO policy, you will be able to see the purchase price of the first batch currently in stock.

In the web version, you’ll find a stock details icon next to each product. In the app, you can access it by tapping the three-dots icon. When you tap the stock details icon, you’ll be able to see the purchase price and stock quantity of each batch currently in stock.

Those who are using HishabPati already For each of their products, the current stock and the current purchase price will be considered the first batch and its purchase price. Then, when new purchases or stock adjustments are made, those will be recorded sequentially as the second, third, and subsequent batches.
How will profit/loss and stock value be determined under the FIFO policy?
In the FIFO method, the cost of goods sold is based on the purchase price of the first batch,followed by the next batches. In other words, products are always sold from the first batch first. Let’s assume you have a single product and its stock is as follows—
- First batch: 100 pieces, purchase price 50 BDT per piece → total cost 5,000 BDT
- Second batch: 100 pieces, purchase price 60 BDT per piece → total cost 6,000 BDT
Total Stock = 200 pieces
Total Stock Value = 5,000 + 6,000 = 11,000 Taka
Then you sold 120 pieces at a selling price of 70 BDT each.
According to the FIFO method, the cost of goods sold (COGS):
- First 100 pieces from the first batch → 100 × 50 = 5,000 BDT
- Next 20 pieces from the second batch → 20 × 60 = 1,200 BDT
- Total COGS (Cost of Goods Sold) = 5,000 + 1,200 = 6,200 BDT
Sales revenue: 120 × 70 = 8,400 BDT
Profit: 8,400 – 6,200 = 2,200 BDT
After the sale, your remaining stock will be—
- Second batch: 80 pieces, purchase price 60 BDT per piece → total cost 4,800 BDT
Total Stock Value 4,800 Taka
In this way, the combined total of all your products will be your total stock value. In HishabPati’s stock summary report, you can see the stock value of each product, and by tapping on it, you can view the purchase price and quantity of each batch.
Along with the overall profit or loss, you can see how much profit or loss was made on each sale directly on the sales page.

For security reasons in the Business package, only the owner can view the profit or loss of each transaction.
In HishabPati, you can view the profit and loss report based on sales and also see how the profit was determined. By clicking on “View Details” in this report, you can easily understand which product, from which batch, and how many units were sold.
What happens if you record or edit a purchase after a sale?
Let’s assume your stock was:
- First batch: 100 pieces, 50 BDT per piece
- Second batch: 80 pieces, 60 BDT per piece
You sold 120 pieces → according to FIFO
- First 100 pieces (50 BDT each)
- Next 20 pieces (60 BDT each)
Profit = 2,200 BDT, remaining stock = 80 pieces (60 BDT batch)
Now, if you initially entered the purchase price of the second batch incorrectly as 60 BDT and then edited it to 70 BDT,then following will happen—
- The new stock value of the 80 pieces remaining in stock will be → 80 × 70 = 5,600 BDT
- In future sales, the COGS will be calculated based on the new purchase price.
- The sale made before this edit will remain unchanged. The profit or loss for that sale will stay the same as before.
What happens if you update a sales transaction?
Let’s assume your stock was—
- First batch: 100 pieces, 50 BDT per piece
- Second batch: 80 pieces, 60 BDT per piece
You sold 120 pieces → according to FIFO
- First 100 pieces (50 BDT each)
- Next 20 pieces (60 BDT each)
Profit = 2,200 BDT, remaining stock = 80 pieces (60 BDT batch)
Some examples of editing a sales transaction
1. Change in sales quantity
- For example, the sale changes from 120 → 100 pieces
- The 20 pieces will return to stock (to the 60 BDT batch of the second batch; products always return to the batch they came from, at that batch’s purchase price).
- The stock value will be updated.
- The profit from the sale will also be updated according to the new calculation.
২. Change in selling price
- For example, the selling price changes from 70 → 80 BDT per piece.
- COGS will remain the same, but the sales revenue will increase.
- As a result, the profit will increase.
3. Change of product in the sale
- For example, some products were removed or new products were added.
- The stock will automatically decrease or increase according to the respective batches.
- The profit or loss will be updated according to the new calculation.
What happens in a sales return under the FIFO policy?
Sales Return means—some of the products that were sold earlier are returned by the customer.
- If you process a sales return from a specific sale, under the FIFO method, the returned products will go back into stock at the purchase price of the batch from which they were originally sold.
- If all products from a batch are already out of stock, a new batch will be created in that case.
- And if you do not process the sales return under a specific sale, the returned products will be added to stock at their original purchase price as a new batch.
Impact on profit/loss:
- Overall sales revenue will decrease due to returned goods.
- Overall profit or loss will be automatically updated according to the new accounts.
- Stock value will also increase accordingly.
What happens in a sales return under the FIFO policy?
Purchase return means—you will return the goods you previously purchased to the supplier for any reason and take the money back.
- Using the FIFO (First-In, First-Out) method, a purchase return will be made from the earliest batch of goods purchased that is still in stock, and the return value will be based on the purchase price of that specific batch.
- If you wish to provide a different purchase price during the purchase return, you can do so, and that will impact the Supplier's party balance. However, the goods will be removed from stock based on the batch's original purchase price, and the cost of the remaining goods in that batch will remain unchanged.
- You can also change this if you wish, by updating the purchase price of that specific purchase transaction.
- And if you do not make a purchase return under a specific purchase, the stock will decrease from the first batch (oldest one) according to FIFO.
How can the FIFO (First-In, First-Out) method be affected by offline use?
Since the HishabPati app can be used offline, you can perform all types of activities, including Purchase and Sales, under the FIFO policy even when offline. Whenever your device comes back online, the data will automatically be transferred to the server. However, some situations may arise in this case.
For example— when you made a sale offline, it was from a batch with a purchase price of 100 Taka. But before your device came back online, another employee in your organization, using a different device, sold the same product online from that very same batch with the 100 Taka purchase price. In this situation, the product has already been reduced from that batch on the server. When your device returns online, three situations may arise.
- Situation 1: Even though there was an online sale, this batch still has the same amount of product that you sold offline.
- Situation 2: After the online sale, there is not enough product left in this batch for the amount you sold offline, but that amount of product is available in the subsequent batches.
- Situation 3: After the online sale, the amount of product you sold online is not available, even across all batches combined, or there is none at all.
Special provisions in HishabPati for accounting transparency
HishabPati is always committed to maintaining business transparency. For this purpose, two types of icons are used on the right side of each sale in the sales list page—
- One is the purple check mark (✓) icon: This icon means that the transaction, whether done online or offline, has been saved on the server exactly as it was recorded. There is no complication. It will be applicable for situation 1.
- The other one is the yellow exclamation (!) icon: This icon means that the transaction, as recorded offline, could not be synced exactly the same way when going online. Some details are incomplete, and the system will notify you to complete them. It will be applicable for situation 2 & 3.

Tap/click on the yellow exclamation sign to find out what kind of changes have been made or what is incomplete. This will take you to the 'Adjusted Records' page.

A single transaction may contain many products. The number of products that require adjustment will appear on this page.
Tapping on a specific product in the list will show the details.
If the second situation arises, meaning you sold the product offline but upon coming online, it's found that the required amount of product is not in that specific batch but is available in subsequent batches, then the adjustment will happen automatically from the subsequent batches. You will be able to see that, as shown in the image below.

On the left column, you will see the purchase price of the product you sold offline. And on the right, you will see which subsequent batch the adjustment was made from after coming online. Accordingly, the profit-loss of this transaction has also been automatically adjusted. Here you will find two buttons. Tapping OK on the adjustment for all products will turn the yellow exclamation sign next to the transaction into a checkmark.
And if the third situation arises, meaning you sold the product offline but upon coming online, it was found that the required amount of product is not in stock, so the adjustment could not be made. The transaction remains in this state. Due to this, the OK button is inactive, and an adjustment button is also inactive.

The adjust button will become active when you add the product back to stock. After you tap the adjust button and make the adjustment, the OK button will also become active.

Then, as usual, tapping the OK button will change the yellow exclamation mark into a checkmark.
Use the FIFO (First-In, First-Out) policy in HishabPati
The FIFO (First-In, First-Out) method is one of the most reliable ways to keep business accounts. By using the HishabPati app, businessmen can easily use this method in both online and offline states. If any change occurs during the sync process after calculating accounts offline, the user can clearly see it. Ensure updated business reports and accurate profit-loss calculations with HishabPati!
Demo - View this & start your journey with HishabPati in three simple steps!
- Step 1: Sign up on HishabPati
First, go to the HishabPati website and create an account for your business. Or, to make managing your business easier, download and install the ‘HishabPati’ app for free today.
Then complete the registration. The registration process in HishabPati is very easy and completely free!
- Step 2: Set up your company
After signing up, first set up your business profile by providing the necessary information as the owner. Then, set up essential business aspects such as inventory, units, purchases and sales, outstanding balances, invoices, and transactions. After that, start updating daily transactions.
- Step 3: Enjoy the various features of HishabPati
Once you start managing your business accounts with HishabPati, make sure to utilize the necessary and unique features, such as invoicing, barcode scanning, units, and expense management. To understand how to use HishabPati and its features in detail, watch demo videos in Bengali on YouTube.
Digital ledger for income and expenses – HishabPati demo.
HishabPati is a simple and affordable accounting app. Its subscription fees are divided into different durations and offered in budget-friendly packages. Check Pricing and Features today in details & choose your desired package. Good luck with your business!
