@extends('layouts.print', ['title' => 'گزارش موجودی کالای انبار']) @section('css') @stop @section('content') @php $pre_page = 24.0; $count_data = count($data); $count_page = ceil( $count_data / $pre_page ); $num_page = 0; $gRowNum = 0; $total_rows = 0; @endphp @for($page = 1 ; $page <=$count_page ; $page++ )
{{ $title_company }}

گزارش موجودی انبار

{{ $store ? $store->title . ' (' . $store->gln . ')' : 'همه انبار ها' }}
تاریخ: {{ $date_report }}
@if(count($data)==0) @else @if($col1)@endif @if($col2)@endif @if($col3) @endif @if($col4) @endif @if($col5)@endif @if($col6)@endif @php $c = 0; $rowIndex = 0; for($r = $num_page ; $r < $count_data ; $r++ ){ $c++; if($c==$pre_page ) break; $num_page++; $item=$data[$r]; @endphp @php $numbers="" ; $prices="" ; $ircs="" ; $total_temp=0; $numbyproce=array(); $storeDataItemTemp=[]; if($store_id==0) $storeDataItemTemp=\App\Models\StoreDataItem::where('active' , true)->where('status_id' , 1)->where('withraw_parent_id', null)->where('product_id' , $item->id)->orderBy('id','asc')->get(); else $storeDataItemTemp = \App\Models\StoreDataItem::where('active' , true)->where('status_id' , 1)->where('withraw_parent_id', null)->whereIn('store_data_id', \App\Models\StoreData::where('store_id', $store_id )->get()->pluck('id') )->where('product_id' , $item->id)->orderBy('id','asc')->get(); foreach($storeDataItemTemp as $item_temp ) { $options_price = 0; foreach($item_temp->Options as $option_item) $options_price += $option_item->price; if($col7) $number = ($item_temp->number - \App\Models\StoreDataItem::where('withraw_parent_id', $item_temp->id )->whereIn('status_id', [1, 3])->sum('number') ); else $number = ($item_temp->number - \App\Models\StoreDataItem::where('withraw_parent_id', $item_temp->id )->whereIn('status_id', [1 ])->sum('number') ); $numbers .= '

' . $number . '

'; $ircs .= '

' . $item_temp->irc. '

'; $prices .= '

' . number_format($item_temp->price, 0, '', ',') . '

'; //$total_temp += $number * $item_temp->price; $total_temp += ($number * $item_temp->price) + ($options_price * $number); $tempPriceUn = $item_temp->price + $options_price; if(isset($numbyproce["$tempPriceUn"])) $numbyproce["$tempPriceUn"] += $number; else $numbyproce["$tempPriceUn"] = $number; } $isZero = true; foreach($numbyproce as $key => $num) if($num != 0 ) { $isZero = false; $rowIndex++; } if($isZero==false) { $total_rows += $total_temp; $gRowNum++; } @endphp @if($isZero==false) @if($col1)@endif @if($col2)@endif @if($col3)@endif @if($col4)@endif @if($col5)@endif @if($col6)@endif @endif @php } @endphp @if($page ==$count_page) @endif
ردیفکدکالاIRCکالاموجودیمبلغ واحدجمع کلوضعیت
{{ $gRowNum }}{{ $item->id }}{!! $ircs !!}{{ $item->title }} @foreach($numbyproce as $price => $num) @if($num!=0)

{!! $num !!}

@endif @endforeach
@foreach($numbyproce as $price => $num) @if($num!=0)

{!! number_format($price * 10 , 0, '', ',') !!}

@endif @endforeach
{{ number_format($total_temp * 10 , 0, '', ',') }}
جمع کل {{ number_format($total_rows * 10 , 0, '', ',') }}

ضایعات:

شمارشگر (انبار دار)
مسئول فنی
حسابداری
@endif
@endfor @stop