@extends('master.app') @section('title', 'Daily Stock History') @section('body')
Daily IN / OUT History
Filter by Date + Warehouse • Print ready • International UI
Back
@include('general.valert') {{-- Filters --}}
{{-- Summary --}}
Total IN Qty
{{ number_format($totalInQty, 2) }}
Rows: {{ $ins->count() }}
Total OUT Qty
{{ number_format($totalOutQty, 2) }}
Rows: {{ $outs->count() }}
{{-- Tabs --}}
{{-- IN TABLE --}}
@forelse($ins as $row) @empty @endforelse
# Category Sub Unit Weight Qty Warehouse Date
{{ $loop->iteration }} {{ $row->category->title_ps ?? $row->category->title_en ?? '-' }} {{ $row->sub_category->title_ps ?? $row->sub_category->title_en ?? '-' }} {{ $row->unit->title_ps ?? $row->unit->title_en ?? '-' }} {{ $row->weight->title_ps ?? $row->weight->title_en ?? '-' }} {{ number_format((float)$row->qty, 2) }} {{ $row->location->name_ps ?? $row->location->name_en ?? ($row->location_id ? 'Loc#'.$row->location_id : '-') }} {{ $row->date ?? '-' }}
No IN records for this date
{{-- OUT TABLE --}}
@forelse($outs as $row) {{-- bill_id safe --}} {{-- these may not exist in your model, so we make it SAFE --}} {{-- qty sometimes named quantity --}} {{-- date fallback --}} @empty @endforelse
# Bill/Invoice Category Sub Unit Weight Qty Warehouse Date
{{ $loop->iteration }} {{ $row->bill_id ?? $row->invoice_number ?? ('#'.$row->id) }} {{ $row->category->title_ps ?? $row->category->title_en ?? ($row->cat_id ?? '-') }} {{ $row->sub_category->title_ps ?? $row->sub_category->title_en ?? ($row->sub_cat_id ?? '-') }} {{ $row->unit->title_ps ?? $row->unit->title_en ?? ($row->unit_id ?? '-') }} {{ $row->weight->title_ps ?? $row->weight->title_en ?? ($row->weight_id ?? '-') }} {{ number_format((float)($row->qty ?? $row->quantity ?? 0), 2) }} {{ $row->location->name_ps ?? $row->location->name_en ?? ($row->location_id ? 'Loc#'.$row->location_id : '-') }} {{ $row->date ?? optional($row->created_at)->format('Y-m-d') ?? '-' }}
No OUT records for this date
{{-- quick debug (remove later) --}} {{--
DEBUG: outs={{ $outs->count() }} | ins={{ $ins->count() }}
--}}
@endsection @section('pageJs') @endsection