@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')

Product Batches

@if($product->product_type == "Compiled Kit") @else @endif @php $breadcrumb = getCurrentMenuBreadcrumb(); @endphp @if(!empty($breadcrumb)) @endif

{{ $product->product }}

{{ $product->id_business_products }}

{{ $product->product }}

{{ $product->business_brand_name }}

{{ $product->category }}

{{ $product->sku }}

{{ $product->barcode_product }}

{{ $product->qty_per_unit. ' '.$product->measure_unit }}

{{ $product->unit_type }}

{{ $product->price }}

{{ $product->purchase_price }}

{{ $product->product_threshold }}

{!! $product->professional == 'y' ? 'Professional' : 'Retail' !!}

@if($product->product_type == "Compiled Kit")

@foreach($product->kit_components as $component) @endforeach
Component Name Quantity Measure Qty Measure Unit
{{ $component->component_name }} {{ $component->kit_qty }} {{ $component->kit_measure_qty }} {{ $component->measure_unit }}

@endif
@foreach($batches as $batch) @endforeach
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 Avaiable Stock Value
{{ $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' }} {{ $batch->batch_amount ? number_format($batch->batch_amount*$batch->total_stock, 2) : '0.00' }} @if($product->product_type != "Compiled Kit") @endif
Total:
@include('modals.transfer_note') {{-- Batch Edit Modal --}} {{-- End Batch Edit Modal --}} {{-- Batch Kit Edit Modal --}} @endsection @section('scripts') @vite(['resources/js/modals/transfer_note.js']) @endsection