Batch And Expiry date System


Introduction

 This is built inside code and customized to adapt the Batch productions, and sales, which will be very helpful to track the batch volumes and sales. And also its good to monitor the expiry date for all the batches. 

Installation

This is not a separate module to install through modules. we need to customize the core of FA to adapt the changes. Basically you need a bit developer knowledge to do this.  But we can do it this way. 

You need any version differentiator or SVN, or Git softwares to compare both your FA and our Batch programes.And I Prefer Meld . Which is very convinenent for me to compare directory of files and get the differences only. 

Config 

Lets make the database change first. Just find the following tables and add two more columns in it .  Here I am giving tables without prefix. Some users may use without prefix and some uses prefix. So its here without Prefix i am writing,. 

  • debtor_trans_details
  • grn_items
  • stock_moves
  • wo_issue_items

The queries to do this step easily.

debtor_trans_details

ALTER TABLE `0_debtor_trans_details` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER `stock_id`,ADD `exp_date` DATE NOT NULL AFTER `batch_no`;

grn_items

ALTER TABLE `0_grn_items` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER `item_code`,ADD `exp_date` DATE NOT NULL AFTER `batch_no`;

stock_moves

ALTER TABLE `0_stock_moves` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER `stock_id`,ADD `exp_date` DATE NOT NULL AFTER `batch_no`;

wo_issue_items

ALTER TABLE `0_wo_issue_items` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER `stock_id`,ADD `exp_date` DATE NOT NULL AFTER `batch_no`;

These tables should additionally have two columns for these two. 

`batch_no` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`exp_date` date NOT NULL,

And this columns are necessary to handle the details further in it. After you finish database change and files update. goto browser and login into FA. There you need to reach the "Setup->Company Setup" Here just to change the settings to enable the batch, expiry dates to work for you. Here is all queries at one. 

SET SQL_MODE='';
ALTER TABLE `0_debtor_trans_details` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' AFTER `stock_id`,ADD `exp_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `batch_no`;


ALTER TABLE `0_grn_items` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' AFTER `item_code`,ADD `exp_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `batch_no`;

ALTER TABLE `0_stock_moves` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' AFTER `stock_id`,ADD `exp_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `batch_no`;

ALTER TABLE `0_wo_issue_items` ADD `batch_no` VARCHAR(30)CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' AFTER `stock_id`,ADD `exp_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `batch_no`;



Hope this is enough to install and configure the Batch and expiry date system, incase if you have trouble or doubt. just use the chat and get clarification from us.

 


Did you find this article useful?