@extends('layouts.app') @section('main-content')

Invoice Details

Invoice Number [{{ str_pad($header->invoice_no, 5, '0', STR_PAD_LEFT ) }}]
@csrf @if( $header->status === 'A') Print @else Print Approve @endif Reject
Customer Name: {{ $header->customer->name }} @if ( $header->customer->customertype == 'B') Business @else Personal @endif @if ($header->status == 'P') Pending @elseif ($header->status == 'R') Rejected @else Approved @endif
@if ( $header->customer->customertype == 'B') Company Name: {{ $header->customer->companyname }} @endif
Contact: {{ $header->customer->contact }}
Date: {{ date('d/m/Y', strtotime($header->invoice_date)) }}
Payment Terms: {{ $header->payment_term }}
@foreach($items as $item) @endforeach @if ($header->labour > 0) @endif @if ($header->discount > 0) @endif
# Product Quantity UOM Unit Price Amount
{{ $loop->iteration }} {{ $item->product->description }} {{ $item->quantity }} {{ $item->item_uom->description }} {{ number_format($item->unit_price, 2) }} RM {{ number_format($item->total, 2) }}
Subtotal RM {{ number_format($header->total, 2) }}
Labour Charge RM {{ number_format($header->labour, 2) }}
Discount - RM {{ number_format($header->discount, 2) }}
Grand Total RM {{ number_format($header->grand_total, 2) }}
@endsection @section('script') @endsection