@extends('admin.layout.app') @section('more-head') @endsection @section('main-content')

OPERATIONS MANAGEMENT SYSTEM

INTERNAL WAYBILLS

SUMMARY REF. LBC TOC CATEGORY COCOA TYPE SEASON GRADE
{{$summary_sheet->ref_no}} {{$summary_sheet->lbc->name}} {{$summary_sheet->port->name}} {{$summary_sheet->category->name}} {{$summary_sheet->cocoa_type->type_name}} {{$summary_sheet->season->name}} {{$summary_sheet->grade}}
@foreach ($regions as $region) @foreach ($internal_waybills as $internal_waybill) @if ($region->id == $internal_waybill->bush_waybill->station->district->region->id) @endif @endforeach @endforeach @foreach ($regions as $region) @if (($region->id == $internal_waybill->bush_waybill->station->district->region->id)) @endif @endforeach
No. Transaction Code Region District Station LBC Company Bush Waybill No. Internal Waybill No. Internal Waybill Date Purity Date Purity Number Purity No. of Bags Purity Grade Purity Category Net Weight Av. Weight per Bag Actual Tonnage Shed Add To Summary
{{$loop->index + 1}}. {{$internal_waybill->bush_delivery->transaction_code}} {{$internal_waybill->bush_waybill->station->district->region->name}} {{$internal_waybill->bush_waybill->station->district->district_name}} {{$internal_waybill->bush_waybill->station->station_name}} {{$internal_waybill->bush_waybill->lbc->name}} {{$internal_waybill->bush_waybill->bush_waybill_no}} {{$internal_waybill->internal_waybill_no}} {{$internal_waybill->internal_waybill_date}} {{$internal_waybill->purity_date}} {{$internal_waybill->purity_number}} {{$internal_waybill->purity_no_of_bags_ok}} {{$internal_waybill->purity_grade}} @foreach ($categorys as $category) @if ($category->id == $internal_waybill->purity_category_id) {{$category->name}} @endif @endforeach {{number_format($internal_waybill->naked_tonnage_ok,2)}} {{number_format($internal_waybill->bag_average,4)}} {{number_format($internal_waybill->actual_tonnage,4)}} {{$internal_waybill->shed->name}}
Bags {{ $internal_waybill->whereHas('bush_waybill.lbc',function ($query) use ($lbc_id){ return $query->where('id', '=', $lbc_id);}) ->whereHas('bush_waybill',function ($query) use ($season_id) { return $query->where('season_id', '=', $season_id);}) ->whereHas('bush_waybill.cocoa_type',function ($query) use ($cocoa_type_id) { return $query->where('id', '=', $cocoa_type_id);}) ->whereHas('bush_delivery.port',function ($query) use ($port_id) { return $query->where('id', '=', $port_id);}) ->whereHas('bush_waybill.station.district.region',function ($query) use ($rid) { return $query->where('id', '=', $rid);}) ->where('summary_sheet_status',2) ->sum('purity_no_of_bags_ok') }}
@endsection @section('more-scripts') @endsection