Hello there,
I am creating a salary & payroll application in Django. I need your 
guidance in calcuating the salary and insert to salarydetails table. I 
wanted to know how we can do the calculation using models. For example 
first we need to calculate the salary details for each salary head after 
deducting the LOP(Loss of Pay). Then we need to calculate Provident Fund(12 
% of salary heads marked as IsConsiderforPF with a capping of Rs.15000). My 
question is whether all these complicated calculation can be achieved using 
models? Enclosed my Table structure.

*Employee:*
EmployeeId int,
EmployeeName Varchar(500),
Address Varchar(5000)

*SalaryHead:*
SalaryHeadId int,
SalaryHeadName varchar(1000),
IsLOPApplicable  boolean,
IsConsiderforPF boolean,
IsConsiderforPT boolean

*SalaryMaster*:
SalaryMasterId int,
EmployeeId int,
SalaryAmount Decimal(18,3)

*MonthlySalaryHeader*:
MonthlySalaryHeaderId int,
YearMonth int,
EmployeeId int,
TotalNoofDays int,
NoofDaysPresent int,
LOPDays int,

*MonthlySalaryDetails:*
MonthlySalaryDetailsid int,
MonthlySalaryHeaderId int,
SalaryHeadId int,
Amount Decimal(18,3)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b987af1d-92d4-40f5-98d7-bfac9f4e325fn%40googlegroups.com.

Reply via email to