@extends('admin.master') @section('title','POS Sale Details') @section('content')
@yield('title')

@if(isset($purchase->customer)) {{ $purchase->customer->name }}

{{ $purchase->customer->address }}

Tel: {{ $purchase->customer->mobile }}
Email: {{ $purchase->customer->email }} @endif

@if(isset($purchase->warehouse)) {{ $purchase->warehouse->name }}

{{ $purchase->warehouse->address }}

Tel: {{ $purchase->warehouse->mobile }}
Email: {{ $purchase->warehouse->email }} @endif

Invoice Number: {{ $purchase->invoice_code }}

Date: {{ $purchase->date }}

Payment Status: @if($purchase->payment_status == \App\Lib\Enumerations\PaymentStatus::$PAID) {{ "Paid" }} @elseif($purchase->payment_status == \App\Lib\Enumerations\PaymentStatus::$DUE) {{ "Due" }} @else {{ "Partial paid" }} @endif

@php $sl=0; @endphp @foreach($purchase->saleDetails as $purchaseDetails ) @php $sl++; @endphp @endforeach

Created by : @if(isset($purchase->createdBy)){{ $purchase->createdBy->full_name }} @endif

Date: {{ $purchase->date }}

@foreach($purchase->payment as $purchasePayments) @endforeach
Date Paying by Amount Payment by
{{ $purchasePayments->payment_date }} {{ $purchasePayments->paying_by }} {{ $purchasePayments->payment_amount }} @if(isset($purchasePayments->paymentBy)) {{ $purchasePayments->paymentBy->full_name }} @endif
@if(isset($editModePaymentData)) {{ Form::model($editModePaymentData, array('route' => array('sale_payment.update', $editModePaymentData->id), 'method' => 'PUT','files' => 'true')) }} @else {{ Form::open(array('route' => 'sale_payment.store','enctype'=>'multipart/form-data')) }} @endif {{ Form::close() }}
@endsection