mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'invoice_download_styling' into 'master'
Invoice download styling See merge request CIEFWorldwideSdnBhd/exchange-2.0!34
This commit is contained in:
@@ -17,11 +17,11 @@ use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
use Barryvdh\DomPDF\PDF;
|
||||
|
||||
use App\Models\Booking;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use MPDF;
|
||||
class CreateInvoiceTransactionProcessor
|
||||
{
|
||||
/** @var ListsTransactions */
|
||||
@@ -51,18 +51,6 @@ class CreateInvoiceTransactionProcessor
|
||||
/** @var UpdatesBookingStatus */
|
||||
private $updatesBookingStatus;
|
||||
|
||||
/** @var PDF */
|
||||
private $purchase_pdf;
|
||||
|
||||
/** @var PDF */
|
||||
private $deliver_pdf;
|
||||
|
||||
/** @var PDF */
|
||||
private $payment_pdf;
|
||||
|
||||
/** @var PDF */
|
||||
private $supplier_pdf;
|
||||
|
||||
/**
|
||||
* CreateInvoiceTransactionLogic constructor.
|
||||
* @param ListsTransactions $listsTransactions
|
||||
@@ -70,7 +58,7 @@ class CreateInvoiceTransactionProcessor
|
||||
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
|
||||
* @param CalculatesBookingPaidAmount $calculatesBookingPaidAmount
|
||||
*/
|
||||
public function __construct(ListsTransactions $listsTransactions, CreatesTransaction $createsTransaction, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CalculatesBookingPaidAmount $calculatesBookingPaidAmount, CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate, FetchesCompany $fetchesCompany, CreatesDocument $createsDocument, CreatesFiles $createsFile, UpdatesBookingStatus $updatesBookingStatus, PDF $purchase_pdf, PDF $deliver_pdf, PDF $payment_pdf, PDF $supplier_pdf)
|
||||
public function __construct(ListsTransactions $listsTransactions, CreatesTransaction $createsTransaction, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CalculatesBookingPaidAmount $calculatesBookingPaidAmount, CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate, FetchesCompany $fetchesCompany, CreatesDocument $createsDocument, CreatesFiles $createsFile, UpdatesBookingStatus $updatesBookingStatus)
|
||||
{
|
||||
$this->listsTransactions = $listsTransactions;
|
||||
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
|
||||
@@ -81,10 +69,6 @@ class CreateInvoiceTransactionProcessor
|
||||
$this->createsDocument = $createsDocument;
|
||||
$this->createsFile = $createsFile;
|
||||
$this->updatesBookingStatus = $updatesBookingStatus;
|
||||
$this->purchase_pdf = $purchase_pdf;
|
||||
$this->deliver_pdf = $deliver_pdf;
|
||||
$this->payment_pdf = $payment_pdf;
|
||||
$this->supplier_pdf = $supplier_pdf;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +118,7 @@ class CreateInvoiceTransactionProcessor
|
||||
|
||||
$supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]);
|
||||
|
||||
$purchase_order_pdf = $this->purchase_pdf->loadView('pages.pdfs.purchase_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$purchase_order_pdf = MPDF::loadView('pages.pdfs.purchase_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::PURCHASE_ORDER,
|
||||
[chunk_split('data:application/pdf;base64,'.base64_encode($purchase_order_pdf->output()))],
|
||||
@@ -145,7 +129,7 @@ class CreateInvoiceTransactionProcessor
|
||||
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
|
||||
$this->createsFile->execute($document, $document_object);
|
||||
|
||||
$deliver_order_pdf = $this->deliver_pdf->loadView('pages.pdfs.deliver_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$deliver_order_pdf = MPDF::loadView('pages.pdfs.deliver_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::DELIVER_ORDER,
|
||||
[chunk_split('data:application/pdf;base64,'.base64_encode($deliver_order_pdf->output()))],
|
||||
@@ -156,7 +140,7 @@ class CreateInvoiceTransactionProcessor
|
||||
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
|
||||
$this->createsFile->execute($document, $document_object);
|
||||
|
||||
$payment_order_pdf = $this->payment_pdf->loadView('pages.pdfs.payment_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$payment_order_pdf = MPDF::loadView('pages.pdfs.payment_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::PAYMENT_ORDER,
|
||||
[chunk_split('data:application/pdf;base64,'.base64_encode($payment_order_pdf->output()))],
|
||||
@@ -167,7 +151,7 @@ class CreateInvoiceTransactionProcessor
|
||||
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
|
||||
$this->createsFile->execute($document, $document_object);
|
||||
|
||||
$supplier_order_pdf = $this->supplier_pdf->loadView('pages.pdfs.supplier_deliver_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$supplier_order_pdf = MPDF::loadView('pages.pdfs.supplier_deliver_order', ['transaction' => $po_order_transaction, 'supplier' => $supplier]);
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::SUPPLIER_DELIVER_ORDER,
|
||||
[chunk_split('data:application/pdf;base64,'.base64_encode($supplier_order_pdf->output()))],
|
||||
@@ -183,4 +167,4 @@ class CreateInvoiceTransactionProcessor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class Transaction extends AbstractModel implements Documentable
|
||||
*/
|
||||
public function booking(): BelongsTo
|
||||
{
|
||||
return $this->BelongsTo( booking::class, 'booking_id', 'id');
|
||||
return $this->BelongsTo( Booking::class, 'booking_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"ext-fileinfo": "*",
|
||||
"ext-json": "^1.6",
|
||||
"barryvdh/laravel-dompdf": "^0.9.0",
|
||||
"carlos-meneses/laravel-mpdf": "^2.1",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^1.0",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
|
||||
@@ -178,6 +178,8 @@ return [
|
||||
// Third Parties
|
||||
Spatie\Permission\PermissionServiceProvider::class,
|
||||
Barryvdh\DomPDF\ServiceProvider::class,
|
||||
Meneses\LaravelMpdf\LaravelMpdfServiceProvider::class
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -230,6 +232,7 @@ return [
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'MPDF' => Meneses\LaravelMpdf\Facades\LaravelMpdf::class,
|
||||
|
||||
],
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
return [
|
||||
'mode' => '',
|
||||
'format' => 'A4',
|
||||
'default_font_size' => '12',
|
||||
'default_font' => 'sans-serif',
|
||||
'margin_left' => 10,
|
||||
'margin_right' => 10,
|
||||
'margin_top' => 10,
|
||||
'margin_bottom' => 10,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
'orientation' => 'P',
|
||||
'title' => 'Laravel mPDF',
|
||||
'author' => '',
|
||||
'watermark' => '',
|
||||
'show_watermark' => false,
|
||||
'watermark_font' => 'sans-serif',
|
||||
'display_mode' => 'fullpage',
|
||||
'watermark_text_alpha' => 0.1,
|
||||
'custom_font_dir' => '',
|
||||
'custom_font_data' => [],
|
||||
'auto_language_detection' => false,
|
||||
'temp_dir' => rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR),
|
||||
'pdfa' => false,
|
||||
'pdfaauto' => false,
|
||||
];
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -1,36 +1,148 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: SimHei;
|
||||
src: url('{{base_path().'/public/'}}simhei.ttf') format('truetype');
|
||||
}
|
||||
* {
|
||||
font-family: SimHei, serif ;
|
||||
}
|
||||
.detail-box {
|
||||
height: 200px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.float-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
.float-right {
|
||||
width: 50%;
|
||||
float: right;
|
||||
}
|
||||
.bill-box {
|
||||
width: 100%;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
<title>Invoice</title>
|
||||
<style>
|
||||
@page {
|
||||
header: page-header;
|
||||
footer: page-footer;
|
||||
}
|
||||
|
||||
</style>
|
||||
body {
|
||||
font-family: sun-extA;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
.separator {
|
||||
text-align: right;
|
||||
border-bottom: 0.5px solid black;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
img.logo {
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 6em;
|
||||
width: 9em;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 2em;
|
||||
font-weight: 1200;
|
||||
}
|
||||
|
||||
.details {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bill-to {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.4em;
|
||||
/* text-align: center; */
|
||||
}
|
||||
|
||||
td.title {
|
||||
text-align: left;
|
||||
}
|
||||
td.description,
|
||||
th.description {
|
||||
text-align: justify;
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
td.stock-code,
|
||||
th.stock-code {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
/* margin-top: 0.6em;
|
||||
margin-right: 0.6em; */
|
||||
}
|
||||
|
||||
.subtotal td {
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
.total {
|
||||
border-top: 1px solid black;
|
||||
border-bottom: 3px double black;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.address {}
|
||||
|
||||
*/ td.header-logo {
|
||||
/* text-align: left; */
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
td.header-cief-address {
|
||||
text-align: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
|
||||
td.header-details {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td.bill-to {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td.document-detail {
|
||||
text-align: left;
|
||||
border: 1px solid black;
|
||||
padding: 1em 1em 1em 1em;
|
||||
width: 16em;
|
||||
}
|
||||
|
||||
td.address {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,73 +1,110 @@
|
||||
@extends('layouts.base_pdf')
|
||||
@section('inner_content')
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
<h1>Deliver Order</h1>
|
||||
<div>
|
||||
<div class="detail-box">
|
||||
<div class="float-left">
|
||||
<h2>Bill To</h2>
|
||||
<div>Marking: {{ $transaction->booking->marking }}</div>
|
||||
<div>Company: {{ $supplier->name }}</div>
|
||||
<div>Phone: {{ $supplier->contacts()->first()->phone }}</div>
|
||||
<br>
|
||||
<div>EDO: {{ $transaction->bill_no }}</div>
|
||||
<div>REF: {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div>Date: {{ $transaction->created_at }}</div>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<div>
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
<br>
|
||||
<htmlpageheader name="page-header">
|
||||
<br><br>
|
||||
<div class="separator"><strong><i>{{ $transaction->bill_no }}</i></strong></div>
|
||||
</htmlpageheader>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="header-logo">
|
||||
<img src="{{ public_path('images/ri_1.png') }}" alt="logo" id="logo" class="logo">
|
||||
</td>
|
||||
<td class="header-cief-address">
|
||||
<span class="company-name">
|
||||
<strong>
|
||||
CIEF WORLDWIDE SDN BHD
|
||||
</strong>
|
||||
</span>
|
||||
<span class="company-reg">(1134596-M)</span><br>
|
||||
Malaysian Global Innovation & Creativity Center <br>
|
||||
Level 1 CWS, Block 3730, Persiaran APEC, <br>
|
||||
63000 Cyberjaya, Malaysian. <br>
|
||||
Tel: 018-2909252
|
||||
</td>
|
||||
<td class="header-details">
|
||||
<div class="title">
|
||||
<strong>
|
||||
Delivery Order
|
||||
</strong>
|
||||
</div>
|
||||
<div>Phone: 0182909252</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bill-box">
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
|
||||
<div class="number">EDO: {{ $transaction->bill_no }}</div>
|
||||
|
||||
|
||||
<div class="ref">REF: {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div class="date">Date: {{ $transaction->created_at }}</div>
|
||||
<div> </div>
|
||||
</div>
|
||||
</td>
|
||||
<tr>
|
||||
<td colspan="3" class="bill-to">
|
||||
<span class="sub-title">
|
||||
Bill To
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="address">
|
||||
<div class="label">
|
||||
Company: {{ $supplier->name }}
|
||||
</div>
|
||||
<div class="address">
|
||||
sdas sda sdsd dtaman asdksd 4.000
|
||||
</div>
|
||||
<div>
|
||||
Phone: {{ $supplier->contacts()->first()->phone }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table style="overflow: wrap" autosize="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th class="stock-code" width="10%">Stock Code</th>
|
||||
<th class="description">Description</th>
|
||||
<th width="10%">Quantity</th>
|
||||
<th width="12%">Unit Price (RM)</th>
|
||||
<th width="10%">Total Amount<br>(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction->transactionDetails as $key => $transaction_detail)
|
||||
<tr>
|
||||
<td>Product Code</td>
|
||||
<td>Product Name</td>
|
||||
<td>Quantity</td>
|
||||
<td>Price</td>
|
||||
<td>Amount</td>
|
||||
<td width="5%">{{ $key + 1 }}</td>
|
||||
<td class="stock-code" width="10%">{{ $transaction_detail->product_code }}</td>
|
||||
<td class="description">{{ $transaction_detail->product_name }}</td>
|
||||
<td width="10%">{{ $transaction_detail->quantity }}</td>
|
||||
<td width="12%">{{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td width="20%" class="right">{{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@foreach($transaction->transactionDetails as $transaction_detail)
|
||||
<tr style="margin-bottom: 10px;">
|
||||
<td>{{ $transaction_detail->product_code }}</td>
|
||||
<td>{{ $transaction_detail->product_name }}</td>
|
||||
<td>{{ $transaction_detail->quantity }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td class="text-right" colspan="4">Subtotal</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Adjustment</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Subtotal</td>
|
||||
<td class="right">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Total</td>
|
||||
<td class="total right">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Biling Charges</td>
|
||||
<td>MYR </td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Total</td>
|
||||
<td>MYR {{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
</tfoot>
|
||||
</table>
|
||||
<htmlpagefooter name="page-footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: right; ">This is generated by computer. No signature required.</td>
|
||||
<td style="text-align: right; ">Page {PAGENO} of {nbpg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpagefooter>
|
||||
@endsection
|
||||
|
||||
@@ -1,73 +1,113 @@
|
||||
@extends('layouts.base_pdf')
|
||||
@section('inner_content')
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
<h1>Payment Order</h1>
|
||||
<div>
|
||||
<div class="detail-box">
|
||||
<div class="float-left">
|
||||
<h2>Bill To</h2>
|
||||
<div>Marking: {{ $transaction->booking->marking }}</div>
|
||||
<div>Company: {{ $supplier->name }}</div>
|
||||
<div>Phone: {{ $supplier->contacts()->first()->phone }}</div>
|
||||
<br>
|
||||
<div>EDO: {{ $transaction->bill_no }}</div>
|
||||
<div>REF: {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div>Date: {{ $transaction->created_at }}</div>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<div>
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
<br>
|
||||
<htmlpageheader name="page-header">
|
||||
<br><br>
|
||||
<div class="separator"><strong><i>{{ $transaction->bill_no }}</i></strong></div>
|
||||
</htmlpageheader>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="header-logo">
|
||||
<img src="{{ public_path('images/ri_1.png') }}" alt="logo" id="logo" class="logo">
|
||||
</td>
|
||||
<td class="header-cief-address">
|
||||
<span class="company-name">
|
||||
<strong>
|
||||
CIEF WORLDWIDE SDN BHD
|
||||
</strong>
|
||||
</span>
|
||||
<span class="company-reg">(1134596-M)</span><br>
|
||||
Malaysian Global Innovation & Creativity Center <br>
|
||||
Level 1 CWS, Block 3730, Persiaran APEC, <br>
|
||||
63000 Cyberjaya, Malaysian. <br>
|
||||
Tel: 018-2909252
|
||||
</td>
|
||||
<td class="header-details">
|
||||
<div class="title">
|
||||
<strong>
|
||||
Invoice
|
||||
</strong>
|
||||
</div>
|
||||
<div>Phone: 0182909252</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bill-box">
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
|
||||
<div class="number">EI#: {{ $transaction->bill_no }}</div>
|
||||
|
||||
|
||||
<div class="ref">Ref# {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div class="date">Date: {{ $transaction->created_at }}</div>
|
||||
<div> </div>
|
||||
</div>
|
||||
</td>
|
||||
<tr>
|
||||
<td colspan="3" class="bill-to">
|
||||
<span class="sub-title">
|
||||
Bill To
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="address">
|
||||
<div class="label">
|
||||
Company: {{ $supplier->name }}
|
||||
</div>
|
||||
<div class="address">
|
||||
sdas sda sdsd dtaman asdksd 4.000
|
||||
</div>
|
||||
<div>
|
||||
Phone: {{ $supplier->contacts()->first()->phone }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table style="overflow: wrap" autosize="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th class="stock-code" width="10%">Stock Code</th>
|
||||
<th class="description">Description</th>
|
||||
<th width="10%">Quantity</th>
|
||||
<th width="12%">Unit Price (RM)</th>
|
||||
<th width="10%">Total Amount<br>(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction->transactionDetails as $key => $transaction_detail)
|
||||
<tr>
|
||||
<td>Product Code</td>
|
||||
<td>Product Name</td>
|
||||
<td>Quantity</td>
|
||||
<td>Price</td>
|
||||
<td>Amount</td>
|
||||
<td width="5%">{{ $key + 1 }}</td>
|
||||
<td class="stock-code" width="10%">{{ $transaction_detail->product_code }}</td>
|
||||
<td class="description">{{ $transaction_detail->product_name }}</td>
|
||||
<td width="10%">{{ $transaction_detail->quantity }}</td>
|
||||
<td width="12%">{{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td width="20%" class="right">{{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@foreach($transaction->transactionDetails as $transaction_detail)
|
||||
<tr style="margin-bottom: 10px;">
|
||||
<td>{{ $transaction_detail->product_code }}</td>
|
||||
<td>{{ $transaction_detail->product_name }}</td>
|
||||
<td>{{ $transaction_detail->quantity }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td class="text-right" colspan="4">Subtotal</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Adjustment</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Biling Charges</td>
|
||||
<td>MYR </td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Total</td>
|
||||
<td>MYR {{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Subtotal</td>
|
||||
<td class="right">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
{{-- <tr class="billingcharges">
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Billing Charges</td>
|
||||
<td class="right">{{ $transaction->service_charge }}</td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Total</td>
|
||||
<td class="total right">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<htmlpagefooter name="page-footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: right; ">This is generated by computer. No signature required.</td>
|
||||
<td style="text-align: right; ">Page {PAGENO} of {nbpg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpagefooter>
|
||||
@endsection
|
||||
|
||||
@@ -1,74 +1,120 @@
|
||||
@extends('layouts.base_pdf')
|
||||
@section('inner_content')
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
<h1>Purchase Order</h1>
|
||||
<div>
|
||||
<div class="detail-box">
|
||||
<div class="float-left">
|
||||
<h2>Buyer</h2>
|
||||
<div>Marking: {{ $transaction->booking->marking }}</div>
|
||||
<div>Company: {{ $supplier->name }}</div>
|
||||
<div>Phone: {{ $supplier->contacts()->first()->phone }}</div>
|
||||
<br>
|
||||
<htmlpageheader name="page-header">
|
||||
<br><br>
|
||||
<div class="separator"><strong><i>{{ $transaction->bill_no }}</i></strong></div>
|
||||
</htmlpageheader>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="title">
|
||||
<strong>Purchase Order</strong>
|
||||
</td>
|
||||
<td class="document-detail">
|
||||
PO#: {{ $transaction->bill_no }} <br>
|
||||
Ref#: {{ $transaction->payment_reference ?? '-' }} <br>
|
||||
Date: {{ $transaction->created_at }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="buyer-seller">
|
||||
<tr>
|
||||
<td width="50%" class="top">
|
||||
<span class="buyer-seller-title">
|
||||
Buyer
|
||||
</span>
|
||||
<br>
|
||||
<div>PO: {{ $transaction->bill_no }}</div>
|
||||
<div>REF: {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div>Date: {{ $transaction->created_at }}</div>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<h2>Seller</h2>
|
||||
<div>
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
|
||||
<div class="buyer-company">
|
||||
Marking#: {{ $transaction->booking->marking }}
|
||||
</div>
|
||||
<div>Phone: 0182909252</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bill-box">
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
|
||||
<span class="buyer-company">
|
||||
{{ $supplier->name }}
|
||||
</span>
|
||||
<span class="reg">
|
||||
{{-- {{ $supplier }} --}}
|
||||
</span>
|
||||
<br>
|
||||
<span class="address">
|
||||
{{-- {{ $buyer['address'] }} --}}
|
||||
</span>
|
||||
<br>
|
||||
<span class="contact-no">
|
||||
Phone: {{ $supplier->contacts()->first()->phone }}
|
||||
</span>
|
||||
</td>
|
||||
<td width="50%" class="top">
|
||||
<span class="buyer-seller-title">
|
||||
Seller
|
||||
</span>
|
||||
<br>
|
||||
<span class="buyer-company">
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)
|
||||
</span>
|
||||
<div class="address">
|
||||
Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
</div>
|
||||
<div class="contact-no">
|
||||
Phone: 0182909252
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="line-table" style="overflow: wrap" autosize="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th class="stock-code" width="10%">Stock Code</th>
|
||||
<th class="description">Description</th>
|
||||
<th width="10%">Quantity</th>
|
||||
<th width="12%">Unit Price (RM)</th>
|
||||
<th width="10%">Total Amount<br>(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction->transactionDetails as $key => $transaction_detail)
|
||||
<tr>
|
||||
<td>Product Code</td>
|
||||
<td>Product Name</td>
|
||||
<td>Quantity</td>
|
||||
<td>Price</td>
|
||||
<td>Amount</td>
|
||||
<td width="5%" class="center top">{{ $key + 1 }}</td>
|
||||
<td class="stock-code top" width="10%">{{ $transaction_detail->product_code }}</td>
|
||||
<td class="description">{{ $transaction_detail->product_name }}</td>
|
||||
<td width="10%" class="center top">{{ $transaction_detail->quantity }}</td>
|
||||
<td width="12%" class="center top">{{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td width="20%" class="right top">{{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@foreach($transaction->transactionDetails as $transaction_detail)
|
||||
<tr style="margin-bottom: 10px;">
|
||||
<td>{{ $transaction_detail->product_code }}</td>
|
||||
<td>{{ $transaction_detail->product_name }}</td>
|
||||
<td>{{ $transaction_detail->quantity }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td class="text-right" colspan="4">Subtotal</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Adjustment</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Biling Charges</td>
|
||||
<td>MYR </td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Total</td>
|
||||
<td>MYR {{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Subtotal</td>
|
||||
<td class="right middle">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
{{-- <tr class="billingcharges">
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Billing Charges</td>
|
||||
<td class="right middle">{{ number_format($billingcharges, 2) }}</td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Total</td>
|
||||
<td class="total right middle">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<htmlpagefooter name="page-footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: right; ">This is generated by computer. No signature required.</td>
|
||||
<td style="text-align: right; ">Page {PAGENO} of {nbpg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpagefooter>
|
||||
@endsection
|
||||
|
||||
@@ -1,73 +1,107 @@
|
||||
@extends('layouts.base_pdf')
|
||||
@section('inner_content')
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
<h1>Supplier Deliver Order</h1>
|
||||
<div>
|
||||
<div class="detail-box">
|
||||
<div class="float-left">
|
||||
<h2>Bill To</h2>
|
||||
<div>Marking: {{ $transaction->booking->marking }}</div>
|
||||
<div>Company: {{ $supplier->name }}</div>
|
||||
<div>Phone: {{ $supplier->contacts()->first()->phone }}</div>
|
||||
<br>
|
||||
<htmlpageheader name="page-header">
|
||||
<br>
|
||||
<table width="100%" style="border-bottom: 1px solid black;">
|
||||
<tr>
|
||||
<td
|
||||
style="text-align: center; color: red; text-transform: uppercase; font-weight: bold; font-size: 18px; padding-bottom: 5px;">
|
||||
Atvantic Import & Export Snd. Bhd (1309816-P)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpageheader>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="title">
|
||||
<strong>Delivery Order</strong>
|
||||
</td>
|
||||
<td class="document-detail">
|
||||
PO#: {{ $transaction->bill_no }} <br>
|
||||
Ref#: {{ $transaction->payment_reference ?? '-' }} <br>
|
||||
Date: {{ $transaction->created_at }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="buyer-seller">
|
||||
<tr>
|
||||
<td width="50%" class="top">
|
||||
<span class="buyer-seller-title">
|
||||
Buyer
|
||||
</span>
|
||||
<br>
|
||||
<div>EDO: {{ $transaction->bill_no }}</div>
|
||||
<div>REF: {{ $transaction->payment_reference ?? '-' }}</div>
|
||||
<div>Date: {{ $transaction->created_at }}</div>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<div>
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
|
||||
<div class="buyer-company">
|
||||
CIEF Worldwide Sdn Bhd (1134596-M)
|
||||
</div>
|
||||
<div>Phone: 0182909252</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bill-box">
|
||||
<table style="width: 100%">
|
||||
<tbody>
|
||||
|
||||
<span class="buyer-company">
|
||||
Malaysia Global Innovation & CreativityCentre, Level 1 CWS, Block 3730, PersiaranAPEC 63000 Cyberjaya
|
||||
</span>
|
||||
<span class="reg">
|
||||
{{-- {{ $supplier }} --}}
|
||||
</span>
|
||||
<br>
|
||||
<span class="address">
|
||||
{{-- {{ $buyer['address'] }} --}}
|
||||
</span>
|
||||
<br>
|
||||
<span class="contact-no">
|
||||
Phone: 0182909252
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="line-table" style="overflow: wrap" autosize="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th class="stock-code" width="10%">Stock Code</th>
|
||||
<th class="description">Description</th>
|
||||
<th width="10%">Quantity</th>
|
||||
<th width="12%">Unit Price (RM)</th>
|
||||
<th width="10%">Total Amount<br>(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transaction->transactionDetails as $key => $transaction_detail)
|
||||
<tr>
|
||||
<td>Product Code</td>
|
||||
<td>Product Name</td>
|
||||
<td>Quantity</td>
|
||||
<td>Price</td>
|
||||
<td>Amount</td>
|
||||
<td width="5%" class="center top">{{ $key + 1 }}</td>
|
||||
<td class="stock-code top" width="10%">{{ $transaction_detail->product_code }}</td>
|
||||
<td class="description">{{ $transaction_detail->product_name }}</td>
|
||||
<td width="10%" class="center top">{{ $transaction_detail->quantity }}</td>
|
||||
<td width="12%" class="center top">{{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td width="20%" class="right top">{{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@foreach($transaction->transactionDetails as $transaction_detail)
|
||||
<tr style="margin-bottom: 10px;">
|
||||
<td>{{ $transaction_detail->product_code }}</td>
|
||||
<td>{{ $transaction_detail->product_name }}</td>
|
||||
<td>{{ $transaction_detail->quantity }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_price() }}</td>
|
||||
<td>MYR {{ $transaction_detail->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
{{-- <tr>
|
||||
<td class="text-right" colspan="4">Subtotal</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Adjustment</td>
|
||||
<td>MYR </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Subtotal</td>
|
||||
<td class="right middle">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Total</td>
|
||||
<td class="total right middle">{{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Biling Charges</td>
|
||||
<td>MYR </td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<td class="text-right" colspan="4">Total</td>
|
||||
<td>MYR {{ $transaction->convert_original_amount() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
</tfoot>
|
||||
</table>
|
||||
<htmlpagefooter name="page-footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: right; ">This is generated by computer. No signature required.</td>
|
||||
<td style="text-align: right; ">Page {PAGENO} of {nbpg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpagefooter>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user