@extends("WarehouseDashboard.layouts.dashboard.app") @section("page-nav-title")

{{__('Documents')}}

@endsection @section("content") @include("layouts.main-parts.page-message") @if(!empty($order_item))
{{__('pdf')}} {{__('Excel')}}
@foreach($branches as $branch) @endforeach @if(hasWarehousePermissions("daily_document_edit")) @endif @php $total=0; $array=$branches->toArray(); $Quantity=[]; if(count($array) >0){ foreach ($array as $key3 => $a){ $Quantity[$key3]=0; } } @endphp @foreach($items as $item) @foreach($branches as $key => $branch) @foreach($order_item as $o_item) @if($item->id == $o_item->id && $branch->id == $o_item->branch_id) @php $Quantity[$key]=[$o_item->quantity,$item->id] @endphp @break @endif @endforeach @endforeach @php $total_Daily=\App\Models\DailyCollectionOrder::whereDate("created_at",now())->where("item_id",$item->id); if($total_Daily->exists()){ $total_new= $total_Daily->first()->new_collection; } @endphp @foreach($branches as $key => $branch) @if(isset($Quantity[$key][0]) && $Quantity[$key][0] != 0 && $Quantity[$key][1] == $item->id) @php $total+=$Quantity[$key][0];@endphp @else @endif @endforeach @if(isset($total_new)) @else @endif @php $total=0; $total_new=null; @endphp @endforeach
{{__("المادة")}}{{$branch->store_name}}{{__('المجموع')}} {{__('الملاحظات')}}{{__('control')}}
{{$item->name}}{{$Quantity[$key][0]}}*{{$total_new}}{{$total}}
@else @endif @endsection @section("scripts") @endsection