Skip to content

Commit

Permalink
fix: again
Browse files Browse the repository at this point in the history
  • Loading branch information
itsemon245 committed May 3, 2024
1 parent 8429244 commit 47c5940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Controllers/Frontend/TaxCalculatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ public function calcTax(int $value, $request, string $type)
$minTaxApplied = $minTax > $tax;
$tax = $minTaxApplied ? $minTax : $tax;
}
$value -= $amountForTax;
if (!($type == 'turnover' && $key == 0)) {
$value -= $amountForTax;
}
$totalTax += $tax;
if ($value <= 0) {
break;
Expand Down

0 comments on commit 47c5940

Please sign in to comment.