@include('admin.includes.msg')
| Date |
Type |
Invoice |
Inward |
Outward |
@if(!empty($alldata))
@foreach($alldata as $key=>$val)
@php $totalamount=0; @endphp
@if(@$val['purchase'])
@foreach($val['purchase'] as $k=>$v)
| {{date("d-M Y",strtotime($v['created_at']))}} |
purchase |
{{$v->invoiceNo}} |
{{$v->currentStock}} ({{$v->visible_stock}}) |
|
@php $totalamount+=$v->currentStock; @endphp
@endforeach
@endif
@if(@$val['sell'])
@foreach($val['sell'] as $k=>$v)
| {{date("d-M Y",strtotime($v['created_at']))}} |
@if(Auth::user()->role!=7)
sell |
{{$v->invoiceNo}} ({{$retailer[$v->retailerId]}}) |
|
{{$v->currentStock}} ({{$v->visible_stock}}) |
@php $totalamount-=$v->currentStock; @endphp
@else
@if($v->return_quantity>0)
@if($v->orderStatus == 'Cancel') Cancelled @else sell return @endif |
{{$v->odId}} ({{$v->firstName}}) |
{{$v->quantity+$v->return_quantity}} (-{{$v->return_quantity}} ) |
{{$v->quantity+$v->return_quantity}}
@if(($v->orderreturn==1) || ($v->orderStatus == 'Cancel'))
(Pending to add stock)
@endif
|
@php
if(($v->orderreturn==1) || ($v->orderStatus == 'Cancel')){
$totalamount-=($v->quantity+$v->return_quantity);
}else{
$totalamount-=$v->quantity;
}
@endphp
@else
@if($v->orderStatus == 'Cancel')
Cancelled |
{{$v->odId}} ({{$v->firstName}}) |
|
{{$v->quantity}} (Pending to add stock) |
@elseif($v->orderStatus == 'Deleted')
Cancelled |
{{$v->odId}} ({{$v->firstName}}) |
{{$v->quantity}} |
{{$v->quantity}} |
@else
sell |
{{$v->odId}} ({{$v->firstName}}) |
|
{{$v->quantity}} |
@endif
@php
if($v->orderStatus == 'Deleted'){}else{
$totalamount-=$v->quantity;
}
@endphp
@endif
@endif
@endforeach
@endif
@if(@$val['return'])
@foreach($val['return'] as $k=>$v)
| {{date("d-M Y",strtotime($v['created_at']))}} |
@if(Auth::user()->role!=7) Sale @else Purchase @endif Return |
@if(Auth::user()->role!=7) Sale @else Purchase @endif Return |
@if(Auth::user()->role!=7) {{$v->request_to_return}} @endif |
@if(Auth::user()->role==7) {{$v->request_to_return}} @endif |
@php if(Auth::user()->role!=7){ $totalamount+=$v->request_to_return; }else{ $totalamount-=$v->request_to_return; } @endphp
@endforeach
@endif
@if(@$val['ExchangeFrom'])
@foreach($val['ExchangeFrom'] as $k=>$v)
| {{date("d-M Y",strtotime($v['created_date']))}} |
Manufacture |
Manufacture |
|
{{$v->fromProductQnt}} |
@php $totalamount-=$v->fromProductQnt; @endphp
@endforeach
@endif
@if(@$val['ExchangeTo'])
@foreach($val['ExchangeTo'] as $k=>$v)
| {{date("d-M Y",strtotime($v['created_date']))}} |
Manufacture |
Manufacture |
{{$v->toProductQnt}} |
|
@php $totalamount+=$v->toProductQnt; @endphp
@endforeach
@endif
| {{ \Carbon\Carbon::parse($key)->format('F j, Y') }} |
|
|
|
@endforeach
@endif