Example #1
0
        public ErrorList CalcPayWithAvPay(SalarySheetRowInfo sr, SalaryInfo totalwt = null)
        {
            var err = DoAvPay(sr, TotalRow, totalwt);

            if (err.HasErrors)
            {
                return(err);
            }

            if (PreparingReport)
            {
                foreach (var rr in ReportRows)
                {
                    DoAvPay(sr, rr, totalwt);
                }
            }

            TotalRow._SALARY = TotalRow.SumSalary();
            TotalRow.AddAvPay();

            if (PreparingReport)
            {
                PrepareList(sr.GetPositionTitle());
            }

            return(err);
        }
Example #2
0
        public ErrorList CalcWorkPayTAvPay(SalaryCalcTInfo scti)
        {
            if (!AvPayCalcRequired)
            {
                return(new ErrorList());
            }
            TotalRow = scti.TotalSI;
            //TotalRow.ClearSalaryAvPayPart();

            var sis = scti.LinkedSCI.Select(x => x.SI).ToArray();

            SummAvPayTime2(TotalRow, sis);

            //uses avcalc from LinkedSCI[0] and applies to TotalRow
            LinkedWorkPayCalcs[0].DoAvPay(scti.SRS.TotalRow, TotalRow, null);

            for (int i = 0; i < scti.LinkedSCI.Length; i++)
            {
                var lsci = scti.LinkedSCI[i];
                var wpc  = LinkedWorkPayCalcs[i];
                wpc.TotalRow = lsci.SI;

                var err = wpc.CalcPayWithAvPay(lsci.SR, TotalRow);
                if (err.HasErrors)
                {
                    return(err);
                }

                //TotalRow.AddSalaryAvPayPart(wpc.TotalRow);
            }

            TotalRow._SALARY = TotalRow.SumSalary();
            TotalRow.AddAvPay();

            MakeAvPayExactSum();

            if (PreparingReport)
            {
                PrepareListT();
            }
            return(new ErrorList());
        }
Example #3
0
        private void CalcWorkPayAvPay(SalarySheetRowSetInfo sr, SalaryInfo si)
        {
            TotalRow = si;

            var sis = LinkedWorkPayCalcs.Select(x => x.TotalRow).ToArray();

            SummAvPayTime2(TotalRow, sis);

            LinkedWorkPayCalcs[0].DoAvPay(sr.TotalRow, TotalRow, null);

            for (int i = 0; i < sr.LinkedRows.Length; i++)
            {
                var lr  = sr.LinkedRows[i];
                var wpc = LinkedWorkPayCalcs[i];
                wpc.CalcPayWithAvPay(lr, TotalRow);
                //TotalRow.AddSalaryAvPayPart(wpc.TotalRow);
            }

            TotalRow._SALARY = TotalRow.SumSalary();
            TotalRow.AddAvPay();

            MakeAvPayExactSum();
        }