@extends('layouts.master') @section('title', 'Souvenir Logs') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.sidebar') @include('layouts.header-sub')
@yield('title')

ประวัติการเพิ่ม–ลบของที่ระลึก

@forelse($logs as $index => $log) @php $typeColor = match ($log->action_type) { 'init' => 'primary', 'restock' => 'success', 'adjust' => 'warning', default => 'secondary', }; @endphp {{-- --}} @empty @endforelse
No. วันที่ทำรายการ ชื่อ ประเภท จำนวน หน่วยนับ ราคาต่อหน่วย จำนวนคงเหลือ หมายเหตุ
{{ ($logs->currentPage() - 1) * $logs->perPage() + $index + 1 }} {{ \Carbon\Carbon::parse($log->transaction_date)->format('d/m/Y H:i') }} {{ $log->product_name }} {{ $log->action_type }} @if ($log->qty_change > 0) +{{ $log->qty_change }} @else {{ $log->qty_change }} @endif {{ $log->unit_name }} {{ number_format($log->unit_price, 2) }} {{ $log->qty_after }} {{ $log->remark ?? '-' }}
{{ $log->product_name }} @if ($log->action_type == 'add') {{ \Carbon\Carbon::parse($log->created_at)->format('d/m/Y H:i') }} @elseif($log->action_type == 'delete') {{ \Carbon\Carbon::parse($log->created_at)->format('d/m/Y H:i') }} @else - @endif @if ($log->action_type == 'add') {{ $log->quantity }} @elseif($log->action_type == 'delete') {{ $log->quantity }} @else - @endif @if ($log->action_type == 'remove' || $log->action_type == 'delete') {{ \Carbon\Carbon::parse($log->created_at)->format('d/m/Y H:i') }} @else - @endif @if ($log->action_type == 'remove' || $log->action_type == 'delete') {{ $log->quantity }} @else - @endif
ไม่พบข้อมูล
{{ $logs->appends(request()->query())->links() }}
@include('layouts.footer') @endsection