@extends('layouts.layoutMaster') @section('title', 'Quotation Detail') @php $breadcrumbs = [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('quotation.index'), 'label' => 'Quotation'], ['url' => route('quotation.show', ['quotation' => $model->id]), 'label' => $model->code], ]; @endphp @section('content')
| Quotation Code | {{ $model->code }} |
| Status | {{ strtoupper($model->status) }} @if (in_array($model->status, ['approved', 'rejected', 'cancel'])) @if ($model->status === 'approved' && $model->approved_by) {{ $model->approvedBy->name ?? '-' }} on {{ $model->approved_at?->format('d/m/Y H:i') ?? '-' }} @elseif ($model->status === 'rejected' && $model->rejected_by) {{ $model->deleted_by->name ?? '-' }} on {{ $model->rejected_at?->format('d/m/Y H:i') ?? '-' }} @elseif ($model->status === 'cancel') {{ $model->deletedBy->name ?? '-' }} on {{ $model->deleted_at?->format('d/m/Y H:i') ?? '-' }} @endif @endif |
| Invoice Date | {{ $model->invoice_date?->format('d/m/Y') ?? '-' }} |
| Notes | {{ $model->notes ?: '-' }} |
| Customer | @if ($model->customer) @can('customer.show') {{ $model->customer->full_name }} @else {{ $model->customer->full_name }} @endcan @else - @endif |
| Customer Phone | {{ $model->customer->phone ?? '-' }} |
| Sales Person | {{ $model->sales->name ?? '-' }} |
| No | Origin | Destination | Loadout | Quantity | Price | Driver Allowance | Subtotal |
|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $detail->origin_name ?? ($detail->origin->name ?? '-') }} | {{ $detail->destination_name ?? ($detail->destination->name ?? '-') }} | {{ $detail->loadout->name ?? '-' }} | {{ \App\Helpers\Helpers::formatNumber($detail->quantity) }} | {{ \App\Helpers\Helpers::formatCurrency($detail->price ?: 0, 2) }} | @php $totalAllowance = ($detail->pocket_money_1 ?: 0) + ($detail->pocket_money_2 ?: 0) + ($detail->pocket_money_3 ?: 0) + ($detail->bonus ?: 0); @endphp | {{ \App\Helpers\Helpers::formatCurrency($detail->sub_total ?: 0, 2) }} |
| No details available | |||||||
| Subtotal | {{ \App\Helpers\Helpers::formatCurrency($model->total ?: 0, 2) }} |
| PPN (VAT) {{ $model->ppn_percentage ? '(' . $model->ppn_percentage . '%)' : '' }} | {{ \App\Helpers\Helpers::formatCurrency($model->ppn ?: 0, 2) }} |
| PPh (Income Tax) {{ $model->pph_percentage ? '(' . $model->pph_percentage . '%)' : '' }} | - {{ \App\Helpers\Helpers::formatCurrency($model->pph ?: 0, 2) }} |
| Discount | - {{ \App\Helpers\Helpers::formatCurrency($model->discount ?: 0, 2) }} |
| Grand Total | {{ \App\Helpers\Helpers::formatCurrency($model->grand_total ?: 0, 2) }} |