Skip to content

Commit

Permalink
fix: header
Browse files Browse the repository at this point in the history
  • Loading branch information
itsemon245 committed Apr 27, 2024
1 parent 15bc87c commit 6d66d16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
8 changes: 5 additions & 3 deletions app/Http/Controllers/Frontend/TaxCalculatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,15 @@ public function calcTax(int $value, $request, string $type): int
->where('from', '<=', $value)
->last();

$value -= $taxFree;
if ($for === 'company') {
$totalTax = $value * $taxSetting[$type.'_percentage'] / 100;
$value = $value - $taxFree;
if ($for == 'company') {
$totalTax = $value > $minTax ? $value * $taxSetting[$type.'_percentage'] / 100 : $minTax;
} elseif ($valueSlots->count() > 0) {

foreach ($valueSlots as $key => $slot) {
$tax = (float) 0;
if ($slot->difference < $value) {

if ($taxFree > 0 && $key === 0) {
$tax = ($slot->difference - $taxFree) * $slot->tax_percentage / 100;

Expand Down
16 changes: 14 additions & 2 deletions resources/views/frontend/layouts/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,19 @@ class="nav-link text-light">{{ $sub->name }}</a>
</li>
@endforeach
<li
class="nav-item custom-nav-item {{ request()->routeIs('page.industries') ? 'active-link' : '' }}">
class="nav-item custom-nav-item dropdown-trigger {{ request()->routeIs('page.industries') ? 'active-link' : '' }}">
<a class=" nav-link text-light" href="{{ route('page.industries') }}">Account & Audit</a>

{{-- Account Services --}}
<ul class="position-absolute dropdown">
@foreach ($customServicesAccount as $service)
<li
class="nav-item custom-nav-item dropdown-item {{ url()->current() == $service->link ? 'active-link' : '' }}">
<a href="{{ $service->link }}"
class="nav-link text-light">{{ $service->title }}</a>
</li>
@endforeach
</ul>
</li>

<li class="nav-item custom-nav-item position-relative dropdown-trigger">
Expand Down Expand Up @@ -394,7 +405,8 @@ class="nav-link text-light">{{ $course->name }}</a></li>
<li class="nav-item custom-nav-item {{ request()->routeIs('home') ? 'active-link' : '' }}">
<a class=" nav-link text-light" href="{{ route('home') }}">Home</a>
</li>
<li class="nav-item custom-nav-item {{ request()->routeIs('page.industries') ? 'active-link' : '' }}">
<li
class="nav-item custom-nav-item {{ request()->routeIs('page.industries') ? 'active-link' : '' }}">
<a class=" nav-link text-light" href="{{ route('page.industries') }}">Industries</a>
</li>
{{-- Services Caegories --}}
Expand Down

0 comments on commit 6d66d16

Please sign in to comment.