; ; UpdateForm(false, "cbDept"); Search("SearchDepartment"); UpdateForm(true, "cbDept"); = #PayAccount.End_AttendanceResult) { #PayAccountData.BasicPay_PayAccountData = (#PayBase.Value_PayBase + #Employee.DutySubsidy_Employee) * 0.8; } if (#Employee.OnDuty_Employee > #PayAccount.Begin_AttendanceResult && #Employee.OnDuty_Employee < #PayAccount.End_AttendanceResult) { Search("Searchdays",#Employee.OnDuty_Employee,#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult); #PayAccountData.BasicPay_PayAccountData = (#PayBase.Value_PayBase + #Employee.DutySubsidy_Employee) * #days.FrontPart / #days.AllPart * .8 + (#PayBase.Value_PayBase + #Employee.DutySubsidy_Employee) * (1 - #days.FrontPart / #days.AllPart); } } } Search("SearchAttendanceResultData",#PayAccount.No_AttendanceResult,#PayAccountData.ID_Employee); #PayAccountData.OvertimePay_PayAccountData = #PayAccountData.BasicPay_PayAccountData / #PayAccount.PayDays_PayAccount * (#AttendanceResultData.OvertimeDays_AttendanceResultData + #AttendanceResultData.WeekendOtDays_AttendanceResultData * 2 + #AttendanceResultData.FeastOtDays_AttendanceResultData * 3); @LessFiveLater = 0; @LessFiveEarly = 0; @LessTenLater = 0; @LessTenEarly = 0; @LessFifteenLater = 0; @LessFifteenEarly = 0; @LessDay = 0; if (Search("SearchLaterOrEarly",#PayAccountData.ID_Employee,#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult,#PayAccount.ID_AttendanceResult)) { SuspendLayout(); for (@j=0;@j 0) @LessFiveLater = @LessFiveLater + 1; if (#LaterOrEarly.Minute_Leaveearly <= 5 && #LaterOrEarly.Minute_Leaveearly > 0) @LessFiveEarly = @LessFiveEarly + 1; if (#LaterOrEarly.Minute_Later <= 10 && #LaterOrEarly.Minute_Later > 5) @LessTenLater = @LessTenLater + 1; if (#LaterOrEarly.Minute_Leaveearly <= 10 && #LaterOrEarly.Minute_Leaveearly > 5) @LessTenEarly = @LessTenEarly + 1; if (#LaterOrEarly.Minute_Later <= 30 && #LaterOrEarly.Minute_Later > 10) @LessFifteenLater = @LessFifteenLater + 1; if (#LaterOrEarly.Minute_Leaveearly <= 30 && #LaterOrEarly.Minute_Leaveearly > 10) @LessFifteenEarly = @LessFifteenEarly + 1; if (#LaterOrEarly.Minute_Later > 30 || #LaterOrEarly.Minute_Leaveearly > 30) @LessDay = @LessDay + 1; } ResumeLayout(); #PayAccountData.Later_PayAccountData = @LessFiveLater * 5 + @LessTenLater * 10 + @LessFifteenLater * 15; #PayAccountData.LeaveEarly_PayAccountData = @LessFiveEarly * 5 + @LessTenEarly * 10 + @LessFifteenEarly * 15; } #PayAccountData.Absent_PayAccountData = #PayAccountData.BasicPay_PayAccountData / #PayAccount.PayDays_PayAccount * (#AttendanceResultData.AbsentDays_AttendanceResultData + @LessDay); Search("SearchSickRate",#PayAccountData.ID_Employee,#PayAccount.End_AttendanceResult); #PayAccountData.Sick_PayAccountData = #PayAccountData.BasicPay_PayAccountData / #PayAccount.PayDays_PayAccount * #AttendanceResultData.SickLeaveDays_AttendanceResultData * #SickRate.SickRate_SickHoliday; #PayAccountData.Event_PayAccountData = #PayAccountData.BasicPay_PayAccountData / #PayAccount.PayDays_PayAccount * #AttendanceResultData.AffairLeaveDays_AttendanceResultData; Search("SearchPaySetting"); if (Equals(#Employee.Insurance_Employee , "") || Equals(#Employee.Insurance_Employee,DBNull())) { #PayAccountData.Provide_PayAccountData = 0; #PayAccountData.Idleness_PayAccountData = 0; #PayAccountData.Medical_PayAccountData = 0; #PayAccountData.AccumulationFund_PayAccountData = 0; } else { if (#Employee.Insurance_Employee == "未缴" || #Employee.Insurance_Employee == "综合保险" ) { #PayAccountData.Provide_PayAccountData = 0; #PayAccountData.Idleness_PayAccountData = 0; #PayAccountData.Medical_PayAccountData = 0; #PayAccountData.AccumulationFund_PayAccountData = 0; } if (#Employee.Insurance_Employee == "三金") { #PayAccountData.Provide_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.ProvideInsure_PaySetting / 100; #PayAccountData.Idleness_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.IdlenessInsure_PaySetting / 100; #PayAccountData.Medical_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.MedicalInsure_PaySetting / 100; #PayAccountData.AccumulationFund_PayAccountData = 0; } if (#Employee.Insurance_Employee == "四金") { #PayAccountData.Provide_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.ProvideInsure_PaySetting / 100; #PayAccountData.Idleness_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.IdlenessInsure_PaySetting / 100; #PayAccountData.Medical_PayAccountData = #PaySetting.ThreeFundBase_PaySetting * #PaySetting.MedicalInsure_PaySetting / 100; #PayAccountData.AccumulationFund_PayAccountData = (#PayAccountData.BasicPay_PayAccountData + #PaySetting.AccFundAdjust_PaySetting) * #PaySetting.HouseAccFund_PaySetting / 100; } if (#Employee.Insurance_Employee == "公积金") { #PayAccountData.Provide_PayAccountData = 0; #PayAccountData.Idleness_PayAccountData = 0; #PayAccountData.Medical_PayAccountData = 0; #PayAccountData.AccumulationFund_PayAccountData = (#PayAccountData.BasicPay_PayAccountData + #PaySetting.AccFundAdjust_PaySetting) * #PaySetting.HouseAccFund_PaySetting / 100; } } #PayAccountData.Total_PayAccountData = #PayAccountData.BasicPay_PayAccountData + #PayAccountData.AttendanceBounty_PayAccountData + #PayAccountData.OvertimePay_PayAccountData + #PayAccountData.Bonus_PayAccountData - #PayAccountData.Later_PayAccountData - #PayAccountData.LeaveEarly_PayAccountData - #PayAccountData.Absent_PayAccountData - #PayAccountData.Sick_PayAccountData - #PayAccountData.Event_PayAccountData - #PayAccountData.Provide_PayAccountData - #PayAccountData.Idleness_PayAccountData - #PayAccountData.Medical_PayAccountData - #PayAccountData.AccumulationFund_PayAccountData - #PayAccountData.Detain_PayAccountData; if (#Employee.Country_Employee == 40) { @TaxBegin = #PaySetting.TaxBeginCH_PaySetting; } else { @TaxBegin = #PaySetting.TaxBeginF_PaySetting; } if(Search("SearchTaxSetting",#PayAccountData.Total_PayAccountData,#PayAccountData.AttendanceBounty_PayAccountData,@TaxBegin)) { #PayAccountData.Tax_PayAccountData = (#PayAccountData.Total_PayAccountData-#PayAccountData.AttendanceBounty_PayAccountData-@TaxBegin) * #TaxSetting.TaxRate_TaxSetting /100 - #TaxSetting.FastDeduct_TaxSetting; } else { #PayAccountData.Tax_PayAccountData = 0; } #PayAccountData.FactPay_PayAccountData = #PayAccountData.Total_PayAccountData - #PayAccountData.Tax_PayAccountData; if (#PayAccount.FactDays_AttendanceResult == #AttendanceResultData.DutyDays_AttendanceResultData) { if (#PayAccountData.Later_PayAccountData == 0 || #PayAccountData.LeaveEarly_PayAccountData == 0 || #PayAccountData.Absent_PayAccountData == 0 || #PayAccountData.Sick_PayAccountData == 0 || #PayAccountData.Event_PayAccountData == 0) { #PayAccountData.AttendanceBounty_PayAccountData = 100; } } if (Search("SearchModifyBill",#PayAccountData.ID_Employee,#PayAccount.Begin_AttendanceResult)) { #PayAccountData.Comment_PayAccountData = "有借出未还"; } } ResumeLayout(); ]]> if(Search("SearchPayAccountByNoFirst", tbNo.CValue)) { Search("SearchFactDays",#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult); #PayAccount.FactDays_AttendanceResult = #FactDays.WorkDays_AttendanceResultData; ChangeMode("View"); } if(Search("SearchPayAccountByNoPrevious", tbNo.CValue)) { Search("SearchFactDays",#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult); #PayAccount.FactDays_AttendanceResult = #FactDays.WorkDays_AttendanceResultData; ChangeMode("View"); } if(Search("SearchPayAccountByNoNext", tbNo.CValue)) { Search("SearchFactDays",#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult); #PayAccount.FactDays_AttendanceResult = #FactDays.WorkDays_AttendanceResultData; ChangeMode("View"); } if(Search("SearchPayAccountByNoLast", tbNo.CValue)) { Search("SearchFactDays",#PayAccount.Begin_AttendanceResult,#PayAccount.End_AttendanceResult); #PayAccount.FactDays_AttendanceResult = #FactDays.WorkDays_AttendanceResultData; ChangeMode("View"); } ; ChangeMode("Search"); @a = #PayAccount.No_AttendanceResult; @b = #PayAccount.FactDays_AttendanceResult; Empty(); NewInstance(); Search("SearchPayAccount",@a); #PayAccount.FactDays_AttendanceResult = @b; ChangeMode("View"); ChangeMode("Modify"); Delete(); ChangeMode("Search"); PrintReport(); BeginAudit(); #PayAccount.ID_Assessor = GetLoginUserID(); #PayAccount.Name_Assessor = GetCurrentUser(); #PayAccount.AssessDate_PayAccount = DateTimeNow(); Audit(); ChangeMode("View"); EndAudit(); BeginUnAudit(); #PayAccount.ID_Assessor = DBNull(); #PayAccount.Name_Assessor = ""; UnAudit(); ChangeMode("View"); EndUnAudit(); ; ; ; Search("SearchPaySetting"); Search("SearchEmployee",#PayAccountData.ID_Employee); #PayAccountData.Total_PayAccountData = #PayAccountData.BasicPay_PayAccountData + #PayAccountData.AttendanceBounty_PayAccountData + #PayAccountData.OvertimePay_PayAccountData + #PayAccountData.Bonus_PayAccountData - #PayAccountData.Later_PayAccountData - #PayAccountData.LeaveEarly_PayAccountData - #PayAccountData.Absent_PayAccountData - #PayAccountData.Sick_PayAccountData - #PayAccountData.Event_PayAccountData - #PayAccountData.Provide_PayAccountData - #PayAccountData.Idleness_PayAccountData - #PayAccountData.Medical_PayAccountData - #PayAccountData.AccumulationFund_PayAccountData - #PayAccountData.Detain_PayAccountData; if (#Employee.Country_Employee == 40) { @TaxBegin = #PaySetting.TaxBeginCH_PaySetting; } else { @TaxBegin = #PaySetting.TaxBeginF_PaySetting; } if(Search("SearchTaxSetting",#PayAccountData.Total_PayAccountData,#PayAccountData.AttendanceBounty_PayAccountData,@TaxBegin)) { #PayAccountData.Tax_PayAccountData = (#PayAccountData.Total_PayAccountData-#PayAccountData.AttendanceBounty_PayAccountData-@TaxBegin) * #TaxSetting.TaxRate_TaxSetting /100 - #TaxSetting.FastDeduct_TaxSetting; } else { #PayAccountData.Tax_PayAccountData = 0; } #PayAccountData.FactPay_PayAccountData = #PayAccountData.Total_PayAccountData - #PayAccountData.Tax_PayAccountData; Search("SearchPaySetting"); Search("SearchEmployee",#PayAccountData.ID_Employee); #PayAccountData.Total_PayAccountData = #PayAccountData.BasicPay_PayAccountData + #PayAccountData.AttendanceBounty_PayAccountData + #PayAccountData.OvertimePay_PayAccountData + #PayAccountData.Bonus_PayAccountData - #PayAccountData.Later_PayAccountData - #PayAccountData.LeaveEarly_PayAccountData - #PayAccountData.Absent_PayAccountData - #PayAccountData.Sick_PayAccountData - #PayAccountData.Event_PayAccountData - #PayAccountData.Provide_PayAccountData - #PayAccountData.Idleness_PayAccountData - #PayAccountData.Medical_PayAccountData - #PayAccountData.AccumulationFund_PayAccountData - #PayAccountData.Detain_PayAccountData; if (#Employee.Country_Employee == 40) { @TaxBegin = #PaySetting.TaxBeginCH_PaySetting; } else { @TaxBegin = #PaySetting.TaxBeginF_PaySetting; } if(Search("SearchTaxSetting",#PayAccountData.Total_PayAccountData,#PayAccountData.AttendanceBounty_PayAccountData,@TaxBegin)) { #PayAccountData.Tax_PayAccountData = (#PayAccountData.Total_PayAccountData-#PayAccountData.AttendanceBounty_PayAccountData-@TaxBegin) * #TaxSetting.TaxRate_TaxSetting /100 - #TaxSetting.FastDeduct_TaxSetting; } else { #PayAccountData.Tax_PayAccountData = 0; } #PayAccountData.FactPay_PayAccountData = #PayAccountData.Total_PayAccountData - #PayAccountData.Tax_PayAccountData;
Empty(); NewInstance(); tbNo.ReadOnly = false; cbDept.Enabled = false; dtStart.Enabled = false; dtEnd.Enabled = false; txtDate.ReadOnly = true; ikTextBox1.ReadOnly = true; txtCreator.ReadOnly = true; dttCreateDate.ReadOnly = true; txtAssessor.ReadOnly = true; dtAssessDate.ReadOnly = true; txtLastModUser.ReadOnly = true; dtLastModDate.ReadOnly = true; btnSearch.Enabled = false; dgCalendarList.ReadOnly = true; toolBar.EnableSubmit = false; toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; #PayAccount.AssessDate_PayAccount = DBNull(); #PayAccount.LastModUser_PayAccount = DBNull(); #PayAccount.LastModDate_PayAccount = DBNull(); UpdateForm(true, ""); tbNo.Focus(); @Status = 0; Empty(); NewInstance(); tbNo.ReadOnly = true; cbDept.Enabled = false; dtStart.Enabled = false; dtEnd.Enabled = false; txtDate.ReadOnly = true; ikTextBox1.ReadOnly = false; txtCreator.ReadOnly = true; dttCreateDate.ReadOnly = true; txtAssessor.ReadOnly = true; dtAssessDate.ReadOnly = true; txtLastModUser.ReadOnly = true; dtLastModDate.ReadOnly = true; btnSearch.Enabled = true; dgCalendarList.ReadOnly = false; toolBar.EnableSubmit = true; toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; #PayAccount.ID_PayAccount = NewGuid(); #PayAccount.ID_Creator = GetLoginUserID(); #PayAccount.Name_Creator = GetCurrentUser(); #PayAccount.ID_Assessor = DBNull(); #PayAccount.AssessDate_PayAccount = DBNull(); #PayAccount.LastModUser_PayAccount = DBNull(); #PayAccount.LastModDate_PayAccount = DBNull(); UpdateForm(true, ""); ikTextBox1.Focus(); @Status = 1; tbNo.ReadOnly = true; cbDept.Enabled = false; dtStart.Enabled = false; dtEnd.Enabled = false; txtDate.ReadOnly = true; ikTextBox1.ReadOnly = true; txtCreator.ReadOnly = true; dttCreateDate.ReadOnly = true; txtAssessor.ReadOnly = true; dtAssessDate.ReadOnly = true; txtLastModUser.ReadOnly = true; dtLastModDate.ReadOnly = true; btnSearch.Enabled = false; dgCalendarList.ReadOnly = true; toolBar.EnableSubmit = false; toolBar.EnablePrint = true; if(Equals(#PayAccount.ID_Assessor,DBNull())) { toolBar.EnableModify = GetRight(@Title,"修改"); toolBar.EnableDelete = GetRight(@Title,"删除"); toolBar.EnableAudit = GetRight(@Title,"审核");; toolBar.EnableUnAudit = false; } else { toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = GetRight(@Title,"取消审核"); } toolBar.EnablePrint = true; UpdateForm(true, ""); @Status = 2; tbNo.Focus(); tbNo.ReadOnly = true; cbDept.Enabled = false; dtStart.Enabled = false; dtEnd.Enabled = false; txtDate.ReadOnly = true; ikTextBox1.ReadOnly = false; txtCreator.ReadOnly = true; dttCreateDate.ReadOnly = true; txtAssessor.ReadOnly = true; dtAssessDate.ReadOnly = true; txtLastModUser.ReadOnly = true; dtLastModDate.ReadOnly = true; btnSearch.Enabled = true; dgCalendarList.ReadOnly = false; toolBar.EnableSubmit = true; toolBar.EnableModify = false; toolBar.EnableDelete = false; toolBar.EnableAudit = false; toolBar.EnableUnAudit = false; toolBar.EnablePrint = false; #PayAccount.LastModUser_PayAccount = GetLoginUserID(); #PayAccount.LastModUserName = GetCurrentUser(); #PayAccount.LastModDate_PayAccount = DateTimeNow(); UpdateForm(true, ""); @Status = 3;