C Programming
Project Report On
INVENTORY MANAGEMENT SYSTEM
INDEX
1) 2) 3) 4) 5) 6) 7) 8)
9)
Certificate Acknowledgement Index Problem Definition Problem description Scope of the project Algorithm Data tables Data flow diagram
INVENTORY MANAGEMENT
10) Entity relationship diagram 11) Screenshots 12) Source code 13) Report
14)
Function definition
15) System limitations 16) Future enhancements 17) Bibliography
PROBLEM DEFINITION
The system to be developed should be based on the requirement analysis performed earlier and hence the requirement analysis document is the basis for the problem description. The requirement analysis of the system is been provided previously. It states that the developing should be having the following characteristics. It should be able to maintain the records been added by the end users. It should help the end user to perform the functions by having access to the data of the table as and when required. The system should be very reliable. Security to the data is the first and the foremost requirement of any system. The system should be made as user friendly as possible.
INVENTORY MANAGEMENT
There should be facility available to get the reports as and when necessary by the institution. All the requirement of the institution is to be catered and the system developed should be user friendly as possible. All through the development process, the environment in which the software is to be implemented is to be kept in mind. The required performance features are to be maintained and the interface should be appearing and attractive. It should be taken care that the system does not violate the existing functional flow at any cost. The development system should be fast in execution which calls for the effective code optimization.
PROBLEM DESCRIPTION
The system to be developed should be based on the requirement analysis performed earlier and hence the requirement analysis document is the basis for 'the problem description. The requirement analysis of the system is been provided previously. It states that the developing system should be having the following characteristics. It should be able to maintain the records been added by the end user. It should help the end user to perform the functions by having access to the data of the table as and when required.
INVENTORY MANAGEMENT
The system should be very reliable. Security to the data is the first and foremost requirement of any system. Unauthorized user should be unable to access the data. The system should be made as user friendly as possible. There should be facility available to get the Reports as and when necessary by the organization.
As far as the functional requirements are concerned, the problem is to maintain the records of the items being served at the Stationary. Depending on the Stationerys condition and item requirement. All the entries of the Stationary being done are stored in a database and can be fetched from there whenever required. It should be easy to get the required information for any of the Stationary from any form of the software whenever required. All the requirements of the institution are to be catered and the system developed should be as user friendly as possible. All through the development process, the environment in which the software is to be implemented should be kept in mind. The required performance features are to be maintained and the interface should be appearing and attractive. It should be taken care that the system developed does not violate the existing functional flow at any cost. The developed system should be fast in execution which calls for effective code optimization.
SCOPE OF THE SYSTEM
The Inventory management software is very fast and user friendly which allows the flow of information from one point to another as required by the end - user for its faster access. The user can understand each and every thing very easily and minimum efforts is required s minim um typing is done and maximum clicking is used as each and every thing is displayed on the screen and the user has to just click the mouse. This software satisfies each and every requirement of the person working with this software. Even the layman can very easily use this
INVENTORY MANAGEMENT
software as it is very easy to understand and very good help facility is also provided which gives each and every specification of each and every point. The module handles all the functionalities require by any Inventory Management software.
They are listed below:
Data Entry [Item, Supplier, Customer, Indent] Generating the Purchase Order, Purchase Invoice Production, Finish Good, Dispatch This module helps the end - user to easily tackle with the data of the Company as and when required i.e. to provide item to customer, getting monthly records, etc. It will provide with the following reports: Monthly, Weekly reports of the items coming to the Company. Monthly report of the Finish good of the Company.
Data Tables
1)
Supplier :This table is used to provide the detail information about the entire supplier related to company
INVENTORY MANAGEMENT
Fields supp_id
Data Type Int(6)
Descriptions Constraint:- Primary Key Stores Supplier Id Stores Supplier name Stores Supplier City Stores Supplier Office Address Stores Supplier email
supp_name City Phone_no Email
Character(30) Character(10) Int(20) Character(50)
Purpose Add Modify View All Exit
: Main Purpose is to Store the Detail of the supplier. : Add is used to add the records. : It is used to modify the record. : view is used to display all the records. : To Exit from the Current open Form
2) Customer:
This table is used to provide the detail information about the entire
Customer related to company Fields cust_id Data Type Int(6) Descriptions Constraint :- Primary Key Stores Customer Id
INVENTORY MANAGEMENT
cust_name mob_no City Email
Character(30) Character(10) Int(20) Character(50)
Stores Customer name Stores customer no. Stores customer city Stores customer email
Purpose Add Modify View All Exit
: Main Purpose is to Store the Detail of the customer. : Add is used to add the records. : it is used to modify the records. : view is used to display all the records. : To Exit from the Current open Form
3)
Bill:Data Type Int(6) Descriptions Constraint :- Primary Key Stores Bill no. Stores customer name Stores Inventory item name Stores quantity of item Stores rate of item
stores the total rate of item
Fields Bill_no(Primary Key)
Cname Invname Inv_qty Inv_rate
Total
Character(30) Character(30) Int(2) Float(4)
Float(4)
Purpose Add View
: Main Purpose is to Store the bill detail of the customer. : Add is used to add the records. : View is used to display all the records.
INVENTORY MANAGEMENT
Exit
: To Exit from the Current open Form
4) Invent:Fields
Id
Data Type
Char(6)
Descriptions
Constraint :- Primary Key Store item id
inv_name Rack Cabinet
company_name
Char(20) Int(2) Char(2)
Char(20)
item name Stores Rack number Stores Cabinet number
Stores the company name
supp_name unit_cost
Sale Qty mfg_date exp_date pur_date bill_no
Char(30) Character(8)
Float(4) Int(2) Char(15) Char(15) Char(15) Int(2)
Stores Supplier name Stores unit cost of item
store the cost of the sales stores the quantity of item store item manufacturing date store item expiry date store item purchase date unique bill id
Purpose
: Main Purpose is to Store the detail of the item purchased.
Data Flow Diagram
Context level
INVENTORY MANAGEMENT
First Level
Customer Detail Customer
Customer
INVENTORY MANAGEMENT
Customer Detail Item
1.0
Item Detail
Item Detail Bill
Custome
Detail
r Amount
Detail
Supplier
1.1
Supplier
Supplier
Supplier Item
Supplier Detail
Item Detail
item info Item Item
1.2
Item detail Item Customer
Purchas e
Bill Generate
Customer Company Detail Supplier Supplier
Supplier detail
Supplier info
1.3 Item
INVENTORY MANAGEMENT
Customer Supplier
Sale
Item Detail Item Item
Item info
Customer Customer Detail Supplier Detail Supplier
Bill issue
Supplier Info
INVENTORY MANAGEMENT
E-R Diagram
User Passw ord Supp_i d Supp_na me Phn o Supplier Supp_n ame INVENTORY MANAGEMENT Id n na Cit y Item_na me Item_purchase qt y Unit_co st Supp_nam e Em ail
User_i d
Wo rk
Ci d
Cna me
Custome r Em ail
Phn o
Cit y
Cna me
Mfg_da te
exp_da te
Bill_n o Item_na me cnam e Item_sale
Screen Shots
qty rate
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
Source Code
/* Project Developer Name: - Roly Singh & Farhin Siddiqui Project Name: - Inventory Management System ----------------------------------------------------------------------------------------------------------------------*/ #include <dos.h> #include <stdio.h> #include <ctype.h> #include <conio.h> #include <stdlib.h> #include <string.h> #include<graphics.h> #include<math.h> #include<time.h> #include<bios.h>
/*FUNCTION DECLARATION*/ void box(); void welcome(); void remainder(); void main_menu(); void bill(); void stock(); void update_stock(); int billcode(int);
INVENTORY MANAGEMENT
void pur_bill(); void sale_bill(); void infor(); void entry(); void display();
void search(); void search_id(); void search_name(); void supp_entry(); void supp_list(); void sup_update();
void cust_search(); void search_cid(); void search_cname(); void cust_entry(); void cust_list(); void cust_update(); void exit(); void report(); void report2(); void report3(); void pur(); void ventry(char t[],int);
INVENTORY MANAGEMENT
struct invent { char inv_name[20]; int rack; //char ch; char cabnit[2]; int quantity; float sale; char id[6]; float total; float unit; float cost; float profit; float bye; int qty; char pur_date[15]; char exp_date[15]; char manu_date[15]; int bill_no; char comp_name[20]; char supp_name[30]; };
struct invent temp; struct invent x[20];
INVENTORY MANAGEMENT
FILE *ptr; char a[10]; struct supplier { char supp_id[6]; char supp_name[30]; char mob_no[10]; char city[20]; char email[50]; }; struct supplier temp1; struct customer { char cust_id[6]; char cust_name[30]; char mob_no[10]; char city[20]; char email[50]; }; struct customer temp_c; FILE *ptr1;
struct bill { char billno[6];
INVENTORY MANAGEMENT
char cname[30]; char invname[30]; int inv_qty; float inv_rate; float total; }; struct bill bil; FILE *ptrbill;
void linkfloat() { float f,*p; p=&f; f=*p; } /*GLOBLE VARIABLE DECLARATION*/ int i; //=========================Time ==================== int t(void) { time_t t; time(&t); gotoxy(39,3); printf("Date and time: %s\n", ctime(&t)); return 0; } & Date
INVENTORY MANAGEMENT
/*THIS FUNCTION IS USED FOR CLEAR SCREEN LINE BY LINE*/ void animation() { for (i=45; i>=1; i--) { delay(30) ; gotoxy(1,i) ; clreol() ; } for (i=1; i<=20; i++) { clreol() ; delay(40) ; gotoxy(1,i) ; } }
/*THIS FUNCTION IS USED FOR DESIGN BACKGROUND */ void shape() { t(); for(i=12;i<=72;i++) { gotoxy(i,10); //the 72th column is reached. //This 'FOR' loop will print a combination of
printf("%c",219);
INVENTORY MANAGEMENT
gotoxy(i,14); printf("%c",205); gotoxy(i,17); printf("-"); gotoxy(i,20); printf("-"); gotoxy(i,23); printf("-"); gotoxy(71,28); printf("%c",219); gotoxy(i-1,28); printf("%c",219); }
for(i=10;i<=28;i++) {
//This 'FOR' loop will print asteriks 'I'
//vertically till the 17th row is reached. gotoxy(11,i); printf("%c",219); gotoxy(72,i); printf("%c",219);
for(i=15;i<=27;i++) {
//This 'FOR' loop will print '|' sign
//vertically till the 17th row is reached. gotoxy(40,i); printf("%c",179);
INVENTORY MANAGEMENT
} }
//=========================== ========================= void ventry(char t[],int code) { int i=0; if(code==0) { while((t[i]=getch())!='\r' && i<30)
VALIDAITON
if((t[i]>=97 && t[i]<=122)||'\b' || (t[i]>=65 && t[i]<=90) || t[i]==32 || t[i]==8 ||t[i]=='@'||t[i]=='.') { printf("%c",t[i]); i++; } } else if(code==1) { while((t[i]=getch())!='\r' && i<10) if((t[i]>=48 && t[i]<=57) || t[i]==46 || t[i]==8 || t[i]=='-') { printf("%c",t[i]); i++; } } else if(code==2) {
INVENTORY MANAGEMENT
while((t[i]=getch())!='\r' && i<30) if((t[i]>=97 && t[i]<=122) || (t[i]>=65 && t[i]<=90) ||(t[i]>=48 && t[i]<=57) || t[i]==32 || t[i]==8 ||t[i]=='@'||t[i]=='.') { printf("%c",t[i]); i++; } } t[i]='\0'; } //=============================================== ============= void box() { for(i=5;i<=75;i++) { gotoxy(i,5); //the 72th column is reached. //This 'FOR' loop will print a combination of
printf("%c",219); gotoxy(74,40); printf("%c",219); gotoxy(i,40); printf("%c",219); }
for(i=5;i<=40;i++) {
//This 'FOR' loop will print asteriks 'I'
//vertically till the 17th row is reached. gotoxy(5,i); printf("%c",219);
INVENTORY MANAGEMENT
gotoxy(75,i); printf("%c",219); }
} //===========================FOR SCREEN======================== void welcome() { char uname[10],username[10],passward[10]; int ch; clrscr(); gotoxy(20,10); textcolor(WHITE+BLINK); cprintf("<<<<<<<<< WELCOME TO INVENTORY MANAGEMENT STORE >>>>>>>>>>"); sleep(3); } //==========SUPPLIER INFO================================ void supp_info() { int c; do { int i; char choice; WELCOME
INVENTORY MANAGEMENT
window(1,1,80,50); textbackground(LIGHTBLUE); textcolor(LIGHTGRAY); clrscr(); gotoxy(25,6); textcolor(GREEN+BLINK); cprintf("***** INVENTORY STORE ******"); gotoxy(8,8); printf("This Project is Created By "); gotoxy(35,8); textcolor(15+BLINK); cprintf("- FARHIN & ROLY - "); shape(); gotoxy(36,12); textcolor(BLUE+BLINK); cprintf("SUPPLIER INFO"); gotoxy(15,16); printf("[1] ADD NEW SUPPLIER."); gotoxy(15,19); printf("[2] DISPLAY SUPPLIER LIST"); gotoxy(15,22); printf("[3] EDIT EXISTING SUPPLIER"); gotoxy(41,16); printf("[4] SEARCH SUPPLIER"); gotoxy(41,19); printf("[5] MAIN MENU ");
INVENTORY MANAGEMENT
gotoxy(11,30); textcolor(LIGHTGRAY); cprintf("PLEASE SELECT A CHOICE: "); c = (getche()); switch (c) //This 'SWITCH' structure will ask the user for input from [1] to [4] and will display error on Invalid Entry. { case '1': animation(); supp_entry(); break; //It will call the supp_menu() funtion to allow user to add, save, edit etc. record into supplier menu . case '2': animation(); supp_list(); break; case '3' :animation(); sup_update(); break; case '4': search(); break; case '5':animation(); main_menu(); } }while(c != '5'); option [9] is entered. } //========FOR SUPPLIERS ENTRY================= void supp_entry() { char ch; FILE *fp; //This 'WHILE' loop will continue till the Exit
INVENTORY MANAGEMENT
clrscr();
fp=fopen("[Link]","a"); if(fp==NULL) { printf("\n Cannot open file!!"); exit(0); } clrscr(); ch='y'; while(ch=='y') { clrscr(); //printf("\n\t\t Supplier Record Insert : \n\n"); textcolor(14); t(); box(); gotoxy(18,9); cprintf(" *********** SUPPILER ENTRY ************* "); gotoxy(12,11); cprintf("=> ENTER SUPPLIER ID : "); ventry(temp1.supp_id,1); flushall(); gotoxy(12,13); cprintf("=> ENTER SUPPLIER NAME : "); ventry(temp1.supp_name,0);
INVENTORY MANAGEMENT
flushall(); gotoxy(12,15); cprintf("=> ENTER CITY : "); ventry([Link],0);
flushall(); gotoxy(12,17); cprintf("=> ENTER CONTACT NO.: "); ventry(temp1.mob_no,1);
flushall(); gotoxy(12,19); cprintf("=> ENTER EMAIL ID: "); ventry([Link],0);
gotoxy(15,25); printf("Do you Want to save this record (y/n)? : "); ch=getch(); if(ch=='y' || ch=='Y') { fprintf(fp,"%s %s %s %s\n",temp1.supp_id,temp1.supp_name,temp1.mob_no, [Link],[Link]); %s
fprintf(fp,"\n");
INVENTORY MANAGEMENT
fflush(stdin); //textcolor(10); gotoxy(15,28); printf("More entries [y/n]"); ch=getche();
} } fclose(fp);
//=========FOR SUPPLIER DISPLAY LIST ========== void supp_list() { char ch; int j; clrscr(); ptr1=fopen("[Link]","r"); if(ptr1==NULL) { printf("\n\t Can not open File! "); exit(0); } clrscr(); box();
INVENTORY MANAGEMENT
t(); gotoxy(20,38); printf("Press Enter to go to SUPPLIER MENU ..........."); textcolor(GREEN); gotoxy(25,8); textcolor(GREEN+BLINK); cprintf("************* VIEW OF SUPPLIER ***************"); textcolor(WHITE);
gotoxy(10,10); cprintf("ID. SUPPLIER NAME. gotoxy(12,12); i=14; [Link]. CITY. EMAIL");
printf("=========================================== ===================");
while(fscanf(ptr1,"%s %s %s %s %s",temp1.supp_id,temp1.supp_name,[Link],temp1.mob_no,temp1 .email)!=EOF)
{ gotoxy(11,i); printf(" %s",temp1.supp_id); gotoxy(15,i); printf(" %s",temp1.supp_name); gotoxy(30,i);
INVENTORY MANAGEMENT
printf(" %s",[Link]); gotoxy(40,i); printf(" %s",temp1.mob_no); gotoxy(52,i); printf(" %s",[Link]); i++;
} getche(); }
//======================search supplier==================
void search() { int sh; clrscr(); box(); gotoxy(17,7); printf("****** Two options available to search *****"); gotoxy(15,9); printf("[ 1 ] - Search by ID number ."); gotoxy(15,11); printf("[ 2 ] - Search by Name ."); gotoxy(17,15);
INVENTORY MANAGEMENT
printf("Enter your choice:: "); sh=toupper(getch());
switch(sh) { case '1': search_id(); break;
case '2': search_name(); break;
default: gotoxy(18,18); printf("\a\xDB\xDB wrong entry try again"); getch(); } getche();
/****************************SEARCH BY ID*********************************/
void search_id()
INVENTORY MANAGEMENT
char id[6]; clrscr(); box(); ptr1=fopen("[Link]","r"); gotoxy(13,8); printf("\xDB\xDB\xB2 Enter id to be searched:"); scanf("%s",&id); gotoxy(12,14); cprintf("ID. SUPPLIER NAME. CITY. gotoxy(12,16); i=18; printf("=========================================== ==================="); [Link]. EMAIL");
while(fscanf(ptr1,"%s %s %s %s %s",temp1.supp_id,temp1.supp_name,temp1.mob_no,[Link],temp1 .email)!=EOF) { if(strcmp(temp1.supp_id,id)==0) {
gotoxy(11,i); printf(" %s",temp1.supp_id); gotoxy(15,i); printf(" %s",temp1.supp_name);
INVENTORY MANAGEMENT
gotoxy(30,i); printf(" %s",[Link]); gotoxy(40,i); printf(" %s",temp1.mob_no); gotoxy(52,i); printf(" %s",[Link]); i++;
gotoxy(20,23); textcolor(YELLOW+BLINK); cprintf("Press Any key to go to SUPPLIER MENU ..........."); break; } } if(strcmp(temp1.supp_id,id)!=0) { printf("Record not found!"); } fclose(ptr1); }
/*****************************search by name******************************/
void search_name() {
INVENTORY MANAGEMENT
char name[20]; clrscr(); box(); ptr1=fopen("[Link]","rb"); gotoxy(13,8); printf("\xDB\xDB\xB2 Enter Supplier Name to be searched:"); scanf("%s",&name); gotoxy(12,14); cprintf("ID. SUPPLIER NAME. CITY. gotoxy(12,16); i=18; printf("=========================================== ==================="); [Link]. EMAIL");
while(fscanf(ptr1,"%s %s %s",temp1.supp_id,temp1.supp_name,temp1.mob_no, [Link],[Link])!=EOF) { if(strcmp(temp1.supp_name,name)==0) { gotoxy(11,i); printf(" %s",temp1.supp_id); gotoxy(15,i); printf(" %s",temp1.supp_name); gotoxy(30,i); printf(" %s",[Link]); gotoxy(40,i);
%s
%s
INVENTORY MANAGEMENT
printf(" %s",temp1.mob_no); gotoxy(52,i); printf(" %s",[Link]); i++; gotoxy(20,23); textcolor(YELLOW+BLINK); cprintf("Press Any key to go to SUPPLIER MENU ..........."); break; } } if(strcmp(temp1.supp_name,name)!=0) { gotoxy(5,10); textcolor(YELLOW+BLINK); cprintf("Record not found!"); }
fclose(ptr1); }
//============SUPPLIER UPDATE=================
void sup_update() { int i;
INVENTORY MANAGEMENT
char ch,sid[6]; FILE *ft; clrscr(); box(); ptr1=fopen("[Link]","rb+"); if(ptr1==NULL) { printf("\n\t Can not open file!! "); exit(0); } gotoxy(18,10); printf("****** Modifying Supplier *******"); gotoxy(12,13); printf("Enter the supplier ID : "); flushall(); scanf("%s",&sid); gotoxy(12,15); printf("Sure To Update ....(y/n)? : \t"); ch=getch(); if(ch=='y' || ch=='Y') { ft=fopen("[Link]","w"); if(ft==NULL) { printf(" Can not open file");
INVENTORY MANAGEMENT
exit(1); } else {
while(fscanf(ptr1,"%s %s %s %s",temp1.supp_id,temp1.supp_name,temp1.mob_no, [Link],[Link])!=EOF) { if(strcmp(temp1.supp_id,sid)==0) { gotoxy(12,17); printf("Existing Record : ");
%s
printf("%s\t %s \t%s %s",temp1.supp_id,temp1.supp_name,temp1.mob_no, [Link],[Link]); gotoxy(12,21); printf("Enter New Name : "); flushall(); scanf("%s",&temp1.supp_name); gotoxy(12,23); printf("Enter New mobile no: "); flushall(); scanf("%s",temp1.mob_no); gotoxy(12,25); printf("Enter New City : "); flushall();
\t%s
\t
INVENTORY MANAGEMENT
scanf("%s",[Link]); gotoxy(12,27); printf("Enter New email : "); flushall(); scanf("%s",[Link]);
fprintf(ft,"%s %s %s %s %s\n",temp1.supp_id,temp1.supp_name,temp1.mob_no,[Link],tem [Link]); // fprintf(ft,"\n"); fflush(stdin);
} else { fprintf(ft,"%s %s %s %s %s\n",temp1.supp_id,temp1.supp_name,temp1.mob_no,[Link],tem [Link]); fflush(stdin); } } } fclose(ft); fclose(ptr1); remove("[Link]"); rename("[Link]","[Link]"); } }
INVENTORY MANAGEMENT
//============END FUNCTION===================
OF
SUPPLIER
//====================================CUSTMER INFO================= void cust_info() { int c;
do{ int i;
char choice; window(1,1,80,50); textbackground(BLUE); textcolor(LIGHTGRAY);
clrscr();
gotoxy(25,6); textcolor(GREEN+BLINK); cprintf("***** INVENTORY STORE ******"); gotoxy(8,8); printf("This Project is Created By ");
INVENTORY MANAGEMENT
gotoxy(35,8); textcolor(15+BLINK); cprintf("- FARHIN & ROLY - ");
shape(); gotoxy(36,12); textcolor(YELLOW+BLINK); cprintf("CUSTOMER INFO"); gotoxy(15,16); printf("[1] ADD NEW CUSTOMER.");
gotoxy(15,19); printf("[2] DISPLAY CUSTOMER LIST");
gotoxy(15,22); printf("[3] EDIT EXISTING CUSTOMER"); gotoxy(41,16); printf("[4] SEARCH CUSTOMER"); gotoxy(41,19); printf("[5] MAIN MENU "); gotoxy(11,30); textcolor(LIGHTGRAY); cprintf("PLEASE SELECT A CHOICE: ");
c = (getche());
INVENTORY MANAGEMENT
switch (c) //This 'SWITCH' structure will ask the user for input from [1] to [4] and will display error on Invalid Entry. {
case '1': animation(); cust_entry(); break; //It will call the supp_menu() funtion to allow user to add, save, edit etc. record into supplier menu .
case '2': animation(); cust_list(); break; case '3' :animation(); cust_update(); break;
case '4': cust_search(); break;
case '5':animation(); main_menu(); } }while(c != '5'); [9] is entered. } //This 'WHILE' loop will continue till the Exit option
//========FOR CUSTOMER ENTRY================= void cust_entry() { char ch; FILE *fp;
INVENTORY MANAGEMENT
clrscr(); fp=fopen("[Link]","a"); if(fp==NULL) { printf("\n Cannot open file!!"); exit(0); } clrscr(); ch='y'; while(ch=='y') { clrscr(); //printf("\n\t\t Customer Record Insert : \n\n"); textcolor(14); t(); gotoxy(14,3); cprintf(" *********** CUSTOMER ENTRY ************* "); gotoxy(7,5); cprintf("=> ENTER CUSTOMER ID : "); ventry(temp_c.cust_id,1); flushall(); gotoxy(7,7); cprintf("=> ENTER CUSTOMER NAME : "); ventry(temp_c.cust_name,0);
flushall();
INVENTORY MANAGEMENT
gotoxy(7,9); cprintf("=> ENTER CITY : "); ventry(temp_c.city,0);
flushall(); gotoxy(7,11); cprintf("=> ENTER CONTACT NO.: "); ventry(temp_c.mob_no,1);
flushall(); gotoxy(7,13); cprintf("=> ENTER EMAIL ID: "); ventry(temp_c.email,0);
gotoxy(5,15); printf("\nDo you Want to save this record (y/n)? : "); ch=getch(); if(ch=='y' || ch=='Y') { fprintf(fp,"%s %s %s %s\n",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email); %s
fprintf(fp,"\n"); fflush(stdin); textcolor(10);
INVENTORY MANAGEMENT
gotoxy(5,20); cprintf("More entries [y/n] "); ch=getche(); } } fclose(fp); }
//=========FOR CUSTOMER DISPLAY LIST ========== void cust_list() { char ch; clrscr(); ptr1=fopen("[Link]","r"); if(ptr1==NULL) { printf("\n\t Can not open File! "); exit(0); } clrscr(); gotoxy(20,23); printf("Press Enter to go to CUSTOMER MENU ..........."); textcolor(GREEN); gotoxy(25,4); textcolor(GREEN+BLINK); cprintf("************* VIEW OF CUSTOMER ***************");
INVENTORY MANAGEMENT
textcolor(WHITE);
gotoxy(3,7); cprintf(" ID. CUSTOMER NAME. gotoxy(4,9); printf("=========================================== ============================="); CITY. [Link]. EMAIL");
while(fscanf(ptr1,"%s %s %s",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email)!=EOF)
%s
%s
{ printf("\n \xBA %s",temp_c.cust_id); printf(" \t%s",temp_c.cust_name); printf("\t printf("\t printf("\t } getche(); } //======================SEARCH CUSTOMER================== void cust_search() { int sh; clrscr(); gotoxy(17,6); %s",temp_c.city); %s",temp_c.mob_no); %s",temp_c.email);
INVENTORY MANAGEMENT
printf("\xDB\xDB\xB2 \xB2\xDB\xDB"); gotoxy(15,9);
Two options available
to
search
printf("[ 1 ] - Search by ID number ."); gotoxy(15,11); printf("[ 2 ] - Search by Name ."); gotoxy(17,15); printf("Enter your choice:: "); sh=toupper(getch());
switch(sh) { case '1': search_cid(); break;
case '2': search_cname(); break;
default: gotoxy(18,18); printf("\a\xDB\xDB wrong entry try again"); getch(); } getche();
INVENTORY MANAGEMENT
/*****************************SEARCH CUSTOMER BY ID**************************/
void search_cid() {
char id[6]; clrscr(); ptr1=fopen("[Link]","rb"); gotoxy(13,4); printf("\xDB\xDB\xB2 Enter id to be searched:"); scanf("%s",&id);
while(fscanf(ptr1,"%s %s %s",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email)!=EOF) { if(strcmp(temp_c.cust_id,id)==0) {
%s
%s
gotoxy(18,6); printf("CUSTOMER ID gotoxy(18,8); printf("CUSTOMER Name : %s",temp_c.cust_name); : %s",temp_c.cust_id);
INVENTORY MANAGEMENT
gotoxy(18,10); printf("Mobile No gotoxy(18,12); printf("City gotoxy(18,14); printf("email_Id :%s",temp_c.email); : %s",temp_c.city); : %s",temp_c.mob_no);
gotoxy(20,23); textcolor(YELLOW+BLINK); cprintf("Press Any key to go to CUSTOMER MENU ..........."); break; } } if(strcmp(temp_c.cust_id,id)!=0) { printf("Record not found!"); } fclose(ptr1); }
/*****************************SEARCH CUSTOMER BY NAME***********************/
void search_cname() {
char name[20];
INVENTORY MANAGEMENT
clrscr(); ptr1=fopen("[Link]","rb"); gotoxy(13,4); printf("\xDB\xDB\xB2 Enter Customer Name to be searched:"); scanf("%s",&name);
while(fscanf(ptr1,"%s %s %s",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email)!=EOF) { if(strcmp(temp_c.cust_name,name)==0) { gotoxy(18,6); printf("CUSTOMER ID gotoxy(18,8); : %s",temp_c.cust_id);
%s
%s
printf("CUSTOMER Name : %s",temp_c.cust_name); gotoxy(18,10); printf("Mobile No gotoxy(18,12); printf("City gotoxy(18,14); printf("email_Id :%s",temp_c.email); : %s",temp_c.city); : %s",temp_c.mob_no);
gotoxy(20,23); textcolor(YELLOW+BLINK); cprintf("Press Any key to go to CUSTOMER MENU ..........."); break;
INVENTORY MANAGEMENT
} } if(strcmp(temp_c.cust_name,name)!=0) { gotoxy(5,10); textcolor(YELLOW+BLINK); cprintf("Record not found!"); }
fclose(ptr1); }
//======================================CUSTOMER UPDATE=================
void cust_update() { int i;
char ch,cid[6]; FILE *ft; clrscr(); ptr1=fopen("[Link]","rb+"); if(ptr1==NULL) { printf("\n\t Can not open file!! ");
INVENTORY MANAGEMENT
exit(0); }
printf("\n\n\t\t Modifying customer : \n\n"); printf("\nEnter the CUSTOMER ID : \t"); scanf("%s",&cid); printf("\n\n Sure To Update ....(y/n)? : \t"); ch=getch(); if(ch=='y' || ch=='Y') { ft=fopen("[Link]","w"); //rewind(fp);
if(ft==NULL) { printf("\n Can not open file"); exit(1); } else { //rewind(fp); while(fscanf(ptr1,"%s %s %s %s",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email)!=EOF) { if(strcmp(temp_c.cust_id,cid)==0) { %s
INVENTORY MANAGEMENT
printf("\n Existing Record : \n"); printf("%s\t %s \t%s %s",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email); printf("\nEnter New Name : "); fflush(stdin); scanf("%s",&temp_c.cust_name); printf("\n Enter New mobile no: "); scanf("%s",temp_c.mob_no); printf("\n Enter New City : "); scanf("%s",temp_c.city); printf("\n Enter New email : "); scanf("%s",temp_c.email); \t%s \t
fprintf(ft,"%s %s %s\n",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email); fprintf(ft,"\n");
%s
%s
} else { fprintf(ft,"%s %s %s\n",temp_c.cust_id,temp_c.cust_name,temp_c.mob_no, temp_c.city,temp_c.email); } } } %s %s
INVENTORY MANAGEMENT
fclose(ft); fclose(ptr1); remove("[Link]"); rename("[Link]","[Link]"); } }
Reports
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
INVENTORY MANAGEMENT
FUNCTION DEFINATION
void box() :This function is used to draw the box on the screen in which the menu can be written.
void welcome() :-
This function is used to display the welcome screen before displaying the main menu
void remainder() :-
Function is used to check whether the quantity of any item is less than 10, if it is less than 10 it will display the message for the item on the main screen in red colour.
void main_menu() :-
Function is used to display the main menu of customer, supplier, item purchase, item sales, item stock and reports.
void bill() :-
Function is used to display the bill for the customer along with details like bill no, customer name, item name, quantity sold to the customer, total rate the customer has to pay.
void stock() :-
Function provides the detail of total stock of particular item.
void update_stock() :void entry() :-
Function provides the option to update the stock.
Function will open the form for item purchase which will have information like item id, item name, cabinet no, rack no, company name, supplier name, unit cost, quantity, manufacturing date, expiry date.
void search() :-
Function is use to perform search operation on supplier.
INVENTORY MANAGEMENT
void search_id() :Function is used to perform search operation on supplier based on supplier id.
void search_name() :Function is used to perform search operation on supplier based on supplier name.
void supp_entry() :Function is used to enter a new record in supplier.
void supp_list() :Function is used to display the list of all supplier.
void sup_update() :Function is used to update the supplier record.
void cust_search() :Fuction is used to perform search operation on customer.
void search_cid() :Function is used to perform search operation on customer based on id.
void search_cname() :Function is used to perform search operation on customer based on name.
void cust_entry() :Function is used to enter a new record in customer.
void cust_list() :Function is used to display the list of all customers.
void cust_update() :Function is used to update the customer record.
void report() :Function is used to display the sales reports .
void report3() :Function is used to display the profit reports .
void pur() :Function is used to display the purchase reports .
INVENTORY MANAGEMENT
System limitation
Cannot maintain a balance between too much and too little inventory. Cannot track inventory as it is transported between locations. No mechanism implemented for picking, packing and shipping items from a warehouse. No option available for cutting down on product obsolescence and spoilage.
INVENTORY MANAGEMENT
Future enhancement
Maintaining a balance between too much and too little inventory. Tracking inventory as it is transported between locations. Receiving items into a warehouse or other location. Picking, packing and shipping items from a warehouse. Keeping track of product sales and inventory levels. Cutting down on product obsolescence and spoilage.
INVENTORY MANAGEMENT
BIBLIOGRAPHY
1.
Programming in ANSI C by Balaguruswamy Programming in C by Manas Ghosh and Pradeep Dey
2.
INVENTORY MANAGEMENT