Skip to content

Commit

Permalink
style: Ubah Nett jadi Netto
Browse files Browse the repository at this point in the history
  • Loading branch information
pipinfitriadi committed Feb 5, 2024
1 parent bce9e70 commit debdd74
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1 class="text-center">Kalkulator Pajak</h1>
<tr>
<th scope="col" class="text-center">Bulan</th>
<th scope="col" class="text-center">Pajak</th>
<th scope="col" class="text-center">Penghasilan (<i>nett</i>)</th>
<th scope="col" class="text-center">Penghasilan (<i>netto</i>)</th>
</tr>
</thead>
<tbody class="table-group-divider">
Expand Down Expand Up @@ -339,8 +339,8 @@ <h1 class="text-center">Kalkulator Pajak</h1>
pajakCols = document.querySelectorAll('tbody tr:not(:last-child) td:nth-child(2)'),
pajakDesCol = document.querySelector('tbody tr:last-child td:nth-child(2)'),
pajakTotalCol = document.querySelector('tfoot th:nth-child(2)'),
penghasilanNettCols = document.querySelectorAll('tbody tr:not(:last-child) td:last-child'),
penghasilanNettDesCol = document.querySelector('tbody tr:last-child td:last-child'),
penghasilanNettoCols = document.querySelectorAll('tbody tr:not(:last-child) td:last-child'),
penghasilanNettoDesCol = document.querySelector('tbody tr:last-child td:last-child'),
penghasilanTotalCol = document.querySelector('tfoot th:last-child');

form.onsubmit = function(event) {
Expand Down Expand Up @@ -385,8 +385,8 @@ <h1 class="text-center">Kalkulator Pajak</h1>
)
- pajakJanNov * 11
),
penghasilanNettJanNov = penghasilanBruto - pajakJanNov,
penghasilanNettDes = penghasilanBruto - pajakDes;
penghasilanNettoJanNov = penghasilanBruto - pajakJanNov,
penghasilanNettoDes = penghasilanBruto - pajakDes;

pajakCols.forEach(
(elem) =>
Expand All @@ -406,12 +406,12 @@ <h1 class="text-center">Kalkulator Pajak</h1>
);
pajakTotalCol.textContent = `Rp${(pajakJanNov * 11 + pajakDes).toLocaleString(LOCALE_STRING)}`;

penghasilanNettCols.forEach(
penghasilanNettoCols.forEach(
(elem) =>
elem.textContent = `Rp${penghasilanNettJanNov.toLocaleString(LOCALE_STRING)}`
elem.textContent = `Rp${penghasilanNettoJanNov.toLocaleString(LOCALE_STRING)}`
);
penghasilanNettDesCol.textContent = `Rp${penghasilanNettDes.toLocaleString(LOCALE_STRING)}`;
penghasilanTotalCol.textContent = `Rp${(penghasilanNettJanNov * 11 + penghasilanNettDes).toLocaleString(LOCALE_STRING)}`;
penghasilanNettoDesCol.textContent = `Rp${penghasilanNettoDes.toLocaleString(LOCALE_STRING)}`;
penghasilanTotalCol.textContent = `Rp${(penghasilanNettoJanNov * 11 + penghasilanNettoDes).toLocaleString(LOCALE_STRING)}`;

table.classList.remove('visually-hidden');

Expand All @@ -424,8 +424,8 @@ <h1 class="text-center">Kalkulator Pajak</h1>
pajakCols.forEach((elem) => elem.textContent = '');
pajakDesCol.textContent = '';

penghasilanNettCols.forEach((elem) => elem.textContent = '');
penghasilanNettDesCol.textContent = '';
penghasilanNettoCols.forEach((elem) => elem.textContent = '');
penghasilanNettoDesCol.textContent = '';

return true;
}
Expand Down

0 comments on commit debdd74

Please sign in to comment.