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

Invoice Details

Invoice Numbers [{{ str_pad($header->invoice_no, 5, '0', STR_PAD_LEFT ) }}]
Approve Reject Print
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 }}
Vehicle Info: {{ $header->customer->info }} ({{ $header->customer->models }})
Date: {{ date('d/m/Y', strtotime($header->invoice_date)) }}
Payment Terms: {{ $header->payment_term }}
@foreach($items as $item) @endforeach @if ($header->flushing != null) @endif @if ($header->var_rate != null) @endif
# Product Quantity UoM Unit Price Amount
1 {{ $item->product->description }} {{ $item->quantity }} {{ $item->item_uom->description }} @if ( $item->unit_price <= $item->cost_price ) {{ number_format($item->unit_price, 2) }} @else {{ number_format($item->unit_price, 2) }} @endif RM {{ number_format($item->total, 2) }}
2 Flushing Aircond System 1 Lot {{ number_format($header->flushing, 2)}} RM{{ number_format($header->flushing, 2)}}
3 Refill gas 134a + vaccum C.F Internal Oil Compressor 1 Lot {{ number_format($header->var_rate, 2)}} RM{{ number_format($header->var_rate, 2)}}
@if(!empty($header->labor_desc)) @endif @if($header->labour) @endif @if ($header->discount) @endif
SUBTOTAL RM {{ number_format($header->total + $header->var_rate + $header->flushing, 2) }}
LABOUR 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