Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
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);
     }
 }