@foreach ($directDeliveries as $directDelivery)
{{--
{{ Auth::user()->company_profile->name }}
{{ Auth::user()->company_profile->address }}
PH:{{ Auth::user()->company_profile->phone }} GST NO:{{ Auth::user()->company_profile->gst }}
|
Direct Delivery |
--}}
| Date:{{ \Carbon\Carbon::parse($directDelivery->date)->format('d M Y') }} |
| Transaction Type:{{ $directDelivery->stock_type == 0 ? 'Assign Stock' : ($directDelivery->order_id != null ? 'Sale' : 'Return Stock') }} |
| Staff Name:{{ $directDelivery->user->name }} |
| Stock Location: {{ $directDelivery->stockLocation?->name ?? '--' }} |
| Remarks: {{ $directDelivery->remarks }} |
|
|
| sno |
Items |
Qty |
@if($seperate_lines == 0)
Unit |
Damage |
@else
Weight |
@endif
@php
$weightTotal = 0;
@endphp
@foreach ($directDelivery->items as $item)
| {{ $loop->iteration }} |
{{ $item->stockItem->name }} |
{{ $item->quantity }} |
@if($seperate_lines == 0)
{{ $item->unit->symbol }} |
{{ $item->is_damage == 1 ? 'Yes' : 'No' }} |
@else
@php
$weightSum = 0;
if(is_numeric($item->stockItem->weight)){
$weightSum += $item->stockItem->weight * $item->base_qty;
}
$weightTotal += $weightSum;
@endphp
{{ $weightSum }} |
@endif
@endforeach
|
{{ $directDelivery->items->sum('quantity') }} |
@if($seperate_lines == 0)
|
|
@else
{{ $weightTotal }} |
@endif
@endforeach