Files
exchange/resources/views/pdf/po.blade.php
T
2020-09-14 13:11:51 +08:00

217 lines
5.5 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>document</title>
<style>
body {
font-family: noto sans-serif;
font-size: normal;
}
.details {
float: right;
max-width: 30%;
padding: 2em;
border: 1px solid black;
}
.buyer, .header {
max-width: 45%;
}
.seller, .doc-details {
max-width: 45%;
}
.doc-details {
padding: 1em;
border: 1px solid black;
}
.buyer-seller-container {
}
.buyer-company {
display: block;
font-size: 16px;
font-weight: bolder;
}
.reg {
display: block;
font-size: 14px;
}
.address {
display: block;
font-size: 14px;
word-wrap: break-word;
}
.gst {
display: block;
font-size: 14px;
}
.contact-no {
display: block;
font-size: 14px;
}
.seller {
width: 45%;
}
table {
width: 100%;
}
th {
border-bottom: 1px solid black;
}
.clear-fix::after {
content: "";
clear: both;
display: table;
}
td {
padding: 0.4em;
text-align: center;
}
td.description, th.description {
text-align: left;
}
td, th {
margin-top: 0.6em;
margin-right: 0.6em;
}
.buyer-seller-title {
font-size: 1.2em;
margin-bottom: 0.2em;
}
.subtotal td {
border-top: 1px solid black;
}
.total {
border-top: 1px solid black;
border-bottom: 1px double black;
font-weight: bolder;
}
</style>
</head>
<body>
<div class="clear-fix">
<div class="header">
<h1>{{ $title }}</h1>
</div>
<div class="doc-details">
@if ($detail['po'])
<div class="contact-no">
PO#: {{ $detail['po'] }}
</div>
@endif
@if ($detail['do'])
<div class="contact-no">
DO#: {{ $detail['do'] }}
</div>
@endif
<div class="contact-no">
Ref#: {{ $detail['ref'] }}
</div>
<div class="contact-no">
Date: {{ $detail['date'] }}
</div>
<div class="contact-no">
Page: 1 of 1
</div>
</div>
</div>
<br>
<div class="buyer-seller-container clear-fix">
<div class="buyer">
<div class="buyer-seller-title">
Buyer
</div>
@if($buyer['marking_no'])
<div class="buyer-company">
Marking#: {{$buyer['marking_no']}}
</div>
@endif
<span class="buyer-company">
{{ $buyer['buyer_company'] }}
</span>
<span class="reg">
{{ $buyer['reg_no'] }}
</span>
<span class="address">
{{ $buyer['address'] }}
</span>
<!-- <span class="gst">
GST: 12345678
</span> -->
<span class="contact-no">
Phone: {{ $buyer['phone'] }}
</span>
</div>
<div class="seller">
<div class="buyer-seller-title">
Seller
</div>
<span class="buyer-company">
{{ $seller['seller_company'] }}
</span>
<div class="address">
{{ $seller['address'] }}
</div>
@if($seller['phone'])
<div class="contact-no">
Phone: {{ $seller['phone'] }}
</div>
@endif
</div>
</div>
<br>
<br>
<br>
<table>
<caption>
<h3>Billing Detail</h3>
</caption>
<thead>
<tr>
<th>No</th>
<th class="description">Stock Code</th>
<th class="description">Description</th>
<th>Quantity</th>
<th>Unit Price (RM)</th>
<th>Total Amount (RM)</th>
</tr>
</thead>
<tbody>
@foreach ($lines as $line)
<tr>
<td>{{$line->order}}</td>
<td class="description">{{$line->stock_code}}</td>
<td class="description">{{$line->description}}</td>
<td>{{$line->quantity}}</td>
<td>{{number_format($line->unit_price_rm, 2)}}</td>
<td>{{number_format($line->total, 2)}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="subtotal">
<td colspan="4"></td>
<td>Subtotal</td>
<td>{{ number_format($amount, 2) }}</td>
</tr>
<tr>
<td colspan="4"></td>
<td>Total</td>
<td class="total">{{ number_format($amount, 2) }}</td>
</tr>
</tfoot>
</table>
<br>
<div class="footer">
This is computer generated. No Company Chop &amp; Signature required.
</div>
</body>
</html>