ประวัติการเพิ่ม–ลบของที่ระลึก
| No. |
วันที่ทำรายการ |
ชื่อ |
ประเภท |
จำนวน |
หน่วยนับ |
ราคาต่อหน่วย |
จำนวนคงเหลือ |
หมายเหตุ |
@forelse($logs as $index => $log)
| {{ ($logs->currentPage() - 1) * $logs->perPage() + $index + 1 }}
|
{{ \Carbon\Carbon::parse($log->transaction_date)->format('d/m/Y H:i') }}
|
{{ $log->product_name }} |
@php
$typeColor = match ($log->action_type) {
'init' => 'primary',
'restock' => 'success',
'adjust' => 'warning',
default => 'secondary',
};
@endphp
{{ $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
|
--}}
@empty
| ไม่พบข้อมูล |
@endforelse
{{ $logs->appends(request()->query())->links() }}