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); }
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); } }