|
18.05.2011, 14:31 | #1 |
Участник
|
А вот и измененный кусок из DataItem Payroll Calc Type Line
// -> - Заменен кусок кода на код из отчета Payroll Calculation {BEGIN PayrollElement.RESET; PayrollElement.SETRANGE(Code,"Element Code"); IF NOT PayrollElement.FIND('-') THEN CurrReport.SKIP ELSE BEGIN EmployeeSalary.RESET; EmployeeSalary.SETRANGE("Employee No.",Employee."No."); EmployeeSalary.SETRANGE("Salary Code",PayrollElement."Wage Code"); EmployeeSalary.SETFILTER("Starting Date",'<%1',EndDateCalcPeriod); IF EmployeeSalary.FIND('+') THEN BEGIN EmployeeSalary.SETFILTER("Ending Date",'%1|>=%2',0D,CalcPeriodStartDate); IF NOT EmployeeSalary.FIND('-') THEN IF "Payroll Calc Type"."Definition Type" = 1 THEN CurrReport.SKIP; END ELSE IF "Payroll Calc Type"."Definition Type" = 1 THEN CurrReport.SKIP; EmployeePostGroup := EmployeeSalary."Payroll Posting Group"; END; } BEGIN PayrollElement.RESET; PayrollElement.SETRANGE(Code,"Element Code"); IF NOT PayrollElement.FIND('-') THEN CurrReport.SKIP ELSE BEGIN EmployeeSalary.RESET; EmployeeSalary.SETRANGE("Employee No.",Employee."No."); EmployeeSalary.SETRANGE("Salary Code",PayrollElement."Wage Code"); EmployeeSalary.SETRANGE("Starting Payment Date",CalcPeriodStartDate,EndDateCalcPeriod); IF NOT EmployeeSalary.FIND('-') THEN BEGIN EmployeeSalary.SETRANGE("Starting Payment Date"); EmployeeSalary.SETFILTER("Starting Date",'<=%1',EndDateCalcPeriod); IF NOT EmployeeSalary.FIND('-') THEN BEGIN IF "Payroll Calc Type"."Definition Type" = 1 THEN CurrReport.SKIP; END ELSE BEGIN IF EmployeeSalary.FIND('+') THEN BEGIN IF EmployeeSalary."Starting Payment Date" <> 0D THEN CurrReport.SKIP; EmployeeSalary.SETFILTER("Ending Date",'%1|>=%2',0D,CalcPeriodStartDate); IF NOT EmployeeSalary.FIND('-') THEN IF "Payroll Calc Type"."Definition Type" = 1 THEN CurrReport.SKIP; END; END; END; EmployeePostGroup := EmployeeSalary."Payroll Posting Group"; END; // <- |
|
19.05.2011, 09:20 | #2 |
Участник
|
|
|