@extends('layouts.horizontal', ['title' => 'Batches', 'topbarTitle' => 'Product Batches', 'nonav' => true]) @section('css') @vite(['node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css', 'node_modules/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css', 'node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css', 'node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css', 'node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css', 'node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css',]) @endsection @section('content')
| ID | Batch Number | Store | Batch Created | Expiry Date | Expires In | Added Manually | Purchased Qty | Transfer In | Transfer Out | Sold | Used | Returned | Remaining Qty | In Measure | Cost Price | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $batch->id_batch }} | {{ $batch->batch_number }} | {{ $batch->business_store }} | {{ $batch->bdate }} | {{ $batch->batch_expiry }} | @php $expiryDate = \Carbon\Carbon::parse($batch->expiry_date); $currentDate = \Carbon\Carbon::now(); $daysToExpire = round($currentDate->diffInDays($expiryDate, false)); @endphp @if($daysToExpire < 0) Expired {{ abs($daysToExpire) }} days ago @else {{ $daysToExpire }} days @endif | {{ $batch->manualQty ?? 0 }} | {{ $batch->purchasedQty ?? 0 }} | {{ $batch->transfer_in ?? 0 }} | {{ $batch->transfer_out ?? 0 }} | {{ $batch->sold ?? 0 }} | {{ $batch->used ?? 0 }} | {{ $batch->returned ?? 0 }} | {{ $batch->total_stock ?? 0 }} | {{ $batch->total_stock * $product->qty_per_unit }} {{ $product->measure_unit }} | {{ $batch->batch_amount ? number_format($batch->batch_amount, 2) : '0.00' }} | |
| Total: | ||||||||||||||||