frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.9k stars 7.34k forks source link

Batch control for Food Industry #6889

Closed alimalkhalifa closed 6 years ago

alimalkhalifa commented 8 years ago

Batch control functionality overview

This documentation will be a "phase 1" which should not require extensive modification of the code base.

Expected functionality

Stock module

Item

Auto batch control by default? check box.

Batch

Production Date (optional)

Purchase Receipt Item

Should have a check box to automagically create batches. If set by default in item will already be checked

If automatic batch creation is checked, should reveal production date (optional) and expiry date fields.

On submition with automatic batch creation checked, should create a new batch for the item based on best practice naming convention. Maybe {production_date}-{item_id}.

If automatic batch creation is not checked, but item is batch controlled, the batch creation flow needs to be optimized. This is better for pharmaceuticals whereby there is a supplier-provided batch code. In this case:

If item is batch controlled, and should new batch be selected, it should open the new batch prompt in a lightbox. The batch document should already have the item field filled in. The only input should be batch_id (which will most likely be scanned in via barcode scanner), production (optional), and expiry dates.

Delivery Note Item

If an item is batch controlled, the oldest batch with stock in inventory by production date is automatically selected.

Reconciliation

Currently, unable to reconcile batch controlled items. Should be able to reconcile them. For further usability, should allow picking items by scanning batch code or serial number. Should allow multiple rows with the same item but different batches

New Reports

Reports all batches that have stock in any WH/specific WH, sorted by nearest expiry.

Sales module

POS

POS does not allow sale of batch controlled items Should allow selection of items by scan of batch number or serial number Should also allow scanning an item barcode then manually selecting (or scanning) batch number or serial number Further improvements of POS for food industry usage will follow in another issue

Notes

These features will make batches useful for the food industry. As suggestions of how this will be implemented are given below, I will update this document, either to amend expected functionality, or to put in a new section Design Document Phase 2 should have fully automated batch control within the system such as Quants in Odoo that is invisible to the user (similar to how valuation is handled in ERPNext by FIFO, but includes production/expiry dates and allows a user with permission to circumvent FIFO in selecting stock.

rmehta commented 8 years ago

@alimalkhalifa looks good. If you are planning a pull request, would be happy to merge it.

creamdory commented 6 years ago

Already implemented.

screen shot 2018-03-15 at 11 00 56