0% found this document useful (0 votes)
12 views10 pages

Darshini Field Work

The document is a fieldwork report from K.G College of Arts and Science, detailing a project on developing an employee payroll application using COBOL. It highlights the challenges of maintaining manual payroll systems and presents an automated solution to streamline the process. The report includes various modules for managing employee data and generating reports, along with source code snippets for the application.

Uploaded by

2232j19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views10 pages

Darshini Field Work

The document is a fieldwork report from K.G College of Arts and Science, detailing a project on developing an employee payroll application using COBOL. It highlights the challenges of maintaining manual payroll systems and presents an automated solution to streamline the process. The report includes various modules for managing employee data and generating reports, along with source code snippets for the application.

Uploaded by

2232j19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

K.

G COLLEGE OF ARTS AND SCIENCE


Affiliated to Bharathiar University Accredited by NAAC
ISO 9001:2015 Certified Institution
KGiSL Campus, Coimbatore – 641 035

Submitted By :

Reg. No. Name of the Students


2232J08 DHARSHINI .M

Faculty Coordinator
Dr. V. V. Gomathi

DEPARTMENT OF SOFTWARE SYSTEMS


& COMPUTER SCIENCE
Report of the Field Work

Academic Year 2023 – 2024

Program Name M.Sc. Software Systems & Computer Science

Program Code 32J

Course Name Data Structure

Course Code 23D

Semester II

Batch 2023

Submmited by 2232J08 DARSHINI .S

Faculty Coordinator Dr.VV.GOMATHI


( with designation ) Asst.Prof-Department of Software Systems
&Computer Science
DATE 13.03.2023

TITLE :
Developing an employee pay roll application by comparative any real time application
In COBOL.

ABSTRACT:
The actual problem is to maintain different database for an organization whose
Main purpose is to issue pay-slips for their employees every month working in various
departments of the organization and maintain details of all the departments , employees
with various grades , their designations and address details.
In the manual system it is difficult to maintain data and generating different
reports according to requesting transaction. In the present system it is becoming difficult
to issue pay-slip for all the employee every month by manually going through the various
Record of the organization that is the manager have to go through all the records of the
Organization of various departments of the and find out the employee working in a
particular department and go through his grade and he have to check the employee leaves
of that month, his earnings and his deductions along with his pf and all other deduction
Including his IT and savings. So, to perform all these activities it is becoming difficult to
the admin/manager every month.
Hence in order to overcome the difficulties of the organization the present
system is automated to perform all the activities of the organization.

INTRODUCTION
LOGIN SCREEN WINDOW
MAIN MENU
After you successful to login you will directly in to the main menu of the medical store
such as supplier, customer, medicine, report, bill, about and exit.
SUPPLIER MENU
In the image belo
In the image below, which is for the add new Customer module.
UPDATE CUSTOMER
In the image below, which is for the UPDATE Customer module.
LIST OF CUSTOMER
In the image below, which is for the List of Customer module.
MEDICINE MENU
In the image below, which is for the medicine menu module such as purchase new
medicine, sale medicine, stock of medicine, and search medicine.
PURCHASE NEW MEDICINE
In the image below, which is for the PURCHASE new medicine module.
STOCK OF MEDICINE
In the image below, which is for the Stock of medicine module.
PROFIT REPORT
In the image below, which is for the profit report module

OUTCOME

SOURCE CODE:

#include "pharmacist.h"
//generate random id for each drug

int rand_id(void) {

int num=0;

srand(time(0));

num= (rand() % (2000 - 1000 + 1)) + 1000;

return num;

//ad
printf("\nExpiry date: ");
scanf("%d %d
%d",&new_drug.expiry.day,&new_drug.expiry.month,&new_drug.expiry.year);
printf("\nPrice: ");
scanf("%d",&new_drug.price);

getchar();

printf("\nNumber of units to be added to inventory: ");


scanf("%d",&new_drug.stock);

fprintf(fp," %d %s %d %d %d %d %d %d %d
%d",new_drug.id,new_drug.name,new_drug.mfg.day,new_drug.mfg.month,new_
drug.mfg.year,new_drug.expiry.day,new_drug.expiry.month,new_
drug.expiry.year,new_drug.price,new_drug.stock);

printf("\nDrug added to inventory!");

fclose(fp);
return;

//delete drug

void delete_drug(char fname[]){

FILE *fp,*fp_tmp;

drug new_drug;

int found=0;

fp=fopen(fname,"r");

pharmacist person;

fscanf(fp,"%s %s",person.mobile,person.password);

if(feof(fp)){

fclose(fp);

printf("\nInventory empty!!!");

return;
}

fp_tmp=fopen("tmp.txt", "a");

if (!fp_tmp) {

fclose(fp);
fclose(fp_tmp);

printf("\nUnable to open temp file.");


return;
}
fprintf(fp_tmp,"%s %s",person.mobile,person.password);

int drug_id;
printf("\nDrug ID to be deleted: ");
scanf("%d",&drug_id);

while (fscanf(fp,"%d %s %d %d %d %d %d %d %d
%d",&new_drug.id,new_drug.name,&new_drug.mfg.day,&new_drug.mf

g.month,&new_drug.mfg.year,&new_drug.expiry.day,&new_drug.expiry

.month,&new_drug.expiry.year,&new_drug.price,&new_drug.stock)!=EOF
){

if (drug_id==new_drug.id)
{
printf("\nDrug found and deleted from inventory.");
found=1;
}
else {
sys_mon == 12 ? (sys_mon = 1) : ++sys_mon;

printf("\nAccount does not exist!");

fclose(fp);

return 2;
}

fscanf(fp,"%s %s",person.mobile,person.password);

fclose(fp);

char psw[11];
printf("\nEnter your password: ");

scanf("%s",psw);

getchar();

if (strcmp(person.password,psw) == 0) {

printf("\nYou have logged in!");

return 1;
}

else {

printf("\nYou have typed in the wrong password!");

return 0;
}
}

// Prints out the existing inventory of drugs void


print_stock(char fname[]){

FILE *fp;

drug new_drug;

pharmacist person;

fp=fopen(fname,"r");

fscanf(fp,"%s %s",person.mobile,person.password);

if(feof(fp)){
fclose(fp);

printf("\nInventory empty!!! No stocks to be displayed...");

return;
}

while(fscanf(fp,"%d %s %d %d %d %d %d %d %d
%d",&new_drug.id,new_drug.name,&new_drug.mfg.day,&new_drug.mfg
.month,&new_drug.mfg.year,&new_drug.expiry.day,&new_drug.expiry
.month,&new_drug.expiry.year,&new_drug.price,&new_drug.stock))
{

printf("\nID-%d %s\nMfg: %d/%d/%d\nExpiry: %d/%d/%d\nPrice: $%d\n%d left\


n",new_drug.id,
new_drug.name,new_drug.mfg.day,new_drug.mfg.month,new_drug.mfg.year,
new_drug.expiry.day,new_drug.expiry.month,new_drug.expiry.year,
new_drug.price,new_drug.stock);

if(feof(fp)){

break;
}
}

fclose(fp);

return;
}
STUDENT FACULTY HEAD OF THE
COORDINATOR DEPARTMENT
DHARSHINI.M Dr.V.V.GOMATHI Dr. ALWIN
PINAKAS JAMES

You might also like