@extends('layouts.main') @section('title') Lubricants Inventory @stop @section('contentinner')

  {{-- Print--}}

{{--*/ $inventory_value = 0 /*--}} @foreach($items as $key => $value) @endforeach
S/N Item Code/Part Number Item/Part Type Unit Quantity Available Unit Cost Amount Active Action
{{$key+1}} {{$value->itemcode}} {{$value->name}} {{$value->item_group}} {{$value->units}} {{number_format($inventory = $value->lubricantIn)}} {{number_format($inventory - $value->lubricantOut)}} @if($value->inventoryIn->sum('quantity') > 0) {{number_format($unit_cost = $value->amount/$inventory = $value->inventoryIn->sum('quantity'),2)}} @else - @endif @if($value->inventoryIn->sum('quantity') > 0) {{ number_format($unit_cost*$inventory,2)}} {{--*/ $inventory_value += $unit_cost*$inventory /*--}} @else - @endif
{{number_format($inventory_value,2)}}
@stop