Project Repor Purchase Order System
Project Repor Purchase Order System
Project Repor Purchase Order System
PROJECT REPORT
ON
PURCHASE ORDER SYSTEM
Submitted to the
Bachelor of Commerce
(Computer Application)
Session 2013-2014
Under supervision of:
by:
Ms. Amangeet kaur
Lect,.
Deptt. of Comp.Sc. & App.
Submitted
Anju
B.Com. III(C.A.)
CERTIFICATE
CONTENTS
Certificate
Acknowledgement
Preface
Introduction to Problem area
Existing System
Limitation of the existing system
Proposed System
Advantages of Proposed System
System Analysis & Designing
Input Design
Output Design
Coding
Output
Limitations of Project
Further Scope
References
ACKNOWLEDGEMENT
ACKNOWLEDGEMENT
PREFACE
PREFACE
INTRODUCTION
TO
PROBLEM AREA
Through the quit entry we can come out from the main menu.
10
EXISTING SYSTEM
11
EXISTING SYSTEM
12
13
1)
2)
3)
4)
5)
System
now a days.
6)
Mistakes
can
be
in
14
this
system
because
PROPOSED SYSTEM
15
PROPOSED SYSTEM
The problem of the manual data processing led to the
introduction of computerized method.
The system
stores and then the bill are recorded in the store incoming
register. The store passes a slip to computer department.
The slip contains ifnormation regarding value of goods,
quality and item code regarding the goods.
The
16
17
18
SYSTEM ANALYSIS
AND
DESIGNING
19
SYSTEM ANALYSIS
Purchase is defined as any idle in coming resource of an
enterprise. It is physical work of goods kept for the purpose
of future affairs.
of
directions
goods
through
the
entire
service.
FIXED
PROBALISTIC
A)
ABC ANALYSIS:
When there may items are classified on the basis of
B)
MIN-MAX SYSTEM:
For each type of Inventory minimum level is set that
21
C)
INVENTORY RISKS:
Can be traced to three basic factors i.e. Price decline,
deterioration and obsolescence.
Price Decline:
May result from any increase in the market supply of
22
Product Deterioration:
May result due to holding of a product too long or when
Obsolescence:
Changing customer taste, particularly in high style
23
SYSTEM DESIGNING
Designing a software is most important phase of software phase of software
development. It requires careful planning, logical thinking on the part of
system designer. System design for proposed system comes under following
phases:
1. Input Design
2. Output Design
3. File Design
4. Input Design:
Input designing is a part of overall system designing which requires
careful attention as collection of input data is most expensive part of the
system. Inputs are used to detect errors to some extent in between the
programming procedures. I have included following inputs in my project of
"Trading Co. Transaction" When project is executed following main menu
is printed.
Main Menu
P
PRODUCT MASTER
ORDER PLACEMENT
VENDOR MASTER
ISSUE MASTER
REPORT MASTER
EXIT
When first option is selected then Received Material Menu will be displayed
with data entry regarding purchases of new goods.
24
Good Code:
It is the number given to product for identification. This number
should be falling within 1,2,3 numbers which are specified.
Good Name:
It tells the name of the Good which is sold to the customer. Without
knowing the name of Good one can't sell that Good.
Unit Price:
It tells the price of the Good. It tells how much the Good costs and
gives its unit price.
OUTPUT DESIGN:
Outputs are required to produce result of processing to the user. Output will
be in the form of a screen where different options will be displayed. In
output designing there is report menu. IT is fourth option of main menu. It
gives the output design of the system. It has been further divided to three
options given below.
ISSUE MASTER
E
ISSUE ENTRY
25
EXIT
ITEM REPORT
ISSUE REPORT
EXIT
FILE DESIGN
struct
{char pcode[5};
char pname[20];
char desc[20];
char type[3];
char unitp[5];
char qty[5];
char max[5];
char min[5];
}product, mproduct;
This structure defines the product details in respect to there data type.
struct
{char pcode[5];
char pname[20];
char desc[20];
char min[3];
char qty[5];
char max[5];
26
char unitp[5];
char type[3];
}item;
This structure defines the issue item details in respect to there data type.
char pcode[5] : It defines the product code.
char pname[20] : It defines the product name.
char desc[20] : It defines the description of goods.
char min[3] : It determines the min qty.
char qty[5] : Current qty.
char max[5] : Maximum qty.
char unitp[5] : Unit Price
char type[3] : Goods type
The basic data types are same so major data variables are defined.
27
CODING
28
/*
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<string.h>
#include<process.h>
#include<graphics.h>
#include<ctype.h>
struct
{ char pcode[5];
char pname[20];
char desc[20];
char type[3];
char unitp[5];
char qty[5];
char max[5];
char min[5];
}product,mproduct;
struct
{
char pcode[5];
char pname[20];
char desc[20];
char min[3];
char qty[5];
char max[5];
char unitp[5];
char type[3];
}item;
struct
{ char vcode[5];
char vname[20];
char adde[20];
char city[15];
char contno[10];
char parti[15];
}vender,mvender;
struct
{ char ocode[5];
char qty[8];
char icode[5];
char vcode[5];
char vname[20];
char qtyj[5];
char qtyr[5];
char topaid[5];
char topay[5];
}order,order1,morder;
void main()
{
char ch;
void pmenu(),omenu(),vmenu(),rmenu();
int gd=DETECT,gm=0;
initgraph(&gd,&gm," ");
clrscr();
29
settextstyle(1,0,4);
outtextxy(190,50,"PROJECT");
outtextxy(250,140,"ON");
outtextxy(150,220,"PURCHASE ORDER");
outtextxy(200,300,"SYSTEM");
settextstyle(1,0,3);
outtextxy(250,400,"press any key to continue");
getch();
closegraph();
clrscr();
initgraph(&gd,&gm," ");
settextstyle(1,0,4);
outtextxy(100,40,"PURCHASE ORDER SYSTEM");
settextstyle(1,0,3);
getch();
while(1)
{
clrscr();
setcolor(15);
setfillstyle(1,RED);
rectangle(50,30,550,350);
floodfill(30,50,15);
settextstyle(1,0,3);
outtextxy(100,50, "**** PURCHASE ORDER SYSTEM ****");
outtextxy(160,140," P: PURCHASE PRODUCT");
outtextxy(160,170," O: ORDER PLACING");
outtextxy(160,200," V: VENDOR DATA");
outtextxy(160,230," R: REPORT ");
outtextxy(160,260," E: EXIT");
outtextxy(185,290," ENTER YOUR CHOICE");
ch=getch();
ch=toupper(ch);
switch(ch)
{case 'P' : pmenu();break;
case 'O' : omenu();break;
case 'V' : vmenu();break;
case 'R' : rmenu();break;
case 'E' : break;
}
if (ch=='E')
break;}
}
void pmenu()
{char ch1;
clrscr();
while(1)
{
int gd=DETECT,gm=0;
initgraph(&gd,&gm," ");
clrscr();
setcolor(4);
setfillstyle(1,RED);
rectangle(50,30,550,350);
setcolor(WHITE);
floodfill(30,50,4);
settextstyle(1,0,3);
outtextxy(140,50,"PURCHASE PRODUCT");
outtextxy(160,140,"E : DATA ENTERY MODULE");
outtextxy(160,170,"M : DATA MODIFICATION MODULE");
outtextxy(160,200," Q : DATA QUERY MODULE");
outtextxy(160,230,"X: QUIT");
30
if(ch1=='X')
break;
}
void omenu()
{char ch2;
clrscr();
while(1)
{int gd=DETECT,gm=0;
initgraph(&gd,&gm," ");
setcolor(4);
setfillstyle(1,RED);
rectangle(50,30,550,350);
setcolor(WHITE);
floodfill(30,50,4);
settextstyle(1,0,3);
outtextxy(140,50," ORDER PLACE");
outtextxy(80,110,"R : DATA ENTERY MODULE");
outtextxy(80,140,"M : DATA MODIFICATION MODULE");
outtextxy(80,170,"G : GOOD RECEIVE ENTRY MODULE");
outtextxy(80,200,"Q : DATA QUERY MODULE");
outtextxy(80,230,"A : AMOUNT PAYMENT ENTRY MODULE");
outtextxy(80,260,"X : EXIT");
outtextxy(80,290,"enter your choice....." );
ch2=getch();
ch2=toupper(ch2);
switch(ch2)
{case 'R': oentry();break;
case 'M': omodi();break;
case 'Q': oquery();
break;
case 'G': ogood();break;
case 'A': oamount();
break;
case 'X': break;
}
if(ch2=='X')
break;
}
}
void vmenu()
{ char ch3;
clrscr();
while(1)
31
{int gd=DETECT,gm=0;
initgraph(&gd,&gm," ");
setcolor(4);
setfillstyle(1,RED);
rectangle(50,30,550,350);
setcolor(WHITE);
floodfill(30,50,4);
settextstyle(1,0,3);
outtextxy(140,50," VENDOR DATA");
outtextxy(160,110,"E : DATA ENTERY MODULE");
outtextxy(160,140,"M : DATA MODIFICATION MODULE");
outtextxy(160,170,"Q: DATA QUERY MODULE");
outtextxy(160,200,"X : EXIT");
outtextxy(180,230,"enter your choice....." );
ch3=getch();
ch3=toupper(ch3);
switch(ch3)
{case 'E': ventry();break;
case 'M': vmodi();break;
case 'Q': vquery();break;
case 'X': break;
}
}
}
if(ch3=='X')
break;
void rmenu()
{char ch4;
clrscr();
while(1)
{
int gd=DETECT,gm=0;
initgraph(&gd,&gm," ");
setcolor(4);
setfillstyle(1,RED);
rectangle(50,30,550,350);
setcolor(WHITE);
floodfill(30,50,4);
setcolor(WHITE);
settextstyle(1,0,3);
outtextxy(140,50," REPORT");
outtextxy(160,110,"I : ITEM REPORT");
outtextxy(160,140,"V : VENDOR REPORT");
outtextxy(160,170,"O: ORDER REPORT");
outtextxy(160,200,"G: GOOD RECEVING REPORT");
outtextxy(160,230,"A: AMOUNT PAYMENT REPORT");
outtextxy(160,260,"X : EXIT");
ch4=getch();
ch4=toupper(ch4);
switch(ch4)
{case 'I':irep();break;
case 'V':vrep();break;
case 'O':orep();break;
case 'G':grep();break;
case 'A':prep();break;
32
case 'X':break;
}
if(ch4=='X')
break;
}
}
scom(char a[], char b[], int n)
{ int i,r=1;
for(i=0;i<n;++i)
if( a[i]!=b[i])
r=0;
return r;
}
entry()
{char ch='Y',res;
int i,n;
FILE * fp;
fp=fopen("item.dat","ar+");
while(toupper(ch)=='Y')
{closegraph();
clrscr();
gotoxy(10,5);printf(" **** DATA ENTRY MODULE ****");
gotoxy(10,7);printf("
CODE OF PRODUCT
");
gotoxy(10,8);printf("
NAME OF PRODUCT
");
gotoxy(10,9);printf("
DESCRIPTION
");
gotoxy(10,10);printf("
TYPE
");
gotoxy(10,11);printf("
PRINCE PER UNIT
");
gotoxy(10,12);printf("
QUANTITY
");
gotoxy(10,13);printf("
MAX. QTY.
");
gotoxy(10,14);printf("
MIN. QTY.
");
gotoxy(38,7);gets(product.pcode);
gotoxy(38,8);gets(product.pname);
gotoxy(38,9);gets(product.desc);
gotoxy(38,10);gets(product.type);
gotoxy(38,11);gets(product.unitp);
gotoxy(38,12);gets(product.qty);
gotoxy(38,13);gets(product.max);
gotoxy(38,14);gets(product.min);
gotoxy(20,15);printf("Entries Correct Y/N");
res=getch();
if(toupper(res)=='Y')
{ for(i=0;i<=4;++i)
product.pcode[i]=toupper(product.pcode[i]);
for(i=0;i<=19;++i)
product.pname[i]=toupper(product.pname[i]);
for(i=0;i<=19;++i)
product.desc[i]=toupper(product.desc[i]);
for(i=0;i<=2;++i)
product.type[i]=toupper(product.type[i]);
for(i=0;i<=4;++i)
product.unitp[i]=toupper(product.unitp[i]);
for(i=0;i<=4;++i)
product.qty[i]=toupper(product.qty[i]);
33
for(i=0;i<=4;++i)
product.max[i]=toupper(product.max[i]);
for(i=0;i<=4;++i)
product.min[i]=toupper(product.min[i]);
n=strlen(product.pcode);
con(product.pcode,n,5);
n=strlen(product.pname);
con(product.pname,n,20);
n=strlen(product.desc);
con(product.desc,n,20);
n=strlen(product.type);
con(product.type,n,3);
n=strlen(product.unitp);
con(product.unitp,n,5);
n=strlen(product.qty);
con(product.qty,n,5);
n=strlen(product.max);
con(product.max,n,5);
n=strlen(product.min);
con(product.min,n,5);
fwrite(&product,sizeof(product),1,fp);
}
gotoxy(1,23);printf("Press Y to continue");
ch=getch();
}
fclose(fp);
return;
}
con(char sa[],int n,int tlen)
{int i;
for(i=0;i<n;++i)
sa[i]=toupper(sa[i]);
for(i=n;i<tlen;++i)
sa[i]=' ';
return;
}
modi()
char ch='Y',res;
char mpcode[5];
char mpname[20];
char mdesc[20];
char mtype[3];
char munitp[5];
char mqty[5];
char mmax[5];
char mmin[5];
int i,count=0,recsize=sizeof(product),n,l1;
FILE *fp;
fp=fopen("item.dat","r+");
while(toupper(ch)=='Y')
{ closegraph();
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA MODIFICATION MODULE ***");
gotoxy(10,7);printf("
CODE OF PRODUCT
");
34
gotoxy(10,8);printf("
NAME OF PRODUCT
");
gotoxy(10,9);printf("
DESCRIPTION
");
gotoxy(10,10);printf("
TYPE
");
gotoxy(10,12);printf("
PRINCE PER UNIT
");
gotoxy(10,11);printf("
QUANTITY
");
gotoxy(38,7);gets(mpcode);
for(i=0;i<=4;++i)
mpcode[i]=toupper(mpcode[i]);
while(fread(&product,sizeof(product),1,fp)==1)
{n=strlen(mpcode);
if(scom(product.pcode,mpcode,n)==1)
{++count;
gotoxy(38,8);for(i=0;i<20;++i)
printf("%c",product.pname[i]);
gotoxy(38,9);for(i=0;i<20;++i)
printf("%c",product.desc[i]);
gotoxy(38,10);for(i=0;i<3;++i)
printf("%c",product.type[i]);
gotoxy(38,11);for(i=0;i<5;++i)
printf("%c",product.qty[i]);
gotoxy(38,12);for(i=0;i<5;++i)
printf("%c",product.unitp[i]);
gotoxy(38,8);gets(mpname);
gotoxy(38,9);gets(mdesc);
gotoxy(38,10);gets(mtype);
gotoxy(38,11);gets(mqty);
gotoxy(38,12);gets(munitp);
gotoxy(20,15);printf("Entries Correct Y/N : ");
res=getche();
if(toupper(res)=='Y')
{
n=strlen(product.pname);
con(product.pname,n,20);
n=strlen(product.desc);
con(product.desc,n,20);
n=strlen(product.type);
con(product.type,n,3);
n=strlen(product.qty);
con(product.qty,n,5);
n=strlen(product.unitp);
con(product.unitp,n,5);
fseek(fp,-recsize,SEEK_CUR);
fwrite(&product,sizeof(product),1,fp);
}
}
}
if(count==0)
{gotoxy(35,20);printf("record not found");}
gotoxy(1,23);printf("Press Y to Continue
ch=getch();
}
fclose(fp);
return;
}
query()
35
");
{ char ch='Y',res;
char mpcode[5];
int i,n,count=0;
FILE *fp;
fp=fopen("item.dat","r");
while(toupper(ch)=='Y')
{closegraph();
count=0;
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA QUERY MODULE ***");
gotoxy(10,7);printf("
CODE OF PRODUCT
");
gotoxy(10,8);printf("
NAME OF PRODUCT
");
gotoxy(10,9);printf("
DESCRIPTION
");
gotoxy(10,10);printf("
TYPE
");
gotoxy(10,12);printf("
PRINCE PER UNIT
");
gotoxy(10,11);printf("
QUANTITY
");
gotoxy(38,7);gets(mpcode);
for(i=0;i<=4;++i)
mpcode[i]=toupper(mpcode[i]);
while(fread(&product,sizeof(product),1,fp)!=0)
n=strlen(mpcode);
if (scom(product.pcode,mpcode,n)==1)
{ ++count;
gotoxy(38,8);for(i=0;i<20;++i)
printf("%c",product.pname[i]);
gotoxy(38,9);for(i=0;i<20;++i)
printf("%c",product.desc[i]);
gotoxy(38,10);for(i=0;i<3;++i)
printf("%c",product.type[i]);
gotoxy(38,11);for(i=0;i<5;++i)
printf("%c",product.qty[i]);
gotoxy(38,12);for(i=0;i<5;++i)
printf("%c",product.unitp[i]);
}
if(count==0)
{ gotoxy(30,15);printf("Record not found");}
gotoxy(1,23);printf("Press Y to Continue
ch=getch();
}
}
");
fclose(fp);
return;
oentry()
{
char ch='Y',res;
int i;
FILE *fp;
fp=fopen("order.dat","ar+");
while(toupper(ch)=='Y')
{closegraph();
clrscr();
gotoxy(10,5);printf(" *** DATA ENTRY MODULE *** ");
gotoxy(10,7);printf("
ORDER CODE
");
36
gotoxy(10,8);printf("
ITEM CODE
");
gotoxy(10,9);printf("
VENDOR CODE
gotoxy(10,10);printf("
VENDOR NAME
gotoxy(10,11);printf("
QUANTITY
gotoxy(38,7);gets(order.ocode);
gotoxy(38,8);gets(order.icode);
gotoxy(38,9);gets(order.vcode);
gotoxy(38,10);gets(order.vname);
gotoxy(38,11);gets(order.qty);
gotoxy(20,15);printf("Entries Correct Y/N");
res=getch();
if(toupper(res)=='Y')
{// clrscr();
for(i=0;i<=4;++i)
order.ocode[i]=toupper(order.ocode[i]);
for(i=0;i<=4;++i)
order.icode[i]=toupper(order.icode[i]);
for(i=0;i<=4;++i)
order.vcode[i]=toupper(order.vcode[i]);
for(i=0;i<=19;++i)
order.vname[i]=toupper(order.vname[i]);
for(i=0;i<=7;++i)
order.qty[i]=toupper(order.qty[i]);
fwrite(&order,sizeof(order),1,fp);
}
gotoxy(1,23);printf("press Y to continue....");
ch=getch();
}
fclose(fp);
return;
}
");
");
");
omodi()
{ char ch='Y',res;
char mocode[5];
char mqty[8];
char micode[5];
char mvcode[5];
char mvname[20];
int i,count=0,n,recsize=sizeof(order);
FILE *fp;
fp=fopen("order.dat","r+");
while(toupper(ch)=='Y')
{ closegraph();
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA MODIFICATION MODULE *** ");
gotoxy(10,7);printf("
ORDER CODE
");
gotoxy(10,8);printf("
ITEM CODE
");
gotoxy(10,9);printf("
VENDOR CODE
");
gotoxy(10,10);printf("
VENDOR NAME
");
gotoxy(10,11);printf("
QUANTITY
");
gotoxy(38,7);gets(mocode);
for(i=0;i<=4;++i)
mocode[i]=toupper(mocode[i]);
while(fread(&order,sizeof(order),1,fp)==1)
{ n=strlen(mocode);
if(scom(order.ocode,mocode,n)==1)
{++count;
37
gotoxy(38,8);for(i=0;i<5;++i)
printf("%c",order.icode[i]);
gotoxy(38,9);for(i=0;i<5;++i)
printf("%c",order.vcode[i]);
gotoxy(38,10);for(i=0;i<20;++i)
printf("%c",order.vname[i]);
gotoxy(38,11);for(i=0;i<8;++i)
printf("%c",order.qty[i]);
gotoxy(38,8);gets(micode);
gotoxy(38,9);gets(mvcode);
gotoxy(38,10);gets(mvname);
gotoxy(38,11);gets(mqty);
gotoxy(20,15);printf("Entries Are Correct Y/N....");
res=getche();
if(toupper(res)=='Y')
{ n=strlen(order.icode);
con(order.icode,n,5);
n=strlen(order.vcode);
con(order.vcode,n,5);
n=strlen(order.vname);
con(order.vname,n,20);
n=strlen(order.qty);
con(order.qty,n,8);
fseek(fp,-recsize,SEEK_CUR);
fwrite(&order,sizeof(order),1,fp);
}
}
}
{
}
}
if(count==0)
gotoxy(35,20);printf("RECORD NOT FOUND");}
gotoxy(1,23);printf("Press Y to continue");
ch=getch();
fclose(fp);
return;
oquery()
{
char ch='Y',res;
char mocode[5];
int i,n,count=0;
FILE * fp;
fp=fopen("order.dat","r");
while(toupper(ch)=='Y')
{closegraph();
count=0;
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA QUERY MODULE ***");
gotoxy(10,7);printf("
ORDER CODE
");
gotoxy(10,8);printf("
ITEM CODE
");
gotoxy(10,9);printf("
VENDOR CODE
");
gotoxy(10,10);printf("
VENDOR NAME
");
gotoxy(10,11);printf("
QUANTITY
");
gotoxy(38,7);gets(mocode);
for(i=0;i<=4;++i)
mocode[i]=toupper(mocode[i]);
while(fread(&order,sizeof(order),1,fp)!=0)
38
n=strlen(mocode);
if(scom(order.ocode,mocode,n)==1)
{ ++count;
gotoxy(38,8);for(i=0;i<8;++i)
printf("%c",order.qty[i]);
gotoxy(38,9);for(i=0;i<5;++i)
printf("%c",order.icode[i]);
gotoxy(38,10);for(i=0;i<5;++i)
printf("%c",order.vcode[i]);
gotoxy(38,11);for(i=0;i<20;++i)
printf("%c",order.vname[i]);
}
if(count==0)
{
gotoxy(30,15);printf("Record not found");
}
gotoxy(1,23);printf("Press Y to Continue
ch=getch();
}
fclose(fp);
return;
}
");
ventry()
{ char ch='Y',res;
int i;
FILE *fp;
fp=fopen("vender.dat","ar+");
while(toupper(ch)=='Y')
{closegraph();
clrscr();
gotoxy(10,5);printf(" *** DATA ENTRY MODULE ***
gotoxy(10,7);printf(" VENDOR CODE
gotoxy(10,8);printf(" VENDOR NAME
gotoxy(10,9);printf(" VENDOR ADDRESS
gotoxy(10,10);printf(" CITY
gotoxy(10,11);printf(" CONTACT NO.
gotoxy(10,12);printf(" PARTICULARS
gotoxy(38,7);gets(vender.vcode);
gotoxy(38,8);gets(vender.vname);
gotoxy(38,9);gets(vender.adde);
gotoxy(38,10);gets(vender.city);
gotoxy(38,11);gets(vender.contno);
gotoxy(38,12);gets(vender.parti);
gotoxy(20,15);printf("Entries Correct Y/N");
res=getch();
if(toupper(res)=='Y')
{for(i=0;i<=4;++i)
vender.vcode[i]=toupper(vender.vcode[i]);
for(i=0;i<=19;++i)
vender.vname[i]=toupper(vender.vname[i]);
for(i=0;i<=19;++i)
vender.adde[i]=toupper(vender.adde[i]);
for(i=0;i<=14;++i)
vender.city[i]=toupper(vender.city[i]);
39
");
");
");
");
");
");
");
for(i=0;i<=9;++i)
vender.contno[i]=toupper(vender.contno[i]);
for(i=0;i<=14;++i)
vender.parti[i]=toupper(vender.parti[i]);
fwrite(&vender,sizeof(vender),1,fp);
}
gotoxy(1,23);printf("press Y to continue....");
ch=getch();
}
fclose(fp);
return;
}
vmodi()
{
char ch='Y',res;
char mvcode[5];
char mvname[20];
char madde[20];
char mcity[15];
char mcontno[10];
char mparti[15];
int i,n,count=0,recsize=sizeof(vender);
FILE *fp;
fp=fopen("vender.dat","r+");
while(toupper(ch)=='Y')
{closegraph();
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA MODIFICATION MODULE *** ");
gotoxy(10,7);printf(" VENDOR CODE
");
gotoxy(10,8);printf(" VENDOR NAME
");
gotoxy(10,9);printf(" VENDOR ADDRESS
");
gotoxy(10,10);printf(" CITY
");
gotoxy(10,11);printf(" CONTACT NO.
");
gotoxy(10,12);printf(" PARTICULARS
");
gotoxy(38,7);gets(mvcode);
for(i=0;i<=4;++i)
mvcode[i]=toupper(mvcode[i]);
while(fread(&vender,sizeof(vender),1,fp)==1)
{n=strlen(mvcode);
if(scom(vender.vcode,mvcode,n)==1)
{++count;
gotoxy(38,8);puts(vender.vname);
gotoxy(38,9);puts(vender.adde);
gotoxy(38,10);puts(vender.city);
gotoxy(38,11);puts(vender.contno);
gotoxy(38,12);puts(vender.parti);
gotoxy(38,8);gets(mvname);
gotoxy(38,9);gets(madde);
gotoxy(38,10);gets(mcity);
gotoxy(38,11);gets(mcontno);
gotoxy(38,12);gets(mparti);
gotoxy(20,15);printf("Entries Are Correct Y/N....");
res=getch();
if(toupper(res)=='Y')
{n=strlen(mvcode);
fseek(fp,-recsize,SEEK_CUR);
fwrite(&vender,sizeof(vender),1,fp);
40
}
}
if(count==0)
{ gotoxy(35,20);printf("RECORD NOT FOUND");}
gotoxy(1,23);printf("Press Y to continue");
ch=getche();
fclose(fp);
return;
}
vquery()
{char ch='Y',res;
char mvcode[5];
int i,count=0;
FILE *fp;
fp=fopen("vender.dat","r");
while(toupper(ch)=='Y')
{closegraph();
count=0;
clrscr();
rewind(fp);
gotoxy(10,5);printf(" *** DATA QUERY MODULE ***");
gotoxy(10,7);printf(" VENDOR CODE
gotoxy(10,8);printf(" VENDOR NAME
gotoxy(10,9);printf(" VENDOR ADDRESS
gotoxy(10,10);printf(" CITY
gotoxy(10,11);printf(" CONTACT NO.
gotoxy(10,12);printf(" PARTICULARS
gotoxy(38,7);gets(mvcode);
for(i=0;i<=4;++i)
mvcode[i]=toupper(mvcode[i]);
while(fread(&vender,sizeof(vender),1,fp)!=0)
if(strcmp(vender.vcode,mvcode)==0)
{ ++count;
gotoxy(38,8);puts(vender.vname);
gotoxy(38,9);puts(vender.adde);
gotoxy(38,10);puts(vender.city);
gotoxy(38,11);puts(vender.contno);
gotoxy(38,12);puts(vender.parti);
}
if(count==0)
{
gotoxy(30,15);printf("Record not found");
}
gotoxy(1,23);printf("Press Y to Continue
");
ch=getch();
}
fclose(fp);
return;
}
oamount()
{
char ch='Y',res;
int i;
41
");
");
");
");
");
");
FILE *fp;
fp=fopen("order1.dat","ar+");
while(toupper(ch)=='Y')
{ closegraph();
clrscr();
gotoxy(20,5);printf(" *** AMOUNT PAYMENT ENTRY *** ");
gotoxy(10,7);printf(" ORDER CODE
");
gotoxy(10,8);printf(" ITEM CODE
");
gotoxy(10,9);printf(" VENDOR CODE
");
gotoxy(10,10);printf(" QUANTITY
");
gotoxy(10,11);printf(" AMOUNT TO BE PAY
");
gotoxy(10,12);printf(" QUANTITY REJECTED
");
gotoxy(10,13);printf(" QUANTITY RECEIVED
");
gotoxy(10,14);printf(" AMOUNT TO BE PAID
");
gotoxy(40,7);gets(order.ocode);
gotoxy(40,8);gets(order.icode);
gotoxy(40,9);gets(order.vcode);
gotoxy(40,10);gets(order.qty);
gotoxy(40,11);gets(order.topay);
gotoxy(40,12);gets(order.qtyj);
gotoxy(40,13);gets(order.qtyr);
gotoxy(40,14);gets(order.topaid);
gotoxy(20,17);printf("Entries Correct Y/N");
res=getch();
if(toupper(res)=='Y')
{
for(i=0;i<=4;++i)
order.ocode[i]=toupper(order.ocode[i]);
for(i=0;i<=4;++i)
order.icode[i]=toupper(order.icode[i]);
for(i=0;i<=4;++i)
order.vcode[i]=toupper(order.vcode[i]);
for(i=0;i<=4;++i)
order.qty[i]=toupper(order.qty[i]);
for(i=0;i<=4;++i)
order.topay[i]=toupper(order.topay[i]);
for(i=0;i<=4;++i)
order.qtyj[i]=toupper(order.qtyj[i]);
for(i=0;i<=4;++i)
order.qtyr[i]=toupper(order.qtyr[i]);
for(i=0;i<=4;++i)
order.topaid[i]=toupper(order.topaid[i]);
fwrite(&order,sizeof(order),1,fp);
}
gotoxy(1,23);printf("Press Y to continue.......");
ch=getche();
}
fclose(fp);
return;
}
ogood()
{
char ch='Y',res;
int i;
FILE *fp;
fp=fopen("order2.dat","ar+");
while(toupper(ch)=='Y')
{ closegraph();
clrscr();
42
43
while(fread(&product,sizeof(product),1,fp) !=0)
{
gotoxy(1,r);for(i=0;i<5;++i)
printf("%c",product.pcode[i]);
gotoxy(16,r);for(i=0;i<20;++i)
printf("%c",product.pname[i]);
gotoxy(30,r);for(i=0;i<5;++i)
printf("%c",product.max[i]);
gotoxy(39,r);for(i=0;i<5;++i)
printf("%c",product.qty[i]);
gotoxy(47,r);for(i=0;i<5;++i)
printf("%c",product.min[i]);
gotoxy(60,r);
if(atoi(product.qty)>atoi(product.max))
printf("Above");
else
{ if(atoi(product.qty)>=atoi(product.min))
printf("Normal");
else
printf("below");}
if(r<=22)
r++;
else
{
gotoxy(2,22);printf("press any key to continue");
getch();
clrscr();
gotoxy(40,3);printf("STOCK REPORT");
gotoxy(1,4);printf("___________________________________________________
__");
gotoxy(1,5);printf("prod.code
prod name
max
qty
min
");
gotoxy(1,6);printf("----------------------------------------------------");
r=10;
}
}
++r;
gotoxy(1,r);printf("--------------------------------------------------------------");
getche();
}
orep()
{
FILE *fp;
int r,i;
fp=fopen("order.dat","r");
closegraph();
clrscr();
gotoxy(40,3);printf("order report");
gotoxy(1,4);printf("-----------------------------------------------------");
gotoxy(1,5);printf("order code
icode
vcode
vname
qty ");
44
gotoxy(1,6);printf("-----------------------------------------------------");
r=8;
while(fread(&order,sizeof(order),1,fp) !=0)
{
gotoxy(1,r);for(i=0;i<5;++i)
printf("%c",order.ocode[i]);
gotoxy(15,r);for(i=0;i<5;++i)
printf("%c",order.icode[i]);
gotoxy(24,r);for(i=0;i<5;++i)
printf("%c",order.vcode[i]);
gotoxy(34,r);for(i=0;i<20;++i)
printf("%c",order.vname[i]);
gotoxy(51,r);for(i=0;i<8;++i)
printf("%c",order.qty[i]);
if(r<=22)
r++;
else
{
gotoxy(2,22);printf("press any key to continue");
getche();
clrscr();
gotoxy(30,3);printf("ORDER REPORT");
gotoxy(1,4);printf("--------------------------------------------------------");
gotoxy(1,5);printf("order.code
icode
vcode
vname
qty
");
gotoxy(1,6);printf("--------------------------------------------------------");
r=10;
}
}
++r;
gotoxy(1,r);printf("---------------------------------------------------------");
getch();
}
vrep()
{
FILE *fp;
int r;
fp=fopen("vender.dat","r");
closegraph();
clrscr();
gotoxy(40,3);printf("**** VENDER REPORT ****");
gotoxy(1,4);printf("-------------------------------------------------------------------");
gotoxy(1,5);printf("vender code
vender name
vender add.
city
contactno. ");
gotoxy(1,6);printf("-------------------------------------------------------------------");
r=8;
while(fread(&vender,sizeof(vender),1,fp) !=0)
{
gotoxy(1,r);puts(vender.vcode);
gotoxy(15,r);puts(vender.vname);
45
gotoxy(32,r);puts(vender.adde);
gotoxy(47,r);puts(vender.city);
gotoxy(57,r);puts(vender.contno);
if(r<=22)
r++;
else
{
gotoxy(1,4);printf("--------------------------------------------------------------");
gotoxy(1,5);printf("
vender code
vender name
vender
add.
city
contactno");
gotoxy(1,6);printf("---------------------------------------------------------------");
r=8;
}
} ++r;
gotoxy(1,r);printf("------------------------------------------------------------------");
getche();
}
grep()
{
FILE *fp;
int r;
fp=fopen("order2.dat","r");
closegraph();
clrscr();
gotoxy(20,3);printf("**** GOOD RECEVING REPORT ****");
gotoxy(1,4);printf("-------------------------------------------------------------");
gotoxy(1,5);printf("order code
icode
vcode
qty
qtyr
qtyj
topay");
gotoxy(1,6);printf("--------------------------------------------------------------");
r=8;
while(fread(&order,sizeof(order),1,fp) !=0)
{
gotoxy(1,r);puts(order.ocode);
gotoxy(15,r);puts(order.icode);
gotoxy(24,r);puts(order.vcode);
gotoxy(32,r);puts(order.qty);
gotoxy(39,r);puts(order.qtyr);
gotoxy(48,r);puts(order.qtyj);
gotoxy(58,r);puts(order.topay);
if(r<=22)
r++;
else
{
46
REPORT ****");
gotoxy(1,4);printf("-------------------------------------------------------------------");
gotoxy(1,5);printf("icode
vcode
qty
qtyr
qtyj
topay
topaid
");
gotoxy(1,6);printf("--------------------------------------------------------------------");
r=8;
while(fread(&order1,sizeof(order1),1,fp) !=0)
{
gotoxy(1,r);for(i=0;i<5;++i)
printf("%c",order1.icode[i]);
gotoxy(10,r);for(i=0;i<5;++i)
printf("%c",order1.vcode[i]);
gotoxy(19,r);for(i=0;i<8;++i)
printf("%c",order1.qty[i]);
gotoxy(26,r);for(i=0;i<5;++i)
printf("%c",order1.qtyr[i]);
gotoxy(33,r);for(i=0;i<5;++i)
printf("%c",order1.qtyj[i]);
gotoxy(41,r);for(i=0;i<5;++i)
printf("%c",order1.topay[i]);
gotoxy(51,r);for(i=0;i<5;++i)
printf("%c",order1.topaid[i]);
if(r<=22)
r++;
47
else
{
gotoxy(2,22);printf("press any key to continue");
getch();
clrscr();
gotoxy(30,3);printf("**** PAYMENT REPORT****");
gotoxy(1,4);printf("--------------------------------------------------------");
gotoxy(1,5);printf("icode
vcode
qty
qtyr
qtyj
topay
topaid");
gotoxy(1,6);printf("-------------------------------------------------------");
r=10;
}
}
++r;
gotoxy(1,r);printf("------------------------------------------------------");
getche();
}
LIMITATIONS OF
THE PROJECT
48
1.
2.
3.
4.
5.
6.
49
FURTHER SCOPE
50
FURTHER SCOPE
A development never ever can be fully summarized or
concluded. Still I will try my beset to conclude all the
concepts regarding my project.
1.
2.
3.
51
REFERENCES
52
REFERENCES
For the completion of this project, I have taken help from the
following books:
1.
2
3
Programming with C
Let us C
by Dennice Ritche
by Yashwant Kanitkar
by Dr. R.S. Gupta
Business management
B.D. Sharma
N.S. Bhalla
53