@extends('layouts.app') @section('title', __('lang_v1.raised_po') . ' — ' . $po->ref_no) @section('content')

@lang('lang_v1.raised_po') {{ $po->ref_no }}

@lang('messages.back')
@lang('purchase.ref_no')
{{ $po->ref_no }}
@lang('lang_v1.manufacturer')
{{ optional($po->contact)->name ?: optional($po->contact)->supplier_business_name }}
@lang('business.email')
{{ optional($po->contact)->email ?: '-' }}
@lang('messages.date')
{{ \Carbon\Carbon::parse($po->transaction_date)->format('d-m-Y H:i') }}
@lang('sale.total')
@format_currency($po->final_total)
@lang('lang_v1.email_status')
@if($po->tpm_emailed_at) @lang('lang_v1.emailed') {{ \Carbon\Carbon::parse($po->tpm_emailed_at)->format('d-m-Y H:i') }} @else @lang('lang_v1.not_emailed') @endif
@if($can_email) {!! Form::open(['route' => ['supplier.raised-order.resend', $po->id], 'method' => 'post', 'style' => 'display:inline', 'onsubmit' => "return confirm('".__('lang_v1.resend_email')."?')"]) !!} {!! Form::close() !!} @else {{ empty(optional($po->contact)->email) ? __('lang_v1.no_manufacturer_email') : __('lang_v1.no_warehouse_smtp') }} @endif

@lang('sale.products')

@forelse($lines as $l) @php $base_qty = (float) $l->quantity; $mult = (float) ($l->mult ?? 0); $purchase_qty = $mult > 0 ? ceil($base_qty / $mult) : $base_qty; @endphp @empty @endforelse
@lang('business.product') @lang('lang_v1.order_qty_purchase_unit') @lang('lang_v1.qty_base_unit')
{{ $l->name }} {{ number_format($purchase_qty, $mult > 0 ? 0 : 2) }} {{ $mult > 0 ? $l->purchase_unit : $l->base_unit }} {{ number_format($base_qty, 2) }} {{ $l->base_unit }}
@lang('lang_v1.no_records_found')
@endsection