Automatic batch numbering with FIFO

Looking through previous subjects it seems there is a certain interest for this feature.
I also noticed this is not currently a priority for v7, so I want to push it forward.

Requirements would be:

  • Automatic creation of batch numbers for incoming items
  • Automatic assignment of batch numbers for outgoing items using FIFO, if batch is not chosen specifically. This should be in delivery note and packing slip.

Currently both functions are available for serial numbers, so that could be a starting point?
Perhaps somebody can give a quotation?
This feature will surely save a lot of time for many users and I can sponsor it if the budget is within my limits.

Some points to consider:

  • This should also work with fractional quantities
  • Product bundles should also be supported
  • Multiple batches should be chosen if the outgoing quantity is greater than the selected batch
  • Batch number series for each item similar to Serial number series

Any further ideas as well as co-sponsors are very welcome :slight_smile:

I am willing to sponsor this feature.

It should function similar to Odoo’s quants. As stock is received, it should be either assigned to an automatically generated batch or to an internal batch, and picked in the same manner (Considering expiry dates).

I am willing to sponsor this feature for $500 and would appreciate co-sponsors. This would be very useful for any users in the food distribution Domain, and should be included in the core as per the latest direction ERPNext is heading.

Hi, we too are interested in this. Is there any progress on this? We are open for co-sponsoring.

@creador
@alimalkhalifa
@srivatsats
I have worked on batch numbers a long back in Oracle and D2K. I know how it works and what could be the gaps that needs to be cover under this.

On the top, what I can see is that we should consume batches only when stock move from one warehouse to another or one place to another.

Let me explain with a scenario:

Item Code: Pencil
Quantity: 35
Batch Numbers: AX14122013 for 10 Qty., TY27052013 for 20 Qty, and UI19092013 for 5 Qty.
Means 3 different batches: AX14122013,TY27052013, UI19092013
Person Requested for 15 Qty. of Pencil and Submitted the Material Request, now it will allocate: AX14122013 (10) Qty. and TY27052013 (5) Qty, when the Stock Entry is created.

Now, either we should lock these batch numbers and not allow them to issue to another until that either the stock entry not submitted and consume these batch number or either the stock entry doesn’t get cancelled.

Need your comments on this.

Regards
Ruchin Sharma

Dear @ruchin78 @creador @srivatsats,

I had already sponsored this feature and development is completed. Have
not pushed to code base as it is living in ERPNext 7 at the moment. We
have done it for POS as well, and this is what breaks in ERPNext 8.

The regular weekly meets were a good place to discuss these matters but as
they are not happening regularly, we have not brought this feature up again.

Would love to have a conversation about all the features we have
developed. We feel they will benefit the ERPNext community and they can be
our contribution to the community.

@alimalkhalifa
That’s really a fantastic news and great idea as well.

In this case, I suggest it will be good if we may have a skype group call as I also want to join and be a part of this conversion and visiting there will not be feasible for me.

Regards
Ruchin Sharma

Dear @alimalkhalifa

It’s great to hear that there is a working implementation of this feature.
I think it could be a good idea to push this to your own fork on Github. This way we can contribute to making it work on version 8 and improve upon it until it is ready for a pull request to core code base.

Meanwhile we are already at v10. Is there any update or news about this feature?
@alimalkhalifa Would you be willing to share the code you sponsored? It could be a great starting point, and we could sponsor the transition to v10.
I think there is still an interest in this feature.

1 Like

@alimalkhalifa kindly send a PR or publish your own fork so the community can take this forward.

What is happening with this? I run in the exact same problem here : Delivery note Packing slip for Product bundle item : batch not fetching automatically