@extends('admin.layouts.master') @section('title', 'Sales') @section('content')
@php $user = Auth::user(); $isTelecaller = $user->user_type == 2; $isManager = $user->designation == 'Manager'; // convert ["2"] to array $cityIds = json_decode($user->cityId, true); // get first city id $cityId = !empty($cityIds) ? $cityIds[0] : ''; $links = [ ['label' => 'Total assessment', 'url' => '/sale', 'class' => 'btn-outline-primary'], ['label' => 'Company', 'url' => '/sale_company', 'class' => 'btn-outline-success'], ['label' => 'Focus Item', 'url' => '/focusitem', 'class' => 'btn-outline-primary'], ['label' => 'ECO', 'url' => '/eco', 'class' => 'btn-outline-success'], ['label' => 'Sale register', 'url' => '/saleregister', 'class' => 'btn-outline-primary'], ['label' => 'Customer', 'url' => '/customerledger', 'class' => 'btn-outline-success'], ['label' => 'AREA WISE', 'url' => '/areawise', 'class' => 'btn-outline-primary'], ]; @endphp
Filter
@foreach($links as $link) @php $url = $link['url']; // Add telecaller param only if user is telecaller AND NOT manager if ($isTelecaller && !$isManager) { $url .= '?telecaller=' . $user->id . '&city=' . $cityId; } @endphp {{ $link['label'] }} @endforeach
Filter
Outstanding Receivable

Outstanding receivable report content goes here.

Filter
Day Collection

Day-wise collection details go here.

Filter
Profit & Loss

Profit & loss summary goes here.

@endsection