@extends('main') @section('content')
@if($from_date != "") @else @endif
@if($to_date != "") @else @endif
@foreach($cdata as $k=>$v)

Total Registered {{$v['craft']}}

{{$v['craft_total']}}

@endforeach

Physical Test Complete

@php $ptestcount = 0 ;@endphp @foreach($carpets as $c) @if($c->physicalTest == 'Pass') @php $ptestcount = $ptestcount+1; @endphp @endif @endforeach

{{$ptestcount}}

Lab Test Complete

@php $labtestcount = 0 ;@endphp @foreach($carpets as $c) @if($c->labTest == 'Pass') @php $labtestcount = $labtestcount+1; @endphp @endif @endforeach

{{$labtestcount}}

Qr Code Assigned

@php $qrcount = 0 ;@endphp @foreach($carpets as $c) @if($c->qrcode != null) @php $qrcount = $qrcount+1; @endphp @endif @endforeach

{{$qrcount}}

Certified

@php $certifiedcount = 0 ;@endphp @foreach($carpets as $c) @if($c->status == 'Certified') @php $certifiedcount = $certifiedcount+1; @endphp @endif @endforeach

{{$certifiedcount}}

Crafts Statistics(%)

Total Crafts Registered

{{$carpets->count()}}

Total Crafts Certified

@php if($certified >0) $certper = ($certified / $carpets->count() * 100); else $certper = 0; @endphp {{$certified}}

Total Crafts Rejected

@php if($rejected >0) $rejectedper = $rejected / $carpets->count() * 100; else $rejectedper = 0; @endphp

Crafts With No QR Code

@php $carpets_with_noqr = \App\Carpet::whereNull('qrcode')->whereNotNull('labTest')->get();@endphp @foreach($carpets_with_noqr as $value) @endforeach
S. No. Reg. No Craft Type Weaver Authorized User Status Last Updated BY Last Updated On Contact Details Action
{{$i}} {{$value->gi_registration_no}} {{$value->type}} {{$value->weaver_name}} @if(isset($value->customer)){{$value->customer->name}} @endif @if($value->status == 'Certified') {{$value->status}} @endif @if($value->status == 'Rejected') {{$value->status}} @endif
@if($value->physicalTest != null) Physical Test-Done/{{$value->physicalTest}} @else Physical Test - Pending @endif
@if($value->labTest != null) Lab Test - Done/{{$value->labTest}} @else Lab Test - Pending @endif
@if($value->qrcode != null) QR Code - Assigned @else QR Code (Not-Assigned) @endif
@if(isset($value->updated_by)) @if(!empty($value->updatedby)) {{$value->updatedby->name}} @endif @endif {{$value->updated_at}} @if(isset($value->customer)){{$value->customer->mobile}} @endif
@stop @section('script') @stop