Ejemplo n.º 1
0
        public void DoPayFxB_AvPay(decimal valt, decimal[] vals)
        {
            if (valt == 0.0M)
            {
                return;
            }
            var PFx_avpay = new PayFx2();

            PFx_avpay.SetFrom(this);
            PFx_avpay.Caption = "Vidējās izpeļņas dienas";
            PFx_avpay.Pay     = valt;

            var partpfxs = new PayFx2[Parts.Count];

            for (int i = 0; i < Parts.Count; i++)
            {
                var partpfx   = Parts[i];
                var pfx_avpay = new PayFx2();
                pfx_avpay.SetFrom(partpfx);
                pfx_avpay.Caption = "Vidējās izpeļņas dienas";
                pfx_avpay.Pay     = vals[i];
                partpfxs[i]       = pfx_avpay;
            }
            //AddEqallyAndRound(partpfxs, Parts);
            AddIncrementallySplitAndRound(PFx_avpay, partpfxs);
        }
Ejemplo n.º 2
0
        public void DoPayFxB_SickPay(decimal valt, decimal[] vals)
        {
            if (valt == 0.0M)
            {
                return;
            }
            PFx_sickpay = new PayFx2();
            PFx_sickpay.SetFrom(this);
            PFx_sickpay.Caption = "Slimības nauda";
            PFx_sickpay.Pay     = valt;

            var partpfxs = new PayFx2[Parts.Count];

            for (int i = 0; i < Parts.Count; i++)
            {
                var partpfx      = Parts[i];
                var PFxA_sickpay = new PayFx2();
                PFxA_sickpay.SetFrom(partpfx);
                partpfx.PFx_sickpay  = PFxA_sickpay;
                PFxA_sickpay.Caption = "Slimības nauda";
                PFxA_sickpay.Pay     = vals[i];
                partpfxs[i]          = PFxA_sickpay;
            }
            //PFxB.AddEqallyAndRound(partpfxs, PFxB.Parts);
            AddIncrementallySplitAndRound(PFx_sickpay, partpfxs);
        }
Ejemplo n.º 3
0
        public void DoPayFxB_Salary(decimal valt, decimal[] vals)
        {
            if (valt == 0.0M)
            {
                return;
            }
            var PFx_salary = new PayFx2();

            PFx_salary.SetFrom(this);
            PFx_salary.Caption = "Darba samaksa";
            PFx_salary.Pay     = valt;

            var partpfxs = new PayFx2[Parts.Count];

            for (int i = 0; i < Parts.Count; i++)
            {
                var partpfx    = Parts[i];
                var pfx_salary = new PayFx2();
                pfx_salary.SetFrom(partpfx);
                pfx_salary.Caption = "Darba samaksa";
                pfx_salary.Pay     = vals[i];
                partpfxs[i]        = pfx_salary;
            }
            //AddEqallyAndRound(partpfxs, Parts);
            AddIncrementallySplitAndRound(PFx_salary, partpfxs);
        }
Ejemplo n.º 4
0
        public void DoPayFxB_VacationPrev(decimal valt, decimal[] vals)
        {
            if (valt == 0.0M)
            {
                return;
            }
            PFx_vacation_prev = new PayFx2();
            PFx_vacation_prev.SetFrom(this);
            PFx_vacation_prev.Caption = "Iepriekš izmaksātā atv.n.";
            PFx_vacation_prev.Pay    += valt;
            PFx_vacation_prev.CalcAllAndRound();
            PFx_vacation_prev.Subtract(this);

            var partpfxs = new PayFx2[Parts.Count];

            for (int i = 0; i < Parts.Count; i++)
            {
                var partpfx            = Parts[i];
                var PFxA_vacation_prev = new PayFx2();
                PFxA_vacation_prev.SetFrom(partpfx);
                partpfx.PFx_vacation       = PFxA_vacation_prev;
                PFxA_vacation_prev.Caption = "Atvaļinājuma nauda";
                PFxA_vacation_prev.Pay     = vals[i];
                partpfxs[i] = PFxA_vacation_prev;
            }
            SplitAndRound(PFx_vacation, partpfxs);
        }
Ejemplo n.º 5
0
        public void DoPayFxB_Vacation(decimal valt, decimal[] vals)
        {
            if (valt == 0.0M)
            {
                return;
            }
            PFx_vacation = new PayFx2();
            PFx_vacation.SetFrom(this);
            PFx_vacation.Caption = "Atvaļinājuma nauda";
            PFx_vacation.Pay     = valt;

            var partpfxs = new PayFx2[Parts.Count];

            for (int i = 0; i < Parts.Count; i++)
            {
                var partpfx       = Parts[i];
                var PFxA_vacation = new PayFx2();
                PFxA_vacation.SetFrom(partpfx);
                partpfx.PFx_vacation  = PFxA_vacation;
                PFxA_vacation.Caption = "Atvaļinājuma nauda";
                PFxA_vacation.Pay     = vals[i];
                partpfxs[i]           = PFxA_vacation;
            }
            //PFxB.AddEqallyAndRound(partpfxs, PFxB.Parts);
            AddIncrementallySplitAndRound(PFx_vacation, partpfxs);
        }
Ejemplo n.º 6
0
        public void AddIncrementallyAndRound(PayFx2 row)
        {
            var p1 = new PayFx();

            p1.SetFrom(this);
            AddPayRound(row);
            CalcAllAndRound();
            row.SetFrom(this);
            row.Subtract(p1);
            Rows.Add(row);
        }
Ejemplo n.º 7
0
 public void DoPayFxA_SickPay(decimal val)
 {
     if (val == 0.0M)
     {
         return;
     }
     PFx_sickpay = new PayFx2();
     PFx_sickpay.SetFrom(this);
     PFx_sickpay.Caption = "Slimības nauda";
     PFx_sickpay.Pay     = val;
     AddIncrementallyAndRound(PFx_sickpay);
 }
Ejemplo n.º 8
0
        public void DoPayFxA_AvPay(decimal val)
        {
            if (val == 0.0M)
            {
                return;
            }
            var px_avpay = new PayFx2();

            px_avpay.SetFrom(this);
            px_avpay.Caption = "Vidējās izpeļņas dienas";
            px_avpay.Pay     = val;
            AddIncrementallyAndRound(px_avpay);
        }
Ejemplo n.º 9
0
        public void DoPayFxA_Salary(decimal val)
        {
            if (val == 0.0M)
            {
                return;
            }
            var px_salary = new PayFx2();

            px_salary.SetFrom(this);
            px_salary.Caption = "Darba samaksa";
            px_salary.Pay     = val;
            AddIncrementallyAndRound(px_salary);
        }
Ejemplo n.º 10
0
        public void AddIncrementallySplitAndRound(PayFx2 rowt, PayFx2[] rows)
        {
            var p1 = new PayFx();

            p1.SetFrom(this);
            AddPayRound(rowt);
            CalcAllAndRound();
            rowt.SetFrom(this);
            rowt.Subtract(p1);

            SplitAndRound(rowt, rows);

            Rows.Add(rowt);
        }
Ejemplo n.º 11
0
 private void MakePfx()
 {
     BonusPfx = new PayFx2[DataRows.Length];
     for (int i = 0; i < DataRows.Length; i++)
     {
         var p1 = new PayFx2(CalcR);
         p1.IinEx   = CalcR.ExMax2.SumIINExemptsAll();
         p1.Caption = DataRows[i].DESCR;
         if (string.IsNullOrEmpty(p1.Caption))
         {
             p1.Caption = "Piemaksa";
         }
         BonusPfx[i] = p1;
     }
 }
Ejemplo n.º 12
0
        public void AddIncrementally(PayFx2 row)
        {
            var p1 = new PayFx();

            p1.SetFrom(this);
            AddPay(row);
            CalcAll();
            var p2 = new PayFx();

            p2.SetFrom(this);
            p2.Subtract(p1);

            row.DNS       = p2.DNS;
            row.UsedIinEx = p2.UsedIinEx;
            row.IIN       = p2.IIN;
            row.Cash      = p2.Cash;

            Rows.Add(row);
        }
Ejemplo n.º 13
0
 public new void AddIncrementallySplitAndRound(PayFx2 rowt, PayFx2[] rows)
 {
     if (rows.Length != Parts.Count)
     {
         throw new ArgumentException();
     }
     base.AddIncrementallySplitAndRound(rowt, rows);
     for (int i = 0; i < rows.Length; i++)
     {
         var pfx = rows[i];
         if (pfx == null)
         {
             continue;
         }
         var part = Parts[i];
         part.Add(pfx);
         part.Rows.Add(pfx);
     }
 }
Ejemplo n.º 14
0
 public void DoPayFxA_Vacation(decimal val, decimal val_prev)
 {
     if (val_prev > 0.0M)
     {
         PFx_vacation_prev = new PayFx2();
         PFx_vacation_prev.SetFrom(this);
         PFx_vacation_prev.Caption = "Iepriekš izmaksātā atv.n.";
         PFx_vacation_prev.Pay    += val_prev;
         PFx_vacation_prev.CalcAllAndRound();
         PFx_vacation_prev.Subtract(this);
     }
     if (val > 0.0M)
     {
         PFx_vacation = new PayFx2();
         PFx_vacation.SetFrom(this);
         PFx_vacation.Caption = "Atvaļinājuma nauda";
         PFx_vacation.Pay     = val;
         AddIncrementallyAndRound(PFx_vacation);
     }
 }
Ejemplo n.º 15
0
 public virtual void SetFrom(PayFx2 from)
 {
     base.SetFrom(from);
     Caption  = from.Caption;
     Position = from.Position;
 }