@extends('master') @section('content') @if(session('success')) @endif @if(session('error')) @endif @if(session('verification_alert'))
| Last Usage | Catalog No | Item Code | Item Description | UOM | Total Stock | View | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @php $lastUsage = $lastUsageMikro[$item->item_code] ?? null; @endphp {!! $lastUsage ? \Carbon\Carbon::parse($lastUsage)->format('d-m-Y H:i') : 'Not Yet Usage' !!} | {{ $item->catalog_no }} | {{ $item->item_code }} | {{ $item->item_description }} | {{ $item->uom }} | {{ $stokmikro->where('item_code', $item->item_code)->sum('quantity') }} |
@php
$hasWarning = collect($stokmikro)
->where('item_code', $item->item_code)
->where('quantity', '>', 0)
->contains(function($detail) {
$daysToED = \Carbon\Carbon::now()->diffInDays(\Carbon\Carbon::parse($detail->exp_date), false);
return $daysToED < 60; // Ini akan menangkap baik yang mendekati ED maupun yang sudah ED
});
@endphp
@if($hasWarning)
warning
@endif
|
||||||||||||
|
||||||||||||||||||
| Last Usage | Catalog No | Item Code | Item Description | UOM | Total Stock | View | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @php $lastUsage = $lastUsageCPO[$item->item_code] ?? null; @endphp {!! $lastUsage ? \Carbon\Carbon::parse($lastUsage)->format('d-m-Y H:i') : 'Not Yet Usage' !!} | {{ $item->catalog_no }} | {{ $item->item_code }} | {{ $item->item_description }} | {{ $item->uom }} | {{ $stokcpo->where('item_code', $item->item_code)->sum('quantity') }} |
@php
$hasWarning = collect($stokcpo)
->where('item_code', $item->item_code)
->where('quantity', '>', 0)
->contains(function($detail) {
$daysToED = \Carbon\Carbon::now()->diffInDays(\Carbon\Carbon::parse($detail->exp_date), false);
return $daysToED < 60; // Ini akan menangkap baik yang mendekati ED maupun yang sudah ED
});
@endphp
@if($hasWarning)
warning
@endif
|
||||||||||||
|
||||||||||||||||||
| Last Usage | Catalog No | Item Code | Item Description | UOM | Total Stock | View | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @php $lastUsage = $lastUsageCI[$item->item_code] ?? null; @endphp {!! $lastUsage ? \Carbon\Carbon::parse($lastUsage)->format('d-m-Y H:i') : 'Not Yet Usage' !!} | {{ $item->catalog_no }} | {{ $item->item_code }} | {{ $item->item_description }} | {{ $item->uom }} | {{ $stokci->where('item_code', $item->item_code)->sum('quantity') }} |
@php
$hasWarning = collect($stokci)
->where('item_code', $item->item_code)
->where('quantity', '>', 0)
->contains(function($detail) {
$daysToED = \Carbon\Carbon::now()->diffInDays(\Carbon\Carbon::parse($detail->exp_date), false);
return $daysToED < 60; // Ini akan menangkap baik yang mendekati ED maupun yang sudah ED
});
@endphp
@if($hasWarning)
warning
@endif
|
||||||||||||
|
||||||||||||||||||