@extends('layouts.app') @section('title', 'Purchase Order Details') @php $existing = array(); @endphp @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('danger'))
{{ session('danger') }}
@endif
@if($purchase_order->locked==0) @endif

PO Number:

PO-{{str_pad($purchase_order->id, 4, '0', STR_PAD_LEFT) }}

Project ID:

WG-{{str_pad($project->id, 4, '0', STR_PAD_LEFT)}}

Supplier Name:

{{ $supplier->company_name }}

Delivery Date:

{{ date('d M, Y', strtotime($purchase_order->delivery_date)) }}

@if(!empty($purchase_order->receipt_photo))

Receipt Photo:

View

@endif

Delivery Address:

@if(!empty($purchase_order->address)) {{ $purchase_order->address }}, {{ $purchase_order->city }} {{ $purchase_order->postcode }} @endif

@if($purchase_order->sub_contract==0)

Estimated Cost

£0
Plant (Rem: )
£0
Labour (Rem: )
£0
Material (Rem: )
@endif @if($purchase_order->sub_contract==1)

Sub Contract

£{{ number_format($sc->amount, 2) }}
{{ $sc->title }} (Rem: £)
@endif
@php $plant = 0; $labour = 0; $material = 0; $sc_total = 0; @endphp @if($po_items->count()==0)
@if($purchase_order->locked==0) @endif
@else @if($purchase_order->sub_contract==0) @else @endif @foreach($po_items as $item) @php $plant += $item->plant; $labour += $item->labour; $material += $item->material; $sc_total += $item->sc_total; @endphp @if($purchase_order->sub_contract==0) @else @endif @endforeach @if($purchase_order->sub_contract==0) @else @endif
DescriptionPlant Labour MaterialAmount
{{ $item->description }}£{{ number_format($item->plant, 2) }} £{{ number_format($item->labour, 2) }} £{{ number_format($item->material, 2) }}£{{ number_format($item->sc_total, 2) }}

TOTAL£{{ number_format($plant, 2) }} £{{ number_format($labour, 2) }} £{{ number_format($material, 2) }}£{{ number_format($sc_total, 2) }}
@if($purchase_order->locked==0) @else

First printed on {{ date('d M, Y', strtotime($purchase_order->lock_date)) }}

@endif
@csrf
@endif
@csrf
@csrf
@endsection @section('js') @endsection