diff --git a/resources/views/pages/pdfs/invoice.blade.php b/resources/views/pages/pdfs/invoice.blade.php
index ca45e766..f75cbeed 100644
--- a/resources/views/pages/pdfs/invoice.blade.php
+++ b/resources/views/pages/pdfs/invoice.blade.php
@@ -1,21 +1,20 @@
@extends('layouts.base_pdf')
+
@section('inner_content')
|
-
-
- CIEF WORLDWIDE SDN BHD
-
-
+ CIEF WORLDWIDE SDN BHD
(1134596-M) No. 72-3, Jalan Jalil 1, The Earth Bukit Jalil, @@ -23,14 +22,8 @@ Tel: 03-8082 1252 |
-
-
- Invoice
-
-
-
+ Invoice
EI#: {{ $transaction->bill_no }}
-
Ref# {{ $po_order_transaction->booking->marking }}
Date: {{ $supplier->segments->whereIn('id', [23])->first() ? \Carbon\Carbon::now() : $po_order_transaction->booking->created_at }}
|
| - - Bill To - + Bill To | ||
|
-
- {{ $supplier->name }}
-
+ {{ $supplier->name }}
+ @php
+ $billingAddress = $supplier->addresses()->where('billing', '=', true)->first();
+ @endphp
- @php
- $billingAddress = $supplier->addresses()->where('billing', '=', true)->first();
- @endphp
{{ $billingAddress->street_one }}
- {{ $billingAddress->street_two }} ,
+ {{ $billingAddress->street_two }},
{{ $billingAddress->district()->first()->name }},
{{ $billingAddress->postcode }}
{{ $billingAddress->state()->first()->name }},
{{ $billingAddress->country()->first()->name }}
-
- Phone: {{ $supplier->contacts()->first()->phone }}
-
+ Phone: {{ $supplier->contacts()->first()->phone }}
|
||
| No | @@ -81,11 +71,8 @@||||||
|---|---|---|---|---|---|---|
| {{ $transaction_detail->product_code }} | {{ $transaction_detail->product_name }} | {{ $transaction_detail->quantity }} | -- @php - $unitPrice = $transaction_detail->price / $currencyRate; - @endphp - {{ number_format($unitPrice, 2) }} - | -- @php - $itemTotal = $unitPrice * $transaction_detail->quantity; - $subtotal += $itemTotal; - @endphp - {{ number_format($itemTotal, 2) }} - | +{{ number_format($transaction_detail->price / $transaction->currency_rate, 2) }} | +{{ number_format(($transaction_detail->price / $transaction->currency_rate) * $transaction_detail->quantity, 2) }} |
| Voucher ({{ $voucher_redemption->voucher->code }}) | --{{ $voucherDiscount }} | +-{{ number_format($voucherDiscount, 2) }} | ||||
| - | Adjustment | -- @php - $adjustment = $transaction->amount - $subtotal; - @endphp - {{ number_format($adjustment, 2) }} - | -||||
| @@ -149,19 +115,42 @@ | Total | @php - $total = $subtotal + $transaction->service_charge + $transaction->tax + $voucherDiscount; + $total = calculateTotalInvoice($subtotal, $transaction->service_charge, $transaction->tax, $voucherDiscount); @endphp {{ number_format($total, 2) }} | ||||
| This is generated by computer. No signature required. | -Page {PAGENO} of {nbpg} | -