Vous êtes sur la page 1sur 74

MODERN SENIOR SECONDARY SCHOOL

NANGANALLUR, CHENNAI 600 061


(Affiliated to the Central Board of Secondary Education, New Delhi)

COMPUTER PROJECT ON

PAYROLL PROCESSING SYSTEM

BONA FIDE CERTIFICATE

NAME REGISTRATION NUMBER :

: Mukesh Sheoran

This is to certify that this bona fide project work on PAYROLL PROCESSING system is done by MUKESH SHEORAN of standard XII of MODERN SENIOR SECONDARY SCHOOL, NANGANALLUR, CHENNAI 600 061 during the year 2010-11.

TEACHER INCHARGE

Submitted

for

the

ALL

INDIA

SENIOR

SECONDARY

SCHOOL

EXAMINATION 2010-11 held in the Computer Science Laboratory of MODERN SENIOR SECONDARY SCHOOL, NANGANALLUR, CHENNAI 600 061.

Date:

EXAMINER(S) 1.

2.

ACKNOWLEDGEMENT
I wish to thank the individuals who have provided assistance in shaping up this project and reviewing it to refinement: the school management, the schools Computer Science faculty and M/s Tata Consultancy Services (TCS). The technical assistance suggestions and encouragement that they provided were crucial to the completion of the project. I am also extremely thankful to our esteemed institution for extending the laboratory facilities for the successful completion of the project.

INDEX
Contents
01. Preview of the Project 02. Objective of the Project 03. Why was the subject chosen 04. User Manual 05. Source Code 06. Screen Layouts 07. Steps for Navigation 08. System Algorithm 09. System Flowchart 10. Checks and Validations 11. Limitations of the Project 12. Errors encountered and rectified 13. Future modification 14. Conclusion 15. Bibliography

PREVIEW OF THE PROJECT


1. Introduction to the Process Hero Co. is a cycle manufacturing organization in Ludhiana. There are various departments in this company viz. Production, Marketing & Sales and Servicing. The company pays its employees on the first of every month. To deal with the financial aspects, the organization has an Accounts Department. For the activities related to disbursal of salary, the Accounts Departments has the following responsibilities:
y y y y y

Employee Record Maintenance Loan/ Advances Disbursement Loan/ Advances Posting Payslip Generation P.F. Statement Generation

2. Process Steps 2.1 Employee Record Maintenance To disburse salary to employees, the Accounts Department needs various details like, Employee name, Designation, Basic pay, City in which he resides, details of advances and loans etc. For this a register called Employee Register is maintained by the Accounts Department. Whenever an employee joins the organization, his details are added to this register and when an employee leaves the organization, his details are struck off from the register. 2.2 Loan /Advance Disbursement The organization provides its employees the facility of taking loan/advance against salary and P.F. Recovery of this loan/ advance is done by equal monthly installments deducted from the employee s salary. An employee, who needs a loan or advance, gives an application on a prescribed form to his Divisional Incharge. The Divisional Incharge has the authority of sanctioning or rejecting the request. Once the request is sanctioned, it comes to the Accounts

Department. The Accounts Department gives the loan amount to the employee. This amount is deducted from the employee s salary in monthly installments until whole loan amount is recovered. 2.3 Loan/ Advance Posting After receiving the sanctioned application the accounts officer posts the loan/ advance, details in the Employee Register. He updates the loan/ advance amount, date of loan/ advance taken and the no. of installments in the relevant columns by the referring to the loan/ advance application form of that employee. After posting the details into the Employee Register, he writes POSTED on the application form. 2.4 Payslip Generation The Payslip is a statement related to salary, which is prepared and given to each employee along with the salary by the Accounts Department. It contains various earnings and deductions that contribute to the salary. By going through the payslip the employee can understand the complete breakup of the total salary. Following is the content of pay slip. When a payslip is generated, the Accounts Officer adds 1 to the installment paid column of Employee Register, to the account of those employees whose installment due is less than the installment paid. Once all installments are recovered from the employee, the Accounts Officer initials all the columns concerning loan/ advance of that employee. 2.5 Provident Fund Statement Generation

The Accounts Department prepares a statement showing the contribution of the employee and the company towards provident fund. In this statement the Accounts Department also shows the interest calculated. Interest is calculated by the following formula. Interest = (Jan s contribution x 11 + Feb. s contribution x 10 + ..) Where Rate is 13.43%

OBJECTIVE OF THE PROJECT


The objective of the Project is to study the existing manual system of payroll preparation, its strengths and negative points, benefits of computerization of the payroll system.
y

Generation of error-proof pay slips at the time of disbursement of salary Generation of Provident Fund statements Avoiding errors in posting of loans sanctioned and monthly installments recovered. Ease of preparing/printing error free statements without wastage of time and labor Scrutiny/verification of data, if done once, will be sufficient and accuracy of these figures when used for different purposes need not manually checked, every time.

WHY WAS THE SUBJECT CHOSEN


All the big companies with large work force will have different departments for operational convenience and efficiencies. While a centralized Accounts Department will monitor the Pay Roll and other Personnel related works, it will be labor intensive and there will be scope for errors in maintenance of the accounts.

This subject was chosen to fulfill the needs of the Accounts Departments of those companies or organization which face innumerable difficulties in the effective maintenance of the Payroll Systems.

If maintained properly, the Payroll system will help the management to access necessary Management Information Systems (MIS) for effective functioning and also for the easy retrieval of necessary records.

USER MANUAL

HARDWARE REQUIREMENTS You need a colour monitor and a keyboard with a Pentium IV processor at the minimum. A minimum memory of 256 MB

SOFTWARE REUIREMENTS Load Turbo C++ 3.0 compiler

INSTALLATION PROCEDURE: 1. Insert the given floppy /CD into the desired drive 2. Open the turbo C++ program. 3. Using the file menu, open the Payroll.cpp file in the CD/pendrive. 4. User will now see the source code of the program on the screen. 5. Now press Ctrl+F9 6. After pressing Ctrol+f9, you can jot down the errors and after correcting them, compile it, then press Ctril+F9 and then, Payroll.exe is created. 7. This program can also be executed in DOS prompt by typing C:\payroll, like an executable file.

SOURCE CODE
#include<fstream.h> #include<conio.h> #include<process.h> #include<string.h> #include<stdio.h> #include<dos.h> #include<math.h> #include<ctype.h> struct date d; struct dts { int day; int mon; int year; } ddif,dt; dts date_dif(dts a) { getdate(&d); if(a.year!=0) dt.year=d.da_year-a.year; dt.day=d.da_day-a.day; if(dt.day<0) { dt.mon--; dt.day=30+dt.day; } if(a.mon!=0) dt.mon=d.da_mon-a.mon; else dt.mon=0; if(dt.mon<0) { dt.year--; dt.mon=12+dt.mon; } return dt; }

class employee { public: int employee_code; long int pf_no; char department_code[5]; char employee_name[25]; char designation[20]; char house_status; char city_type; float basic_pay; float conveyance; float advance_loan_taken; float instalment_due; int total_instalments; int instalment_paid; dts loan_date; float vpf; void help(void); void addemployee(); void modemployee(int); void delemployee(int); void update_employee(); int check_emp_det(int,char*,char*); void print(); } s,s1; class loan_check { public: void get_loan(); void loan_status(); } y; class report { public: int report_no; char report_name[15]; char report_description[50]; void pfstate();

void summary(); void adv_loan(); void calc_payslip(); r;

void employee::help(void) { clrscr(); setbkcolor(7); settextstyle(7,HORIZ_DIR,5); outtextxy(15,20,"Welcome to HER0 Corporation"); settextstyle(2,HORIZ_DIR,5); outtextxy(60,100, "This project keeps record of Employee records "); delay(2); outtextxy(60,150, "This program is capable of holding any no. of Employees."); delay(2); outtextxy(60,200, "-In first option you can view and modify employee records"); delay(2); outtextxy(60,250, "-In second option you can apply or look up to the loan/advance details"); delay(2); outtextxy(60,300, "-In third option you can see the various reports of the records"); delay(2); outtextxy(60,350, "-And last option is Quit (Exit From payroll Window)"); delay(2); settextstyle(7,HORIZ_DIR,4); outtextxy(80,400,"Press any key to continue..."); getch(); }

void report::pfstate() { cout<<"\n\n\n\n\n\n\t\t\t*******P F STATEMENT******"; ifstream x; m: x.open("EMP.DAT"); cout<<"\n\nENTER THE EMPLOYEE CODE : "; char aa; int code; aa=getch(); code=aa-48; int count=0,i=0; while(x.read((char*)&s,sizeof(s))) { i++; if(s.employee_code==code) { clrscr(); cout<<"\n\n\n\n\n\n\t\t\t\tP F STATEMENT\n\t\t\t\t~ ~ ~~~~~~~~~"; cout<<"\n\n\nORGANISATION NAME : HERO COMPANY"; cout<<"\n\nEMPLOYEE CODE : "; cout<<s.employee_code; cout<<"\n\nEMPLOYEE NAME : "; puts(s.employee_name); cout<<"\n\n\n"; cout<<"MONTH OWN CONTRIBUTION ORGANISATION TOTAL REMARK"; cout<<"\n\nNAME CPF VPF CONTRIBUTION CONTRIBUTION\n\n "; float intr=0; float contribution=s.basic_pay*0.05; float tot=(s.basic_pay*0.10)+(s.basic_pay*s.vpf)+contribution; for(int i=1;i<=12;i++) { switch(i)

{ case 1:{cout<<"\nJANUARY ";break;} case 2:{cout<<"\nFEBRUARY ";break;} case 3:{cout<<"\nMARCH ";break;} case 4:{cout<<"\nAPRIL ";break;} case 5:{cout<<"\nMAY ";break;} case 6:{cout<<"\nJUNE ";break;} case 7:{cout<<"\nJULY ";break;} case 8:{cout<<"\nAUGUST ";break;} case 9:{cout<<"\nSEPTEMBER ";break;} case 10:{cout<<"\nOCTOBER ";break;} case 11:{cout<<"\nNOVEMBER ";break;} case 12:{cout<<"\nDECEMBER ";break;} } float contribution=s.basic_pay*0.05; cout<<s.basic_pay*0.10<<"\t\t"<<s.basic_pay*s.vpf<<"\t\t"<<cont ribution<<"\t\t"<<tot; cout<<"\t\tNONE\n"; intr+=tot*0.1343; } cout<<"\n\nINTEREST:\t "<<intr/12; float total=(12*tot)+intr; cout<<"\n\nTOTAL :\t "<<total; } else count++; } x.close(); if(count==i) { cout<<"\n\nEMPLOYEE CODE NOT FOUND. TRY AGAIN!!!"; goto m; } } void report::summary() { int tot_emp; char dept[20][20];

float tot_sal,tot_adv,recovery; cout<<"\n\n\n\t\t\t\tSUMMARY REPORT\n\t\t\t\t~~~~~~~ ~~~~~~"; cout<<"\n\nDEPT CODE TOTAL EMPLOYEES TOTAL SALARY TOTAL LN/ADV TAKEN TOTAL RECOVERY"; ifstream f; f.open("EMP.DAT"); ifstream x; f.close(); f.open("EMP.DAT"); int j=0,i=0,flag=0; char code[100][3]={'\0'}; while(f.read((char*)&s,sizeof(s))) { x.open("EMP.DAT"); tot_sal=0;tot_emp=0;tot_adv=0;recovery=0; for(i=0;i<j;i++) if(strcmp(s.department_code,code[i])==0) flag=1; if(flag!=1) { for(i=0;s.department_code[i]!='\0';i++) code[j][i]=s.department_code[i]; code[j][i]='\0'; i=0;j+=2; while(x.read((char*)&s1,sizeof(s1))) { if(strcmp(s.department_code,s1.department_code)==0) { tot_emp++; tot_sal+=s1.basic_pay; tot_adv+=s1.advance_loan_taken; recovery+=s1.advance_loan_takens1.instalment_due; } } x.close(); if(tot_emp!=0) {

cout<<"\n\n "<<s.department_code<<"\t\t"<<tot_emp<<"\t\t"; if(tot_sal<10000) cout<<" "<<tot_sal; else cout<<tot_sal; cout<<"\t\t"; if(tot_adv==0) cout<<" 0"; else if(tot_adv<10000) cout<<" "<<tot_adv; else cout<<tot_adv; cout<<"\t\t"; if(recovery==0) cout<<" "<<recovery; else if(recovery<10000) cout<<" "<<recovery; else cout<<recovery; } } } f.close(); } void report::adv_loan() { cout<<"\n\n\n\n\n\t\t\tADVANCE/LOAN RECOVERY STATEMENT"; cout<<"\n\n\n\n"; cout<<"\n\nS.NO EMPLOYEE EMPLOYEE DESIGNATION DEPARTMENT AMOUNT AMOUNT BALANCE"; cout<<"\n\n CODE NAME CODE GIVEN RECOVERD AMOUNT\n"; int i=1; ifstream x; x.open("EMP.DAT"); int j=1; while(x.read((char*)&s,sizeof(s))) {

if(s.total_instalments==0) s.total_instalments=1; float inst_paid=s.instalment_paid*s.advance_loan_taken/s.total_instalment s; cout<<"\n\n"<<i<<"\t "<<s.employee_code<<" "<<s.employee_name; if(strlen(s.employee_name)>7) cout<<"\t"<<s.designation; else cout<<"\t "<<s.designation; i++; if(strlen(s.designation)>5) cout<<"\t "<<s.department_code; else cout<<"\t\t "<<s.department_code; if(s.advance_loan_taken==0) cout<<"\t"<<s.advance_loan_taken<<"\t"<<inst_paid<<"\t"<<s.in stalment_due; else cout<<" "<<s.advance_loan_taken<<"\t"<<inst_paid<<"\t"<<s.instalment_due; if(j>20) { cout<<"PRESS ANY KEY TO CONTINUE...."; getch(); clrscr(); cout<<"\n\nS.NO EMPLOYEE EMPLOYEE DESIGNATION DEPARTMENT AMOUNT AMOUNT BALANCE"; cout<<"\n\n CODE NAME CODE GIVEN RECOVERD AMOUNT\n"; j=1; } } x.close(); } void report::calc_payslip() { int ecode;

float hra,da,cpf,vpf,sal_month,hre,gross=0.0; int designation,m,cca,n,medical,y,back,x; int count=0,i=0; cout<<"\n\n\n\n\n\n\t\t\t*******PAYSLIP******"; m: cout<<"\n\nENTER THE EMPLOYEE CODE : "; char aa; aa=getch(); ecode=aa-48; ifstream f; f.open("EMP.DAT",ios::app); while(f.read((char*)&s,sizeof(s))) { i++; if(ecode==s.employee_code) { clrscr(); cout<<"\n\n\n\n\n\t\t\t\t PAYSLIP\n\t\t\t\t ~~~~~~~"; cout<<"\n\nPAYSLIP FOR THE MONTH OF "; getdate(&d); switch(d.da_mon) { case 1:{cout<<"JANUARY";break;} case 2:{cout<<"FEBRUARY";break;} case 3:{cout<<"MARCH";break;} case 4:{cout<<"APRIL";break;} case 5:{cout<<"MAY";break;} case 6:{cout<<"JUNE";break;} case 7:{cout<<"JULY";break;} case 8:{cout<<"AUGUST";break;} case 9:{cout<<"SEPTEMBER";break;} case 10:{cout<<"OCTOBER";break;} case 11:{cout<<"NOVEMBER";break;} case 12:{cout<<"DECEMBER";break;} } cout<<"\n\nEMPLOYEE CODE\t\t: "<<s.employee_code<<"\n\nP F NO.\t\t\t: "<<s.pf_no; cout<<"\n\nEMPLOYEE NAME\t\t: "; puts(s.employee_name); cout<<"\n\n"<<"DESIGNATION\t\t: ";

cout<<s.designation; cout<<"\n\nDEPARTMENT CODE\t\t: "; puts(s.department_code); da=s.basic_pay*0.51; if(s.city_type=='a'||s.city_type=='A') cca=150; if(s.city_type=='b'||s.city_type=='B') cca=100; if(s.city_type=='c'||s.city_type=='C') cca=50; if(s.basic_pay<=2000) medical=50; else if(s.basic_pay>=2001||s.basic_pay<=4000) medical=100; else if(s.basic_pay>4000) medical=150; if(s.house_status=='r'||s.house_status=='R') { hre=0.1*s.basic_pay; hra=0; } else if(s.house_status=='o'||s.house_status=='O') { if(s.basic_pay<=1000) { hre=0.0; hra=500; } else if(s.basic_pay>=1001&&s.basic_pay<=3000) { hre=0.0; hra=750; } else if(s.basic_pay>=3001&&s.basic_pay<=5000) { hre=0.0; hra=1000; } else if(s.basic_pay>=5001)

{ hre=0.0; hra=1500; } gross=s.basic_pay+da+hra+cca+medical+s.conveyance; cpf=s.basic_pay*0.1; /*cpf=10% of basic pay*/ vpf=s.vpf*s.basic_pay; int welfare=200; int tax; if((gross*12)<=25000) tax=0; else if((gross*12)>=25001&&(gross*12)<=40000) tax=gross*0.05; else if((gross*12)>40000) tax=gross*0.10; // float monthly=s.advance_loan_taken/s.total_instalments; float tot_ded=cpf+vpf+tax+welfare+hre;//+monthly; s.instalment_paid++; sal_month=gross-tot_ded; cout<<"\n\n\nEARNINGS\t\t\tDEDUCTIONS\n-------\t\t\t----------"; cout<<"\n\n\nBASIC PAY : "<<s.basic_pay<<"\t\tC.P.F : "<<cpf; cout<<"\n\nD.A : "<<da<<"\t\tV.P.F : "<<vpf; cout<<"\n\nH.R.A : "<<hra; if(hra<1000) cout<<"\t\t\tH.R.E : "<<hre; else cout<<"\t\tH.R.E : "<<hre; cout<<"\n\nC.C.A : "<<cca<<"\t\t\tWELFARE : "<<welfare; cout<<"\n\nMEDICAL : "<<medical<<"\t\t\tTAX : "<<tax; cout<<"\n\nCONVEYANCE: "<<s.conveyance ;//<<"\t\t\tLOAN/ADV INSTLMNT PAID : "<<monthly;

cout<<"\n\n\n\nGROSS PAY : "<<gross<<"\t\tTOTAL DEDUCTIONS : "<<tot_ded<<"\n\nNET PAY : "<<sal_month; } } else count++; } f.close(); if(count==i) { cout<<"\n\nEMPLOYEE CODE NOT FOUND. TRY AGAIN!!!"; goto m; } } void employee::update_employee() { float mi,inst_paid; ifstream x; x.open("EMP.DAT"); ofstream x1; x1.open("a.dat",ios::app); while(x.read((char*)&s,sizeof(s))) { if(s.total_instalments==0) mi=0; else mi=s.advance_loan_taken/total_instalments; ddif=date_dif(s.loan_date); if(ddif.year==0) { s.instalment_paid=ddif.mon; inst_paid=ddif.mon*mi; } else { s.instalment_paid=ddif.mon+(12*ddif.year); inst_paid=(ddif.mon+(12*ddif.year))*mi; }

s.instalment_due=s.advance_loan_taken-inst_paid; x1.write((char*)&s,sizeof(s)); } x1.close();x.close();cout<<"\nUPDATED"; remove("EMP.dat"); rename("a.dat","Emp.dat"); } void employee::addemployee() { char choice,dept[5]; float mi,inst_paid; cout<<"\n\n\n\t\t\t\tEMPLOYEE REGISTER\n\t\t\t\t******** ********"; n: cout<<"\n\nENTER THE DEPARTMENT CODE (e.g:ACC for Accounts, PRO for programming ): "; cin>>dept; if(strlen(dept)!=3) { cout<<"\n\nINVALID DEPARTMENT CODE. TRY AGAIN!!!"; goto n; } else { for(int i=0;i<3;i++) if(islower(dept[i])) dept[i]=toupper(dept[i]); } dept[3]='\0'; strcpy(department_code,dept); m: int e_c; ifstream x1; x1.open("EMP.DAT"); while(!x1.eof()) x1.read((char*)&s1,sizeof(s1)); e_c=s1.employee_code+1; if(s1.pf_no==0) s.pf_no=10000; else s.pf_no=s1.pf_no+1; cout<<"\n\nP F NO. : "<<s.pf_no; x1.close();

employee_code=e_c; cout<<"\n\nEMPLOYEE CODE : "<<employee_code; s: cout<<"\n\nENTER THE EMPLOYEE NAME : "; gets(employee_name); int count=0,flag=0; for(int i=0;employee_name[i]!='\0';i++) { if(isspace(employee_name[i])) count++; else if(isdigit(employee_name[i])) flag=1; } if(strlen(employee_name)==0||strlen(employee_name)==count||fl ag==1) { cout<<"\n\nENTER A PROPER EMPLOYEE NAME!"; goto s; } char des; o: cout<<"\n\nENTER THE DESIGNATION OF THE EMPLOYEE :\n\n(i) MANAGER(M)\n(ii) CLERK(C)\n(iii)SALESMAN(S)\n(iv)OTHERS(O)\nENTER YOUR CHOICE : " ; des=getch(); switch(des) { case 'M':case 'm':{strcpy(designation,"MNGER");break;} case 'C':case 'c':{strcpy(designation,"CLERK");break;} case 'S':case 's':{strcpy(designation,"SALES");break;} case 'O':case 'o':{strcpy(designation,"OTHER");break;} default:{cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!";goto o;} } if(strcmp("MNGER",designation)==0) basic_pay=4000; else if(strcmp("CLERK",designation)==0) basic_pay=3500; else if(strcmp("SALES",designation)==0) basic_pay=2500; else if(strcmp("OTHER",designation)==0)

basic_pay=2000; x: cout<<"\n\nENTER THE HOUSE STATUS OF THE EMPLOYEE (O for own /R for rented) : "; house_status=getch(); if(house_status!='o'&&house_status!='O'&&house_status!='r'&& house_status!='R') { cout<<"\n\nINVALID HOUSE STATUS. TRY AGAIN!!!"; goto x; } y: cout<<"\n\nENTER THE TYPE OF CITY WHERE THE EMPLOYEE RESIDES \n(i) A FOR CLASS A\n(ii) B FOR CLASS B\n(iii)C FOR CLASS C\n\nENTER YOUR CHOICE : "; cin>>city_type; if(city_type!='A'&&city_type!='a'&&city_type!='b'&&city_type!='B' &&city_type!='c'&&city_type!='C') { cout<<"\n\n\nINVALID CHOICE. TRY AGAIN!!!"; goto y; } j: cout<<"\n\nENTER THE CONVEYANCE TAKEN BY THE EMPLOYEE : \n(i) M FOR MOPEDS\n(ii) S FOR SCOOTERS\n(iii)C FOR CARS\n(iv) O FOR NONE\n\nENTER YOUR CHOICE : "; char con; con=getch(); switch(con) { case 'm':case 'M':{conveyance=50;break;} case 's':case 'S':{conveyance=100;break;} case 'c':case 'C':{conveyance=150;break;} case 'o':case 'O':{conveyance=0;break;} default: { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto j; } } char ch; mn: cout<<"\n\nDO YOU WANT VOLUNTARY PROVIDENT FUND ?(Y/N) : ";

xx: : ";

ch=getch(); if(ch=='y'||ch=='Y') { cout<<"\n\nENTER THE PERCENTAGE OF BASIC FOR VPF cin>>vpf; if(vpf>0 && vpf<100) vpf=vpf/100; else { cout<<"\n\nPF

CANNOT

EXCEED

100%

TRY

AGAIN!!!"; goto xx; } } else if(ch=='n'||ch=='N') vpf=0.0; else { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto mn; } advance_loan_taken=0; loan_date.day=0; loan_date.mon=0; loan_date.year=0; total_instalments=0; instalment_due=0; instalment_paid=0; ofstream file; file.open("EMP.DAT",ios::binary|ios::app); file.write((char*)&s,sizeof(s)); file.close(); cout<<"\n\nDO YOU WISH TO ADD RECORDS?(Y/N) : "; cin>>choice; if(choice=='y'||choice=='Y') goto n; else if(choice=='n'||choice=='N') cout<<"\n\n\t\t\tTHANK YOU"; else

p:

{ cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto p; } } void employee::modemployee(int code) { long pos; char e_c[5],d_c[3],e_name[25],des,h_s,c_t,found='f',con; float a_l_taken,inst_due; int tot_inst; ifstream x; x.open("emp.dat"); ofstream f; f.open("EMP1.DAT",ios::app); while(x.read((char*)&s,sizeof(s))) { if(employee_code!=code) f.write((char*)&s,sizeof(s)); else if(employee_code==code) { cout<<"\n\n\n\t\t\tEMPLOYEE DETAILS\n\t\t\t******** *******"; cout<<"\n\nEMPLOYEE CODE\t\t\t\t: "<<employee_code; cout<<"\n\nDEPARTMENT CODE\t\t\t\t: "<<department_code; cout<<"\n\nEMPLOYEE NAME\t\t\t\t: "<<employee_name; cout<<"\n\nDESIGNATION\t\t\t\t: "<<designation; cout<<"\n\nBASIC PAY\t\t\t\t: "<<basic_pay; cout<<"\n\nCITY TYPE\t\t\t\t: "<<city_type; cout<<"\n\nCONVEYANCE TAKEN\t\t\t: "<<conveyance; cout<<"\n\nADVANCE/LOAN TAKEN\t\t\t: "<<advance_loan_taken; cout<<"\n\nDATE ON WHICH LOAN/ADVANCE TAKEN\t: "<<loan_date.day<<"/"<<loan_date.mon<<"/"<<loan_date.year;

cout<<"\n\nINSTALMENT DUE\t\t\t\t: "<<instalment_due; cout<<"\n\nINSTALMENT PAID\t\t\t\t: "<<instalment_paid; cout<<"\n\nNO. OF INSTALMENTS\t\t\t: "<<total_instalments; cout<<"\n\n\nENTER THE MODIFIED DETAILS :\n\n"; n: cout<<"\n\nENTER THE NEW DEPARTMENT CODE (N FOR NO CHANGE): "; cin>>d_c; if(strlen(d_c)!=1) { if(strlen(department_code)!=3) { cout<<"\n\nINVALID DEPARTMENT CODE. TRY AGAIN!!!"; goto n; } else { for(int i=0;i<3;i++) if(islower(d_c[i])) d_c[i]=toupper(d_c[i]); d_c[3]='\0'; strcpy(department_code,d_c); } } else { if(d_c[0]!='n'&&d_c[0]!='N') { cout<<"\n\nINVALID DEPARTMENT CODE. TRY AGAIN!!!"; goto n; } } s: cout<<"\n\nENTER THE NEW EMPLOYEE NAME (N FOR NO CHANGE) : "; gets(e_name);

if(strlen(e_name)==1&&(e_name[0]=='n'||e_name[0]=='N')) { } else { int count=0; for(int i=0;e_name[i]!='\0';i++) { if(isspace(e_name[i])) count++; } if(strlen(e_name)==0||strlen(e_name)==count) { cout<<"\n\nENTER A PROPER EMPLOYEE NAME!"; goto s; } strcpy(employee_name,e_name); } o: cout<<"\n\nENTER THE DESIGNATION OF THE EMPLOYEE :\n\n(i) MANAGER(M)\n(ii) CLERK(C)\n(iii)SUB STAFF(S)\n(iv)OTHERS(O)\nENTER YOUR CHOICE (N FOR NO CHANGE) : " ; cin>>des; switch(des) { case 'M':case 'm':{strcpy(designation,"MNGER");break;} case 'C':case 'c':{strcpy(designation,"CLERK");break;} case 's':case 'S':{strcpy(designation,"SALES");break;} case 'o':case 'O':{strcpy(designation,"OTHER");break;} case 'n':case 'N':{break;} default:{cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!";goto o;} } if(strcmp("MNGER",designation)==0) basic_pay=4000;

else if(strcmp("CLERK",designation)==0) basic_pay=3500; else if(strcmp("SALES",designation)==0) basic_pay=2500; else if(strcmp("OTHERS",designation)==0) basic_pay=2000; x: cout<<"\n\nENTER THE HOUSE STATUS OF THE EMPLOYEE (O for own /R for rented)(N FOR NO CHANGE) : "; cin>>h_s; if(h_s!='n'&&h_s!='N') { if(h_s!='o'&&h_s!='O'&&h_s!='r'&&h_s!='R') { cout<<"\n\nINVALID HOUSE STATUS. TRY AGAIN!!!"; goto x; } else house_status=h_s; } y: cout<<"\n\nENTER THE TYPE OF CITY WHERE THE EMPLOYEE RESIDES \n(i) A FOR CLASS A\n(ii) B FOR CLASS B\n(iii)C FOR CLASS C\n\nENTER YOUR CHOICE(N FOR NO CHANGE) : "; c_t=getch(); if(c_t!='n'&&c_t!='N') {

if(c_t!='A'&&c_t!='a'&&c_t!='b'&&c_t!='B'&&c_t!='c'&&c_t!='C') { cout<<"\n\n\nINVALID AGAIN!!!"; goto y; } else city_type=c_t; } CHOICE. TRY

j: cout<<"\n\nENTER THE CONVEYANCE TAKEN BY THE EMPLOYEE : \n(i) M FOR MOPEDS\n(ii) S FOR SCOOTERS\n(iii)C FOR CARS\n(iv) O FOR NONE\n\nENTER YOUR CHOICE (N FOR NO CHANGE) : "; char con; cin>>con; switch(con) { case 'm':case 'M':{conveyance=50;break;} case 's':case 'S':{conveyance=100;break;} case 'c':case 'C':{conveyance=150;break;} case 'o':case 'O':{conveyance=0;break;} case 'n':case 'N':{break;} default: { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto j; } } f.write((char*)&s,sizeof(s)); } } x.close(); f.close(); remove("EMP.DAT"); rename("EMP1.DAT","EMP.DAT"); ifstream x1; x1.open("emp.dat"); while(x1.read((char*)&s,sizeof(s))) { if(employee_code==code) { cout<<"\n\n\n\t\t\tEMPLOYEE DETAILS\n\t\t\t******** *******"; cout<<"\n\nEMPLOYEE CODE\t\t\t\t: "<<employee_code; cout<<"\n\nDEPARTMENT CODE\t\t\t\t: "<<department_code;

cout<<"\n\nEMPLOYEE NAME\t\t\t\t: "<<employee_name; cout<<"\n\nDESIGNATION\t\t\t\t: "<<designation; cout<<"\n\nBASIC PAY\t\t\t\t: "<<basic_pay; cout<<"\n\nCITY TYPE\t\t\t\t: "<<city_type; cout<<"\n\nCONVEYANCE TAKEN\t\t\t: "<<conveyance; cout<<"\n\nADVANCE/LOAN TAKEN\t\t\t: "<<advance_loan_taken; cout<<"\n\nDATE ON WHICH LOAN/ADVANCE TAKEN\t: "<<loan_date.day<<"/"<<loan_date.mon<<"/"<<loan_date.year; cout<<"\n\nINSTALMENT DUE\t\t\t\t: "<<instalment_due; cout<<"\n\nINSTALMENT PAID\t\t\t\t: "<<instalment_paid; cout<<"\n\nNO. OF INSTALMENTS\t\t\t: "<<total_instalments; cout<<"\n\n\n\nRECORD MODIFIED"; } } x1.close(); } void employee::delemployee(int code) { char choice;int count=0,i=0; ifstream x2; x2.open("EMP.DAT"); while(x2.read((char*)&s,sizeof(s))) { if(code==employee_code) { cout<<"\n\n\n\t\t\tEMPLOYEE DETAILS\n\t\t\t******** *******"; cout<<"\n\nEMPLOYEE CODE\t\t\t\t: "<<employee_code; cout<<"\n\nDEPARTMENT CODE\t\t\t\t: "<<department_code; cout<<"\n\nEMPLOYEE NAME\t\t\t\t: "<<employee_name;

cout<<"\n\nDESIGNATION\t\t\t\t: "<<designation; cout<<"\n\nBASIC PAY\t\t\t\t: "<<basic_pay; cout<<"\n\nCITY TYPE\t\t\t\t: "<<city_type; cout<<"\n\nCONVEYANCE TAKEN\t\t\t: "<<conveyance; cout<<"\n\nADVANCE/LOAN TAKEN\t\t\t: "<<advance_loan_taken; cout<<"\n\nDATE ON WHICH LOAN/ADVANCE TAKEN\t: "<<loan_date.day<<"."<<loan_date.mon<<"."<<loan_date.year; cout<<"\n\nINSTALMENT DUE\t\t\t\t: "<<instalment_due; cout<<"\n\nINSTALMENT PAID\t\t\t\t: "<<instalment_paid; cout<<"\n\nNO. OF INSTALMENTS\t\t\t: "<<total_instalments; if(instalment_due!=0) count=1; } } x2.close(); char ch; if(count==0) { g: cout<<"\n\nDO YOU WANT TO DELETE THIS RECORD?(Y/N) : "; cin>>ch; if(ch=='y'||ch=='Y') { ifstream x1; x1.open("emp.dat"); ofstream x; x.open("Emp2.dat",ios::out|ios::binary); while(x1.read((char*)&s,sizeof(s))) { if(code!=s.employee_code) x.write((char*)&s,sizeof(s)); } x.close(); x1.close();

remove("EMP.DAT"); rename("emp2.dat","emp.dat"); cout<<"\n\nRECORD DELETED"; } else if(ch=='n'||ch=='N') {} else { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto g; } } else { cout<<"\n\n\n\n\nEMPLOYEE HAS PREVIOUS DUES. CANNOT REMOVE THE EMPLOYEE UNLESS THE DUES ARE 0"; } } int employee::check_emp_det(int ecode,char ename[25],char dept[3]) { ifstream x; x.open("EMP.DAT"); while(!x.eof()) { x.read((char*)&s,sizeof(s)); if(s.employee_code==ecode) { if(strcmp(s.employee_name,ename)==0) { if(strcmp(s.department_code,dept)==0) return 1; } } } return 0; x.close(); } void employee::print() { clrscr();

cout<<"\n\n\n\t\t\t\tEMPLOYEE REGISTER\n\t\t\t\t~~~~~~~~ ~~~~~~~~"; cout<<"\n\n\n"; cout<<"S.NO EMPL DEPT EMPL DESIG BASC HOUSE CITY CON LN/ADV LN/ADV INST INST\n"; cout<<" CODE CODE NAME PAY STATS TYPE AMT DATE PAID DUE\n\n\n"; ifstream x; x.open("EMP.DAT"); int i=1,j=1; while(x.read((char*)&s,sizeof(s))) { if(i<10) cout<<"000"<<i; else if(i>=10&&i<100) cout<<"00"<<i; else if(i>=100&&i<1000) cout<<0<<i; else cout<<i; if(employee_code<10) cout<<" 000"<<employee_code; else if(employee_code>=10&&employee_code<100) cout<<" 00"<<employee_code; else if(employee_code>=100&&employee_code<1000) cout<<" 0"<<employee_code; else cout<<' '<<employee_code; cout<<" "<<department_code<<" "; if(strlen(employee_name)<8) cout<<employee_name<<"\t"; else cout<<employee_name<<" "; cout<<designation<<" "<<basic_pay<<" "; switch(house_status) { case 'o':case 'O':{cout<<"OWN ";break;} case 'r':case 'R':{cout<<"RENT ";break;} }

switch(city_type) { case 'a':case 'A':{cout<<"A ";break;} case 'b':case 'B':{cout<<"B ";break;} case 'c':case 'C':{cout<<"C ";break;} } if(conveyance==0) cout<<" "<<conveyance<<" "; else if(conveyance<100) cout<<" "<<conveyance<<" "; else cout<<" "<<conveyance<<" "; if(advance_loan_taken<10) cout<<" "<<advance_loan_taken; else if(advance_loan_taken>=10&&advance_loan_taken<1000) cout<<" "<<advance_loan_taken; else if(advance_loan_taken>=1000&&advance_loan_taken<10000) cout<<" "<<advance_loan_taken; else cout<<advance_loan_taken; cout<<" "; if(s.loan_date.day<10) cout<<"0"<<s.loan_date.day; else cout<<s.loan_date.day; cout<<"/"; if(s.loan_date.mon<10) cout<<"0"<<s.loan_date.mon; else cout<<s.loan_date.mon; cout<<"/"; if(s.loan_date.year==0) cout<<"00"; else { int n=s.loan_date.year%100; if(n<10) cout<<0<<n;

else cout<<n; } if(instalment_paid<10) cout<<" "<<instalment_paid; else cout<<" "<<instalment_paid; if(instalment_due<10) cout<<" "<<instalment_due; else if(instalment_due>=10&&instalment_due<100) cout<<" "<<instalment_due; else if(instalment_due>=100&&instalment_due<1000) cout<<" "<<instalment_due; else if(instalment_due>=1000&&instalment_due<10000) cout<<" "<<instalment_due; else cout<<" "<<instalment_due; cout<<"\n\n"; i++;j++; } x.close(); } void loan_check::get_loan() { int ch; int emp_code,no_inst; float loan_amount; char emp_name[25],emp_sign[25],dept_code[5]; char reason[30],loan[10]; getdate(&d); cout<<"\n\n\n\n\n\n\n\t\t\tAPPLICATION FOR ADVANCE\n\n\n\n"; cout<<"\n\nENTER THE EMPLOYEE CODE char aa; aa=getch(); emp_code=aa-48; cout<<"\n\nENTER THE DEPARTMENT CODE cin>>dept_code; for(int i=0;i<strlen(dept_code);i++) {

LOAN : ";

AND

: ";

if(islower(dept_code[i])) dept_code[i]=toupper(dept_code[i]); } cout<<"\n\nENTER THE EMPLOYEE NAME : "; cin>>emp_name; f: cout<<"\n\nAPPLYING FOR \t1.LOAN\t2. ADVANCE : "; char ch1; ch1=getch(); ch=ch1-48; switch(ch) { case 1: {strcpy(loan,"LOAN");break;} case 2: {strcpy(loan,"ADVANCE");break;} default: { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto f; } } xy: cout<<"\n\nENTER THE "<<loan<<" AMOUNT"; if(ch==1) cout<<"\t\t\t: "; else cout<<"\t\t: "; cin>>loan_amount; if(loan_amount>99999) { cout<<"\n\n\MAXIMUM AMOUNT IS Rs.99999. TRY AGAIN!!!"; goto xy; } cout<<"\n\nREASON(MAX 30 CHAR)\t\t\t: "; gets(reason); xx: cout<<"\n\nNO OF INSTALMENTS\t\t\t: "; cin>>no_inst; if(no_inst>99) { cout<<"\n\nMAXIMUM NO. OF INSTALMENTS ALLOWED IS 99. PLEASE TRY AGAIN!!!"; goto xx;

} p: cout<<"\n\nSIGN OF THE EMPLOYEE\t\t\t: "; cin>>emp_sign; if(strcmp(emp_name,emp_sign)!=0) { cout<<"\n\nEMPLOYEE SIGN DO NOT MATCH WITH THE NAME. TRY AGAIN!!!"; goto p; } if(s.check_emp_det(emp_code,emp_name,dept_code)) { ifstream f; f.open("EMP.DAT"); f.seekg(0); ofstream x; x.open("temp1.dat",ios::app); while(f.read((char*)&s1,sizeof(s1))) { if(s1.employee_code==emp_code) { if(s1.instalment_due==0) { int j=f.tellg(); s1.advance_loan_taken=loan_amount; s1.loan_date.day=d.da_day; s1.loan_date.mon=d.da_mon; s1.loan_date.year=d.da_year; s1.total_instalments=no_inst; s1.instalment_due=s1.advance_loan_taken; cout<<"\n\nSIGN OF THE EMPLOYER\t\t\t: EMPLOYER"; cout<<"\n\n"<<loan<<" SANCTIONED"; } else cout<<"\n\n\tTHE EMPLOYEE HAS PREVIOS DUES TO BE PAID.\n\n "<<loan<<" CANNOT BE SANCTIONED UNLESS DUES ARE ZERO"; x.write((char*)&s1,sizeof(s1)); }

else x.write((char*)&s1,sizeof(s1)); } f.close(); x.close(); remove("emp.dat"); rename("temp1.dat","emp.dat"); } else cout<<"\n\nIMPROPER EMPLOYEE DETAILS. "<<loan<<" CANNOT BE SANCTIONED"; } void loan_check::loan_status() { m: cout<<"\n\nENTER THE CODE OF THE EMPLOYEE : "; char code1; int code; float inst,mi; code1=getch(); code=code1-48; ifstream x; x.open("EMP.DAT"); int rec=0,count=0; while(x.read((char*)&s,sizeof(s))) { if(s.employee_code==code) { if(s.total_instalments==0) s.total_instalments=1; mi=s.advance_loan_taken/s.total_instalments; cout<<"\n\nMONTHLY INSTALMENT : "<<mi; inst=s.instalment_paid*mi; cout<<"\n\nDATE ON WHICH LOAN/ADVANCE TAKEN : "<<s.loan_date.day<<"/"<<s.loan_date.mon<<"/"<<s.loan_date.year; cout<<"\n\nLOAN/ADVANCE TAKEN : "<<s.advance_loan_taken; cout<<"\n\nAMOUNT RECOVERED : "<<inst; cout<<"\n\nBALANCE : "<<s.instalment_due; }

else count++; rec++; } if(rec==count) { cout<<"\nEMPLOYEE CODE NOT FOUND. TRY AGAIN!!!"; goto m; } char choice; p: cout<<"\n\nDO YOU WISH TO VIEW LOAN/ADVANCE STATUS OF MORE EMPLOYEES?(Y/N) : "; cin>>choice; if(choice=='y'||choice=='Y') goto m; else if(choice=='n'||choice=='N') {} else { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto p; } } void main() { int choice; char ch; employee hello; // int gdriver = DETECT, gmode, errorcode; // initgraph(&gdriver, &gmode, ""); // hello.help(); // closegraph(); // textcolor(14); ofstream f1; f1.open("EMP.DAT",ios::app); f1.close(); s.update_employee(); m: // textcolor(10); //textbackground(8);

clrscr(); cout<<"\n\n\t\t\t PAYROLL PROCESSING SYSTEM\n\n"; cout<<"\n\n\n\t\t\t\t MAIN MENU\n\t\t\t\t ---- ----"; cout<<"\n\n\t1. EMPLOYEE REGISTER"; cout<<"\n\n\t2. APPLY FOR LOAN/ADVANCE"; cout<<"\n\n\t3. PRODUCE THE REPORTS"; cout<<"\n\n\t4. EXIT FROM THE DATABASE"; cout<<"\n\n\t\tENTER YOUR CHOICE : "; ch=getch(); choice=ch-48; switch(choice) { case 1: { n: // textcolor(11); clrscr(); char ch; int choice_reg; cout<<"\n\n\n\n\t\t\t\tEMPLOYEE DATABASE\n\t\t\t\t******** ********\n\n\n\n"; cout<<"\n\n\t\t1. ADD AN EMPLOYEE INTO THE DATABASE"; cout<<"\n\n\t\t2. MODIFY THE DETAILS OF AN EMPLOYEE"; cout<<"\n\n\t\t3. DELETE AN EMPLOYEE FROM THE DATABASE"; cout<<"\n\n\t\t4. PRINT THE EMPLOYEE DETAILS"; cout<<"\n\n\t\t5. RETURN TO THE MAIN MENU"; cout<<"\n\n\t\t\tENTER YOUR CHOICE : "; ch=getch(); choice_reg=ch-48; switch(choice_reg) { case 1: { // textcolor(15); clrscr(); s.addemployee(); getch(); goto n;

} case 2: { clrscr(); int ecode; cout<<"\n\n\n\n"; k: cout<<"\n\nENTER THE EMPLOYEE CODE WHOSE DETAILS ARE TO BE MODIFIED : "; cin>>ecode; ifstream x; x.open("EMP.DAT"); while(x.read((char*)&s,sizeof(s))) { if(s.employee_code==ecode) { s.modemployee(ecode); getch(); goto p; } } cout<<"\n\nRECORD NOT FOUND. TRY AGAIN!!!"; goto k; x.close(); p: cout<<"\n\nDO YOU WISH TO MODIFY ANYMORE RECORDS?(Y/N) : "; char choice; cin>>choice; if(choice=='y'||choice=='Y') goto k; else if(choice=='n'||choice=='N') goto n; else { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; goto p; } }

case 3: { // textcolor(15); clrscr(); char ch; int ecode; cout<<"\n\n\n\n"; lm: cout<<"\n\nENTER THE EMPLOYEE CODE WHOSE DETAILS ARE TO BE DELETED : "; cin>>ch; ecode=ch-48; ifstream x; x.open("EMP.DAT"); while(x.read((char*)&s,sizeof(s))) { if(s.employee_code==ecode) { s.delemployee(ecode); getch(); goto q; } } cout<<"\n\nRECORD NOT FOUND. TRY AGAIN!!!"; char aa; cout<<"\n\n\npress Y or y to continue"; aa=getch(); if(aa=='y'|| aa=='Y') goto lm; x.close(); q: cout<<"\n\nDO YOU WISH TO DELETE ANYMORE RECORDS?(Y/N) : "; char choice; cin>>choice; if(choice=='y'||choice=='Y') goto lm; else if(choice=='n'||choice=='N') goto n; else {

cout<<"\n\nINVALID AGAIN!!!"; goto q; } } case 4: { // textcolor(15); clrscr(); s.print(); getch(); goto n;

CHOICE.

TRY

} case 5: { cout<<"\n\n\nRETURNING........"; getch(); goto m; } default: { cout<<"\n\n\t\t\tINVALID CHOICE. AGAIN!!!"; getch(); goto n; } }

TRY

} case 2: { l: // textcolor(11); clrscr(); cout<<"\n\n\n\n\t\t\t\tLOAN AND ADVANCES\n\t\t\t\t**** *** ********\n\n\n\n"; cout<<"\n\n\t\t1. APPLY FOR LOAN/ADVANCE"; cout<<"\n\n\t\t2. VIEW LOAN/ADVANCE STATUS"; cout<<"\n\n\t\t3. RETURN TO THE MAIN MENU"; char choice;

int ch; cout<<"\n\n\t\t\tENTER YOUR CHOICE : "; choice=getch(); ch=choice-48; switch(ch) { case 1: { // textcolor(15); clrscr(); y.get_loan(); getch(); goto l; } case 2: { // textcolor(15); clrscr(); y.loan_status(); getch(); goto l; } case 3: { cout<<"\n\n\nRETURNING.................."; getch(); goto m; } default: { cout<<"\n\nINVALID CHOICE. TRY AGAIN!!!"; getch(); goto l; } } } case 3: { // textcolor(11);

pq:

char choice; clrscr(); cout<<"\n\n\n\n\t\t\t\tREPORTS\n\t\t\t\t*******\n\n\n\n"; cout<<"\n\n\t\t1. PAYSLIP"; cout<<"\n\n\t\t2. GENERATE P F STATEMENT"; cout<<"\n\n\t\t3. LOAN/ADVANCE RECOVERY STATEMENT"; cout<<"\n\n\t\t4. SUMMARY REPORT"; cout<<"\n\n\t\t5. RETURN TO THE MAIN MENU"; cout<<"\n\n\t\t\tENTER YOUR CHOICE : "; int ch; choice=getch(); ch=choice-48; switch(ch) { case 1: { // textcolor(6); clrscr(); r.calc_payslip(); getch(); goto pq; } case 2: { // textcolor(6); clrscr(); r.pfstate(); getch(); goto pq; } case 3: { // textcolor(6); clrscr(); r.adv_loan(); getch(); goto pq; }

case 4: { // textcolor(6); clrscr(); r.summary(); getch(); goto pq; } case 5: { cout<<"\n\nRETURNING............"; getch(); goto m; } default: { cout<<"\n\nINVALID CHOICE. AGAIN!!!"; getch(); goto pq; } } } case 4: { cout<<"\n\nPROGRAM TERMINATING..........................."; getch(); exit(0); } default: { cout<<"\n\n\t\t\tINVALID CHOICE. TRY AGAIN!!!"; getch(); goto m; } } }

TRY

OUTPUT SCREENS

STEPS

FOR NAVIGATION

Open the file Payroll.cpp. The menu screen is displayed The menu screen consists of: 1. Employee Register maintenance 2. Generation of reports 3. Loan/ Advances maintenance 4. Exit Now the user is expected to enter the desired choice. Menu1: It consists of four options for maintenance of Employee Register. They are: 1. 2. 3. 4. 5. Addition of records Modification of records Deletion of records Printing the records Return to main menu

Menu2: It allows the user to apply for loan/advance and to view the current status of the loan/advance borrowed by the employee. Menu 3: It maintains and prints the reports for the employees. It consists of sub menus of: 1. 2. 3. 4. Pay slip generation P.F. statemet generation Loan/advance recovery statement Summary report

Menu 4: It allows the user to exit from the program.

SYSTEM ALGORITHM

STEP 1: STEP 2: STEP 3: STEP 4: STEP 5: STEP 6: STEP 7: STEP 8:

START DISPLAY OF THE MAIN SCREEN RECEIVING THE USERS DESIRED OPTION CALLING THE OPERATION REQUIRED BY THE USER DISPLAY OF THE RESULT BACK TO DISPLAY OF THE MAIN SCREEN STEP 3 IS INVOKED END

SYSTEM FLOW CHART


START

DISPLAY OF THE MAIN SCREEN PROVIDING VARIOUS OPTIONS

GETTING INPUTS FROM THE USER

CALLING OF THE REQUIRED OPERATION

PRINTING THE OUTPUT SCREEN

BACK TO MAIN SCREEN STEP 3 IS INVOKED

STOP

CHECKS AND VALIDATIONS


1. Since the payroll system has been designed based on user wish period of timing, it allows the user to take up a used employee number only after the employee bearing that number is no more a part of the company.

2. Loan period and loan disbursement are the areas treated with utmost care as the employee can enter any date and check if he bears a loan in the said period of time.

3. While wanting to display his Pay slip for a said month or to view his P.F. statement for a said year, the employee is not allowed to enter a date prior to the joining date.

LIMITATIONS OF THE PROJECT


Though the project was executed with utmost care, keeping in mind that it must satisfy the requirements of the user in every respect with advanced features, I could not avoid the following limitation completely.

The basic pay of each employee had to be increased by a certain amount every year, but since the user is awarded the right to enter the date, it automatically leads to the adjustments in the basic pay of the employee which sometimes goes beyond the integer limit and shows a random value.

ERRORS ENCOUNTERED AND RECTIFIED


Errors like retrieving the employee data from the Employee Register, matching the employee codes in various departments, etc.

But these were soon overcome laying the platform for a good working miniature system of payroll.

Wrong usage of text file operations was also a part of the errors that were encountered.

FUTURE MODIFICATIONS
The payroll processing software can be modified in the future by satisfying some of the short comings like: y Generation of the employee code by the system itself y Offering loans on more prominent grounds y Creating a wider base for storage of employee details y Conversion of the designed payroll system into a real time processing system

When these shortcomings are rectified this software can be effectible used by prospective users in real life situations in the Accounts Department.

CONCLUSION
It was a unique experience to visualize a real life situation of a Payroll Processing Department like the one undertaken for the purpose, design the inputs and to execute the assignment with utmost care to ensure that nothing goes wrong when applied for practical purposes. I am sure that this project will be of immense use for small scale employers while implementing the computerized payroll system. It gave me an absolute confidence on usage of software applications and also a fair amount of knowledge in the area of payroll system. I thank 1.The team of M/s TATA CONSULTANCY SERVICES, who initiated the project with all the technical guidance. 2. Smt.G. Bhuvaneswari and Smt. L. Padmavathy, the Computer Science faculty, Modern Senior Secondary School, Chennai 61 - for periodical guidance and support. 3. Dr. K. Mohana, our upgradation programme. Principal for organising the knowledge

4. The Management of Modern Senior Secondary School for providing the laboratory facilities 5. All others who helped me in successful designing and implementation of this project.

BIBLIOGRAPHY
y Programming in C++ by SUMITA ARORA FOR CALSS XI AND XII

y Complete reference manual in C++ by BJARNE STROUTRUP y Together with C++ by RACHANA SAGAR y Programming in C++ by DHANPAT RAI

Vous aimerez peut-être aussi