@extends('layouts.admin.app') @section('title',translate('messages.delivery_man_incentives')) @push('css_or_js') @endpush @section('content')

{{ translate('messages.delivery_man_incentives')}} {{$incentives->total()}}

@csrf
@if($is_history = !Request::is('admin/delivery-man/incentive-history')) @endif {{-- --}} {{-- --}} {{-- --}} @if ($is_history) @endif @foreach($incentives as $k=>$incentive) @if ($is_history) @endif {{-- --}} {{-- --}} {{-- --}} {{-- --}} @if ($is_history) @endif @endforeach
{{translate('sl')}} {{ translate('messages.Delivery Man') }} {{ translate('messages.zone') }}{{ translate('messages.active_hours') }}{{ translate('messages.Minimum Pay') }}{{ translate('messages.Total Earning') }} {{ translate('messages.incentive') }}{{ translate('messages.subsidy') }}{{ translate('messages.date') }} {{translate('messages.status')}}{{translate('messages.action')}}
@if(now()->startOfDay()->gt(\Carbon\Carbon::parse($incentive->date)) && $incentive->status=='pending') @endif {{$k+$incentives->firstItem()}} {{$incentive->deliveryman->f_name.' '.$incentive->deliveryman->l_name}} {{$incentive->zone->name}}{{str_pad((int)($incentive->working_hours/60), 2, '0', STR_PAD_LEFT)}}:{{str_pad((int)($incentive->working_hours % 60), 2, '0', STR_PAD_LEFT)}}{{\App\CentralLogics\Helpers::format_currency($incentive->zone->min_pay)}}{{\App\CentralLogics\Helpers::format_currency($incentive->today_earning)}}{{\App\CentralLogics\Helpers::format_currency($incentive->today_earning)}}{{\App\CentralLogics\Helpers::format_currency($incentive->incentive)}} @if((now()->startOfDay()->gt(\Carbon\Carbon::parse($incentive->date)) || $incentive->zone && now()->gt(\Carbon\Carbon::parse($incentive->zone->closing_time))) && $incentive->status=='pending') @elseif (!$is_history) {{\App\CentralLogics\Helpers::format_currency($incentive->subsidy)}} @else {{\App\CentralLogics\Helpers::format_currency(($incentive->today_earning >= $incentive->min_pay_subsidy) ? 0 : ($incentive->min_pay_subsidy - $incentive->today_earning - $incentive->incentive))}} @endif {{ $incentive->date }} @if($incentive->status=='pending') @elseif($incentive->status=='approved') @else @endif @if(now()->startOfDay()->gt(\Carbon\Carbon::parse($incentive->date)))
{{-- --}} {{-- --}} {{-- @csrf
@csrf
--}}
@endif
{{--
--}} @if (count($incentives) > 0 && $is_history) @endif
@if(count($incentives) !== 0)
@endif
{!! $incentives->links() !!}
@if(count($incentives) === 0)
public
{{translate('no_data_found')}}
@endif
@endsection @push('script_2') @endpush