public static decimal CountPension(SalaryEmployeePayment salaryEmployeePayment) { decimal pension = 0; pension = salaryEmployeePayment.RPensionEmp.Value; return(pension); }
public static decimal CountJHT(SalaryEmployeePayment salaryEmployeePayment) { decimal jht = 0; jht = salaryEmployeePayment.RJHTEmp.Value; return(jht); }
public static decimal CountJP(SalaryEmployeePayment salaryEmployeePayment) { decimal jp = 0; jp = salaryEmployeePayment.RJPEmp.Value; return(jp); }
public static decimal CountPPh21(SalaryEmployeePayment salaryEmployeePayment) { decimal pph21 = 0; pph21 += salaryEmployeePayment.PPH21Emp.Value; return(pph21); }
public static decimal GetBegSalaryPPh21(SalaryEmployeePayment salaryEmployeePayment) { decimal begNetto = 0; begNetto = salaryEmployeePayment.BegRPPH21.Value; return(begNetto); }
public static int GetCurrentPeriod(SalaryEmployeePayment salaryEmployeePayment) { int period = 0; period = int.Parse(salaryEmployeePayment.PaymentPeriod.Substring(4, 2)); return(period); }
public static PajakTypeData.EmployeeCondition GetEmployeeCondition(SalaryEmployeePayment salaryEmployeePayment) { PajakTypeData.EmployeeCondition employeeCondition = PajakTypeData.EmployeeCondition.Normal; if (salaryEmployeePayment.EmployeeCondition == null) { return(employeeCondition); } switch (salaryEmployeePayment.EmployeeCondition.Value) { case 0: employeeCondition = PajakTypeData.EmployeeCondition.Normal; break; case 1: employeeCondition = PajakTypeData.EmployeeCondition.NewEmployee; break; case 2: employeeCondition = PajakTypeData.EmployeeCondition.Resign; break; case 3: employeeCondition = PajakTypeData.EmployeeCondition.Transfer; break; default: employeeCondition = PajakTypeData.EmployeeCondition.Normal; break; } return(employeeCondition); }
public static decimal CountPPh21Bonus(SalaryEmployeePayment salaryEmployeePayment) { decimal pph21 = 0; pph21 += salaryEmployeePayment.PPH21BonusTHR.Value; pph21 += salaryEmployeePayment.PPH21BackPay.Value; pph21 += salaryEmployeePayment.PPH21Once.Value; pph21 += salaryEmployeePayment.PPH21Claim.Value; pph21 += salaryEmployeePayment.PPH21Leave.Value; return(pph21); }
//menghitung bruto dari 1 baris salary employee payment public static decimal CountBruto(SalaryEmployeePayment salaryEmployeePayment) { decimal bruto = 0; bruto += salaryEmployeePayment.RBasicSalary.Value; bruto += salaryEmployeePayment.RAllowance.Value; bruto -= salaryEmployeePayment.RDeduction.Value; bruto += salaryEmployeePayment.ROverTime.Value; bruto += salaryEmployeePayment.RJKM.Value; bruto += salaryEmployeePayment.RJKK.Value; bruto += salaryEmployeePayment.RBPJSComp.Value; bruto += salaryEmployeePayment.TunjPPH21Emp.Value; return(bruto); }
//menghitung bruto dari 1 baris salary employee payment public static decimal CountBrutoBonus(SalaryEmployeePayment salaryEmployeePayment) { decimal bruto = 0; bruto += salaryEmployeePayment.RBonusTHR.Value; bruto += salaryEmployeePayment.RBackPayBasicSalary.Value; bruto += salaryEmployeePayment.RBackPayAllowanceDeduction.Value; bruto += salaryEmployeePayment.RBackPayOverTime.Value; bruto += salaryEmployeePayment.RAllowanceOnce.Value; bruto -= salaryEmployeePayment.RDeductionOnce.Value; bruto += salaryEmployeePayment.RClaim.Value; bruto += salaryEmployeePayment.RLeave.Value; bruto += salaryEmployeePayment.TunjPPH21BonusTHR.Value; bruto += salaryEmployeePayment.TunjPPH21BackPay.Value; bruto += salaryEmployeePayment.TunjPPH21Once.Value; bruto += salaryEmployeePayment.TunjPPH21Claim.Value; bruto += salaryEmployeePayment.TunjPPH21Leave.Value; return(bruto); }
private void button1_Click(object sender, EventArgs e) { Guid employeeId = GetData.GetEmployee("14 2421").Id; string period = "201703"; TaxCalculationMethod taxCalculationMethod = TaxCalculationMethod.WeightedAverage; TaxType taxType = TaxType.TaxEmp; decimal brutoPrev, brutoPrevBonus, brutoCurrent, jhtPrev, jhtCurrent, jpPrev, jpCurrent, pensionPrev, pensionCurrent; PajakTypeData.EmployeeCondition employeeCondition; int periodStart, periodEnd, periodCurent; bool fMarried = false, fNPWP = true; int tanggungan = 0; decimal begSalaryNetto, begSalaryPPh21; decimal brutoYearly, jhtYearly, jpYearly, pensionYearly, biayaJabatan, nettoYearly, PTKP, PKP, PPh21Yearly, PPh21Monthly, sumPPh21Prev, sumPPh21PrevBonus; decimal brutoBonus, brutoWithBonusYearly, biayaJabatanWithBonus, nettoWithBonusYearly, PKPWithBonusYearly, taxWithBonusYearly, taxBonus; List <SalaryEmployeePayment> listPrevPeriodSalaryEmployeePayment = GetData.GetListPrevPeriodSalaryEmployeePayment(employeeId, period.Substring(0, 4), period, taxType); SalaryEmployeePayment currentPeriodSalaryEmployeePayment = GetData.GetSalaryEmployeePayment(employeeId, period, taxType); begSalaryNetto = PajakData.GetBegSalaryNetto(currentPeriodSalaryEmployeePayment); begSalaryPPh21 = PajakData.GetBegSalaryPPh21(currentPeriodSalaryEmployeePayment); brutoPrev = PajakData.CountBrutoListPayment(listPrevPeriodSalaryEmployeePayment); brutoPrevBonus = PajakData.CountBrutoBonusListPayment(listPrevPeriodSalaryEmployeePayment); brutoCurrent = PajakData.CountBruto(currentPeriodSalaryEmployeePayment); jhtPrev = PajakData.CountJHTListPayment(listPrevPeriodSalaryEmployeePayment); jhtCurrent = PajakData.CountJHT(currentPeriodSalaryEmployeePayment); jpPrev = PajakData.CountJPListPayment(listPrevPeriodSalaryEmployeePayment); jpCurrent = PajakData.CountJP(currentPeriodSalaryEmployeePayment); pensionPrev = PajakData.CountPensionListPayment(listPrevPeriodSalaryEmployeePayment); pensionCurrent = PajakData.CountPension(currentPeriodSalaryEmployeePayment); employeeCondition = PajakData.GetEmployeeCondition(currentPeriodSalaryEmployeePayment); periodCurent = PajakData.GetCurrentPeriod(currentPeriodSalaryEmployeePayment); periodStart = PajakData.GetFirstPeriod(listPrevPeriodSalaryEmployeePayment); periodEnd = PajakData.GetEndPeriod(employeeCondition, periodCurent); brutoYearly = PajakCalculation.CalculateBrutoYearly(taxCalculationMethod, brutoCurrent, brutoPrev, brutoPrevBonus, periodStart, periodEnd, periodCurent, employeeCondition); jhtYearly = PajakCalculation.CalculateBpjsOrPensionYearly(taxCalculationMethod, jhtCurrent, jhtPrev, periodStart, periodEnd, periodCurent, employeeCondition); jpYearly = PajakCalculation.CalculateBpjsOrPensionYearly(taxCalculationMethod, jpCurrent, jpPrev, periodStart, periodEnd, periodCurent, employeeCondition); pensionYearly = PajakCalculation.CalculateBpjsOrPensionYearly(taxCalculationMethod, pensionCurrent, pensionPrev, periodStart, periodEnd, periodCurent, employeeCondition); biayaJabatan = PajakCalculation.CalculateBiayaJabatan(brutoYearly, periodStart, periodEnd, employeeCondition); nettoYearly = PajakCalculation.CalculateNettoYearly(brutoYearly, jhtYearly, jpYearly, pensionYearly, biayaJabatan, begSalaryNetto); PTKP = PajakCalculation.CalculatePTKP(fMarried, tanggungan); PKP = PajakCalculation.CalculatePKP(nettoYearly, PTKP); PPh21Yearly = PajakCalculation.CalculateTaxYearly(PKP, fNPWP); sumPPh21Prev = PajakData.CountPPh21ListPayment(listPrevPeriodSalaryEmployeePayment); sumPPh21PrevBonus = PajakData.CountPPh21BonusListPayment(listPrevPeriodSalaryEmployeePayment); PPh21Monthly = PajakCalculation.CalculateTaxMonthly(PPh21Yearly, sumPPh21Prev, sumPPh21PrevBonus, periodStart, periodEnd, periodCurent, begSalaryPPh21, taxCalculationMethod, employeeCondition); brutoBonus = PajakData.CountBrutoBonus(currentPeriodSalaryEmployeePayment); brutoWithBonusYearly = PajakCalculation.CalculateBrutoWithBonusYearly(brutoYearly, brutoBonus); biayaJabatanWithBonus = PajakCalculation.CalculateBiayaJabatan(brutoWithBonusYearly, periodStart, periodEnd, employeeCondition); nettoWithBonusYearly = PajakCalculation.CalculateNettoYearly(brutoWithBonusYearly, jhtYearly, jpYearly, pensionYearly, biayaJabatanWithBonus, begSalaryNetto); PKPWithBonusYearly = PajakCalculation.CalculatePKP(nettoWithBonusYearly, PTKP); taxWithBonusYearly = PajakCalculation.CalculateTaxYearly(PKPWithBonusYearly, fNPWP); taxBonus = PajakCalculation.CalculateTaxBonusMonthly(PPh21Yearly, taxWithBonusYearly); decimal pph21 = PajakData.CountPPh21(currentPeriodSalaryEmployeePayment); decimal pph21Bonus = PajakData.CountPPh21Bonus(currentPeriodSalaryEmployeePayment); decimal pph21Total = pph21 + pph21Bonus; label2.Text = PPh21Monthly.ToString("#,0.00"); label1.Text = pph21Total.ToString("#,0.00"); label3.Text = taxBonus.ToString("#,0.00"); //PPh21Monthly=PajakCalculation.CalculateTaxMonthly(PPh21Yearly,) //PPh21Yearly=PajakCalculation.CalculateTaxYearly(PKP,) //decimal brutoYearly =PajakCalculation.CalculateBrutoYearly(taxCalculationMethod,brutoCurrent,brutoPrev,brutoPrevBonus) //Pajak.CalculateBrutoYearly(employeeId, taxCalculationMethod, brutoCurrent, brutoPrev, brutoPrevBonus, 1, 12, int.Parse(period.Substring(4, 2))); //bool fNPWP = true; //decimal brutoCurrent = 0,jhtCurrent=0,jpCurrent=0; //decimal brutoPrev = 19235360,jht; //decimal a = 762036872; //decimal b = Pajak.CalculatePKP(a, Pajak.CalculatePTKP(false, 0)); //decimal c = Pajak.CalculateTaxYearly(b,false); //label1.Text = c.ToString("#,0.00"); }