@extends('backend.layouts.master') @section('section-title', 'Damage') @section('page-title', 'Damage List') @if (check_permission('damage.create')) @section('action-button') Add Damage @endsection @endif @section('content')
Reset Print
@php $sub_total = 0; @endphp @forelse($damages as $key => $data) @php $sub_total += $data->total_amount; @endphp {{-- @dd($data->damageItems) --}} {{-- delete modal --}} @csrf @empty @endforelse
#SL Date Product Name Amount Action
{{ $key + 1 }} {{ $data->date }} @foreach ($data->damageItems as $item)
    @if ($item->product->unit->related_unit == null)
  • {{ $item->product?->name }} ({{ $item->rate }} * {{ $item->main_qty ." ". $item->product->unit->name }} = {{ $item->subtotal }})
  • @else
  • {{ $item->product?->name }} ({{ $item->rate }} * {{ $item->main_qty ." ". $item->product->unit->name ." ". $item->sub_qty . " ".$product->unit->related_unit->name }} = {{ $item->subtotal }})
  • @endif
@endforeach
{{ $data->total_amount }}
No Data Available
Total Price: {{number_format($sub_total,2)}} TK
@endsection