mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
installed chinese fonts
This commit is contained in:
@@ -450,39 +450,34 @@ class InvoiceController extends Controller
|
||||
{
|
||||
// Generate PO
|
||||
|
||||
$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',
|
||||
'buyer' => [
|
||||
'buyer_company' => 'CIEF Worldwide Sdn Bhd',
|
||||
'reg_no' => '',
|
||||
'address' => 'Malaysia Global Innovation & Creativity Centre, Level
|
||||
1 CWS, Block 3730, Persiaran APEC 63000
|
||||
Cyberjaya.',
|
||||
'gst' => '',
|
||||
'phone' => '018 2909252'
|
||||
],
|
||||
'seller' => [
|
||||
'seller_company' => $supplier->company_name,
|
||||
'address' => '',
|
||||
'phone' => '',
|
||||
'date' => '',
|
||||
'po_number' => $invoice->po_number,
|
||||
'order_number' => $booking->order_no
|
||||
],
|
||||
'lines' => $lines,
|
||||
'amount' => $invoice->amount
|
||||
];
|
||||
$pdf = PDF::loadView('pdf/po', $data);
|
||||
|
||||
$booking = Booking::where('id', $id)->first();
|
||||
$invoice = Invoice::where('booking_id', $booking['id'])->first();
|
||||
$lines = InvoiceDetails::where('invoice_id', $invoice->id)->get();
|
||||
|
||||
$data = [
|
||||
'title' => 'DO',
|
||||
'detail' => [
|
||||
'date' => Carbon::createFromFormat('Y-m-d H:i:s', $booking->created_at)->format('d-m-Y'),
|
||||
'ei' => '',
|
||||
'edo' => 'EDO-202009-000001',
|
||||
'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('do.pdf');
|
||||
return $pdf->download('do.pdf');
|
||||
}
|
||||
|
||||
private function isUser($booking_id, $user_id) {
|
||||
|
||||
Reference in New Issue
Block a user