@extends('layouts.master') @section('title', $title) @section('page_css') @endsection @section('content')
{{ $title }} For Prescription
@csrf
@if (isset($customer_id) && $customer_id != 0) @else @endif
@if (!empty($invoice) && count($invoice?->prescriptions)) @php $counter = 1; $total = 0; @endphp @foreach ($invoice?->prescriptions as $pro_det) @php $balance = 0; // $type = $item?->type; $conversion_rate = 0; $price = 0; $gv_balance = 0; @endphp @if ($counter == 1) @else @endif @php $total += $pro_det?->quantity * $price; @endphp @endforeach @endif
# Product UOM Quantity Price Sub Total
{{ $counter++ }}
{{ $counter++ }}
@php // $balance = $item?->inventory?->balance; $type = $item?->type; $cost = $item?->cost; $conversionrate = $pro_det?->inv?->conversion; @endphp @php $gv_inv_balance = 0; @endphp @if ($pro_det->uom == $pro_det?->prd?->sellinguom?->id) @if ($conversionrate > 0) @php $gv_inv_balance = $pro_det?->quantity / $conversionrate; @endphp @endif @elseif ($pro_det->uom == $pro_det?->prd?->puruom?->id) @php $gv_inv_balance = $pro_det?->quantity; @endphp @endif

Total: {{ isset($total) ? number_format($total, 2) : 0 }}


@endsection @section('page_js') @endsection