Skip to content

Commit ee0ae25

Browse files
authored
Fix net pay calculation and tax logic in transactionClass
Corrected calculation for net pay and adjusted tax calculations.
1 parent cfb5003 commit ee0ae25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pkg2darr_payrollsystem/transactionClass.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ else if(numDepChoice >= 3)
8080

8181
vat = dataEmployee[i][12] * taxRate;
8282
dataEmployee[i][15] = vat;
83-
dataEmployee[i][13] = dataEmployee[i][12] - dataEmployee[i][9] - vat; //Net pay
83+
dataEmployee[i][13] = (dataEmployee[i][12] * vat) - dataEmployee[i][9]; //Net pay
8484
totalPay += dataEmployee[i][13]; //total net pay of employees
8585
}
8686
}
@@ -96,3 +96,4 @@ public static void Deduction()
9696

9797

9898

99+

0 commit comments

Comments
 (0)