mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
before cief to customer do
This commit is contained in:
@@ -16,6 +16,8 @@ use App\InvoiceDetails;
|
||||
use App\InvoiceStatuses;
|
||||
use App\SupplierBooking;
|
||||
use App\SettingSupplier;
|
||||
use App\Marking;
|
||||
use App\User;
|
||||
use PDF;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
@@ -301,7 +303,7 @@ class InvoiceController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function getPO(Request $request, $id)
|
||||
public function customerToCIEFPO(Request $request, $id)
|
||||
{
|
||||
// Booking Exist and Belongs to User or is Admin
|
||||
if ($request->user()->role === 'member') {
|
||||
@@ -320,30 +322,34 @@ class InvoiceController extends Controller
|
||||
$booking = Booking::where('id', $id)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
$marking = User::find($booking->user_id)->marking;
|
||||
|
||||
$data = [
|
||||
'title' => 'Purchase Order',
|
||||
'detail' => [
|
||||
'date' => Carbon::createFromFormat('Y-m-d H:i:s', $booking->created_at)->format('d-m-Y'),
|
||||
'po' => $invoice->po_number,
|
||||
'do' => '',
|
||||
'ref' => $booking->id
|
||||
],
|
||||
'buyer' => [
|
||||
'buyer_company' => $invoice->buyer_company,
|
||||
'reg_no' => $invoice->reg_no,
|
||||
'address' => $invoice->address,
|
||||
'gst' => '',
|
||||
'phone' => $invoice->contact_no
|
||||
'phone' => $invoice->contact_no,
|
||||
'marking_no' => $marking
|
||||
],
|
||||
'seller' => [
|
||||
'seller_company' => 'CIEF Worldwide Sdn Bhd',
|
||||
'seller_company' => 'CIEF Worldwide Sdn Bhd (1134596-M)',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre, Level
|
||||
1 CWS, Block 3730, Persiaran APEC 63000
|
||||
Cyberjaya.',
|
||||
'phone' => '018 2909252',
|
||||
'date' => $invoice->updated_at,
|
||||
'po_number' => $invoice->po_number,
|
||||
'order_number' => $booking->order_no
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
];
|
||||
PDF::setOptions(['dpi' => 150, 'defaultFont' => 'courier']);
|
||||
$pdf = PDF::loadView('pdf/po', $data);
|
||||
|
||||
|
||||
@@ -352,74 +358,7 @@ class InvoiceController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function showpo() {
|
||||
|
||||
$booking = Booking::where('id', 2018)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
|
||||
$data = [
|
||||
'title' => 'Delivery Order',
|
||||
'buyer' => [
|
||||
'buyer_company' => $invoice->buyer_company,
|
||||
'reg_no' => $invoice->reg_no,
|
||||
'address' => $invoice->address,
|
||||
'gst' => '',
|
||||
'phone' => $invoice->contact_no
|
||||
],
|
||||
'seller' => [
|
||||
'seller_company' => 'CIEF Worldwide Sdn Bhd',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre,
|
||||
Level 1 CWS, Block 3730,
|
||||
Persiaran APEC 63000 Cyberjaya.',
|
||||
'phone' => '018 2909252',
|
||||
'date' => $invoice->updated_at,
|
||||
'po_number' => $invoice->po_number,
|
||||
'order_number' => $booking->order_no
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
];
|
||||
|
||||
// Send
|
||||
return view('pdf/po', $data);
|
||||
|
||||
}
|
||||
|
||||
public function showdo() {
|
||||
|
||||
$booking = Booking::where('id', 2018)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
|
||||
$data = [
|
||||
'title' => 'Delivery Order',
|
||||
'buyer' => [
|
||||
'buyer_company' => $invoice->buyer_company,
|
||||
'reg_no' => $invoice->reg_no,
|
||||
'address' => $invoice->address,
|
||||
'gst' => '',
|
||||
'phone' => $invoice->contact_no
|
||||
],
|
||||
'seller' => [
|
||||
'seller_company' => 'CIEF Worldwide Sdn Bhd',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre, Level
|
||||
1 CWS, Block 3730, Persiaran APEC 63000 Cyberjaya.',
|
||||
'phone' => '018 2909252',
|
||||
'date' => $invoice->updated_at,
|
||||
'po_number' => $invoice->po_number,
|
||||
'order_number' => $booking->order_no
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
];
|
||||
|
||||
// Send
|
||||
return view('pdf/do', $data);
|
||||
|
||||
}
|
||||
|
||||
public function getDO(Request $request, $id)
|
||||
public function CIEFToSupplierDO(Request $request, $id)
|
||||
{
|
||||
// Booking Exist and Belongs to User or is Admin
|
||||
if ($request->user()->role === 'member') {
|
||||
@@ -438,25 +377,31 @@ class InvoiceController extends Controller
|
||||
$booking = Booking::where('id', $id)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
$supplierbooking = SupplierBooking::where('booking_id', $id)->first();
|
||||
$supplier = SettingSupplier::where('id', $supplierbooking->supplier_id)->first();
|
||||
|
||||
$data = [
|
||||
'title' => 'Delivery Order',
|
||||
'detail' => [
|
||||
'date' => Carbon::createFromFormat('Y-m-d H:i:s', $booking->created_at)->format('d-m-Y'),
|
||||
'po' => $invoice->po_number,
|
||||
'do' => '',
|
||||
'ref' => $booking->id
|
||||
],
|
||||
'buyer' => [
|
||||
'buyer_company' => $invoice->buyer_company,
|
||||
'reg_no' => $invoice->reg_no,
|
||||
'address' => $invoice->address,
|
||||
'buyer_company' => 'CIEF Worldwide Sdn Bhd (1134596-M)',
|
||||
'reg_no' => '',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre, Level
|
||||
1 CWS, Block 3730, Persiaran APEC 63000
|
||||
Cyberjaya.',
|
||||
'gst' => '',
|
||||
'phone' => $invoice->contact_no
|
||||
'phone' => '018 2909252',
|
||||
'marking_no' => ''
|
||||
],
|
||||
'seller' => [
|
||||
'seller_company' => 'CIEF Worldwide Sdn Bhd',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre, Level
|
||||
1 CWS, Block 3730, Persiaran APEC 63000
|
||||
Cyberjaya.',
|
||||
'phone' => '018 2909252',
|
||||
'date' => $invoice->updated_at,
|
||||
'po_number' => $invoice->po_number,
|
||||
'order_number' => $booking->order_no
|
||||
'seller_company' => $supplier->company_name,
|
||||
'address' => '',
|
||||
'phone' => '',
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
@@ -469,7 +414,39 @@ class InvoiceController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function getSupplierDO($id)
|
||||
public function CIEFToCustomerInvoice($id)
|
||||
{
|
||||
$booking = Booking::where('id', $id)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
|
||||
$data = [
|
||||
'title' => 'INVOICE',
|
||||
'detail' => [
|
||||
'date' => Carbon::createFromFormat('Y-m-d H:i:s', $booking->created_at)->format('d-m-Y'),
|
||||
'ei' => 'EI-202009-000001',
|
||||
'edo' => '',
|
||||
'ref' => $booking->id
|
||||
],
|
||||
'billto' => [
|
||||
'buyer_company' => $invoice->buyer_company,
|
||||
'reg_no' => $invoice->reg_no,
|
||||
'address' => $invoice->address,
|
||||
'gst' => '',
|
||||
'phone' => $invoice->contact_no,
|
||||
'marking_no' => ''
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
];
|
||||
|
||||
$pdf = PDF::loadView('pdf/invoice', $data);
|
||||
|
||||
// Send
|
||||
return $pdf->download('invoice.pdf');
|
||||
}
|
||||
|
||||
public function CIEFToCustomerDO($id)
|
||||
{
|
||||
// Generate PO
|
||||
|
||||
@@ -508,15 +485,6 @@ class InvoiceController extends Controller
|
||||
return $pdf->download('do.pdf');
|
||||
}
|
||||
|
||||
// private invoiceExist($id)
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// private invoiceStatus($id) {
|
||||
|
||||
// }
|
||||
|
||||
private function isUser($booking_id, $user_id) {
|
||||
|
||||
$booking = Booking::where([
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
<button class="btn btn-primary" type="button" @click="onDownloadDO">
|
||||
Download DO
|
||||
</button>
|
||||
<button class="btn btn-info" type="button" @click="onDownloadInvoice">
|
||||
Download Invoice
|
||||
</button>
|
||||
<button class="btn btn-warning" type="button" @click="onDownloadSupplier">
|
||||
Download Supplier PO
|
||||
</button>
|
||||
@@ -473,6 +476,22 @@ export default {
|
||||
link.click()
|
||||
})
|
||||
.catch(err => console.error(JSON.stringify(err)))
|
||||
},
|
||||
onDownloadInvoice () {
|
||||
const url = '/api/invoice/' + this.booking_details.id + '/invoice'
|
||||
axios({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
responseType: 'blob' // important
|
||||
}).then(resp => {
|
||||
const url = window.URL.createObjectURL(new Blob([resp.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', 'invoice.pdf')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
})
|
||||
.catch(err => console.error(JSON.stringify(err)))
|
||||
}
|
||||
},
|
||||
directives: {
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
<button class="btn btn-primary" type="button" @click="onDownloadDO">
|
||||
Download DO
|
||||
</button>
|
||||
<button class="btn btn-info" type="button" @click="onDownloadInvoice">
|
||||
Download Invoice
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -252,6 +255,22 @@ export default {
|
||||
link.click()
|
||||
})
|
||||
.catch(err => console.error(JSON.stringify(err)))
|
||||
},
|
||||
onDownloadInvoice () {
|
||||
const url = '/api/invoice/' + this.booking_details.id + '/invoice'
|
||||
axios({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
responseType: 'blob' // important
|
||||
}).then(resp => {
|
||||
const url = window.URL.createObjectURL(new Blob([resp.data]))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', 'invoice.pdf')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
})
|
||||
.catch(err => console.error(JSON.stringify(err)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,169 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title></title>
|
||||
<title>Document</title>
|
||||
<style>
|
||||
|
||||
body {
|
||||
font-family: simhei;
|
||||
}
|
||||
.clear-fix::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
.letter-head {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
img.logo {
|
||||
display: inline;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 0;
|
||||
}
|
||||
img {
|
||||
height: 7em;
|
||||
width: 18%;
|
||||
}
|
||||
.cief-address {
|
||||
position: absolute;
|
||||
left: 18%;
|
||||
top: -30px;
|
||||
}
|
||||
.details {
|
||||
position: absolute;
|
||||
left: 78%;
|
||||
top: -20px;
|
||||
}
|
||||
.title {
|
||||
font-size: 2em;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.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%;
|
||||
|
||||
}
|
||||
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;
|
||||
}
|
||||
.subtotal td {
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
.total {
|
||||
border-top: 1px solid black;
|
||||
border-bottom: 1px double black;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.address {
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header clear-fix">
|
||||
<img src="https://firebasestorage.googleapis.com/v0/b/edmondtm-1d8ed.appspot.com/o/logo.png?alt=media&token=e8458dc5-b9cd-4db4-b2c9-b953c0b9d09e" alt="logo" id="logo">
|
||||
<p class="cief-address">
|
||||
<span class="company-name">CIEF WORLDWIDE SDN BHD</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
|
||||
</p>
|
||||
<div class="details">
|
||||
<div class="title">{{$title}}</div>
|
||||
@if($detail['ei'])
|
||||
<div class="number">EI#: {{$detail['ei']}}</div>
|
||||
@endif
|
||||
@if($detail['edo'])
|
||||
<div class="number">EDO#: {{$detail['edo']}}</div>
|
||||
@endif
|
||||
<div class="ref">Ref#: {{$detail['ref']}}</div>
|
||||
<div class="date">Date: {{$detail['date']}}</div>
|
||||
<div class="page">Page: 1 of 1</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bill-to sub-title">
|
||||
Bill To
|
||||
</div>
|
||||
<div class="address">
|
||||
<div class="label">
|
||||
{{$billto['buyer_company']}}
|
||||
</div>
|
||||
<div class="address">
|
||||
{{$billto['address']}}
|
||||
</div>
|
||||
<div>
|
||||
Phone: {{$billto['phone']}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="letter-head" >
|
||||
<img src="https://firebasestorage.googleapis.com/v0/b/edmondtm-1d8ed.appspot.com/o/logo.png?alt=media&token=e8458dc5-b9cd-4db4-b2c9-b953c0b9d09e" alt="logo" id="logo">
|
||||
<p class="cief-address">
|
||||
<span class="company-name">CIEF WORLDWIDE SDN BHD</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
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="details">
|
||||
<div class="document-name">
|
||||
INVOICE
|
||||
</div>
|
||||
<span class="document-number-title">
|
||||
EI No:
|
||||
</span>
|
||||
<span class="document-number">
|
||||
EI-1234566777
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<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>
|
||||
<div class="header">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="buyer-seller-container">
|
||||
<div class="buyer">
|
||||
<p class="marking-no">
|
||||
<span class="label">Marking No:</span>
|
||||
1234567
|
||||
</p>
|
||||
<p class="address">
|
||||
Bill To:
|
||||
<div class="company-name">AMK Store</div>
|
||||
19, Jalan Cheras Indah 21,
|
||||
Taman Cheras Indah,
|
||||
56100 Kuala Lumpur
|
||||
</p>
|
||||
</div>
|
||||
<div class="seller">
|
||||
<p class="address">
|
||||
Sell To:
|
||||
<div class="company-name">AMK Store</div>
|
||||
19, Jalan Cheras Indah 21,
|
||||
Taman Cheras Indah,
|
||||
56100 Kuala Lumpur
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,14 +13,18 @@
|
||||
padding: 2em;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.buyer {
|
||||
.buyer, .header {
|
||||
max-width: 45%;
|
||||
float: left;
|
||||
}
|
||||
.seller {
|
||||
.seller, .doc-details {
|
||||
max-width: 45%;
|
||||
float: right;
|
||||
}
|
||||
.doc-details {
|
||||
padding: 1em;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.buyer-seller-container {
|
||||
}
|
||||
.buyer-company {
|
||||
@@ -52,6 +56,9 @@
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
th {
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
.clear-fix::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
@@ -70,21 +77,59 @@
|
||||
}
|
||||
.buyer-seller-title {
|
||||
font-size: 1.2em;
|
||||
/* text-decoration-line: underline; */
|
||||
/* text-decoration-style: double; */
|
||||
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="header">
|
||||
<h1>{{ $title }}</h1>
|
||||
<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>
|
||||
@@ -111,24 +156,17 @@
|
||||
<div class="address">
|
||||
{{ $seller['address'] }}
|
||||
</div>
|
||||
@if($seller['phone'])
|
||||
<div class="contact-no">
|
||||
Phone: {{ $seller['phone'] }}
|
||||
</div>
|
||||
<div class="contact-no">
|
||||
Date: {{ $seller['date'] }}
|
||||
</div>
|
||||
<div class="contact-no">
|
||||
PO#: {{ $seller['po_number'] }}
|
||||
</div>
|
||||
<div class="contact-no">
|
||||
Order#: {{ $seller['order_number'] }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
{{$lines[0]->description}}
|
||||
<table>
|
||||
<caption>
|
||||
<h3>Billing Detail</h3>
|
||||
@@ -136,6 +174,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th class="description">Stock Code</th>
|
||||
<th class="description">Description</th>
|
||||
<th>Quantity</th>
|
||||
<th>Unit Price (RM)</th>
|
||||
@@ -146,6 +185,7 @@
|
||||
@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>
|
||||
@@ -154,18 +194,25 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td>Subtotal</td>
|
||||
<td>{{ number_format($amount, 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td colspan="4"></td>
|
||||
<td>Total</td>
|
||||
<td>{{ number_format($amount, 2) }}</td>
|
||||
<td class="total">{{ number_format($amount, 2) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="footer">
|
||||
This is computer generated. No Company Chop & Signature required.
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+4
-3
@@ -53,8 +53,9 @@ Route::group(['middleware' => 'auth:api'], function () {
|
||||
Route::get('invoice/{id}', 'InvoiceController@show');
|
||||
Route::post('invoice/{id}', 'InvoiceController@create');
|
||||
Route::put('invoice/{id}', 'InvoiceController@edit');
|
||||
Route::get('invoice/{id}/po', 'InvoiceController@getPO');
|
||||
Route::get('invoice/{id}/do', 'InvoiceController@getDO');
|
||||
Route::get('invoice/{id}/po', 'InvoiceController@customerToCIEFPO');
|
||||
Route::get('invoice/{id}/do', 'InvoiceController@CIEFToCustomerDO');
|
||||
Route::get('invoice/{id}/invoice', 'InvoiceController@CIEFToCustomerInvoice');
|
||||
|
||||
//Route::get('notification/user', 'NotificationController@getUserMessage');
|
||||
//Route::post('notification/read-notification/{notification_id}', 'NotificationController@readNotification');
|
||||
@@ -142,7 +143,7 @@ Route::group(['middleware' => ['role:admin']], function() {
|
||||
// New routes for invoice
|
||||
|
||||
Route::patch('invoice/{id}/status', 'InvoiceController@updateStatus');
|
||||
Route::get('invoice/{id}/supplierdo', 'InvoiceController@getSupplierDO');
|
||||
Route::get('invoice/{id}/supplierdo', 'InvoiceController@CIEFToSupplierDO');
|
||||
Route::post('invoice/{id}/comment', 'InvoiceController@postStatus');
|
||||
|
||||
Route::get('admin/complete-orders', 'BookingController@adminShowCompletedOrders');
|
||||
|
||||
Reference in New Issue
Block a user