@extends('layouts/pos_layout') @section('title', '| '.$moduleTitle) @section('content') @include('successMsg')
Purchase List    
{{$moduleTitle}}
Bill No : {{'PR'.$data->purchase_no}} Bill Date : {{date('d-m-Y', strtotime($data->purchase_date))}}
Order No : {{isset($data->order_no) ? $data->order_no : 'N/A'}} Requisition : {{isset($data->requisition_no) ? $data->requisition_no : 'N/A'}}
Total Quantity : {{$data->total_quantity}} Total Amount : {{number_format($data->total_amount, 2)}}
Discount: {{$data->discount_amount}}
T/A with discount : {{number_format($data->total_amount_after_discount, 2)}} Gross Toal : {{number_format($data->gross_total, 2)}}


@if($isBarcodeStatus == 'false') @endif @php $no=0; $t_qty = $t_amount = 0; @endphp @foreach($data->barcode_details as $details) @php $purchaseBarcodeQuantity = 0; if($isBarcodeStatus == 'true'){ $purchaseBarcodeQuantity = App\Models\pos\Transaction\PosProductBarcodeDetails::where('purchase_id',$details->purchase_id)->where('product_id',$details->product_id)->whereNull('deleted_at')->sum('total_qty'); }else{ $purchaseBarcodeQuantity = $details->total_qty; } $productSalePrice = \App\Service\PosService::getProductSalesPriceFromPricing($details->product_id,$details->branch_id); $productPrice = ($isSalesPriceStatus == 'true') ? $productSalePrice : $details->product->cost_price; @endphp @if($isBarcodeStatus == 'false')@endif @php $t_qty += $purchaseBarcodeQuantity; $t_amount += ($purchaseBarcodeQuantity * $productPrice); @endphp @endforeach @if($isBarcodeStatus == 'false')@endif
SL No. Product Name Model Name Barcode Purchase Information
Qty Unit Price Total Price PID No.
{{++$no}} {{($details->product) ? $details->product->name : 'N/A'}} {{($details->product->model) ? $details->product->model->name : 'N/A'}} {{($details->product) ? $details->product->barcode : 'N/A'}} {{$purchaseBarcodeQuantity}} {{number_format($productPrice, 2)}} {{number_format($purchaseBarcodeQuantity * $productPrice, 2)}}{{$details->barcode_serial}}
Total {{$t_qty}} Total {{number_format($t_amount, 2)}}
@endsection