coding style
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use LaravelDaily\Invoices\Invoice;
|
||||
use LaravelDaily\Invoices\Classes\Party;
|
||||
use LaravelDaily\Invoices\Classes\InvoiceItem;
|
||||
use LaravelDaily\Invoices\Classes\Party;
|
||||
use LaravelDaily\Invoices\Invoice;
|
||||
|
||||
class InvoicePDF
|
||||
{
|
||||
@@ -18,8 +18,8 @@ class InvoicePDF
|
||||
{
|
||||
$invoice = Invoices::getFull($id);
|
||||
$customer = new Party([
|
||||
'name' => $invoice->customer->name,
|
||||
'address' => self::makeAddress($invoice->address),
|
||||
'name' => $invoice->customer->name,
|
||||
'address' => self::makeAddress($invoice->address),
|
||||
'custom_fields' => [
|
||||
'order number' => $invoice->order->ref,
|
||||
],
|
||||
@@ -27,13 +27,13 @@ class InvoicePDF
|
||||
|
||||
$items = self::makeItems($invoice->order->detail);
|
||||
|
||||
$invoice = Invoice::make(__('invoices::invoice.invoice') . ' ' .$invoice->ref)
|
||||
$invoice = Invoice::make(__('invoices::invoice.invoice').' '.$invoice->ref)
|
||||
->status(Invoices::getStatus($invoice->status))
|
||||
->buyer($customer)
|
||||
->shipping($invoice->shipping)
|
||||
->date(Carbon::parse($invoice->date_invoice))
|
||||
->payUntilDays(14)
|
||||
->filename('invoice-' . $invoice->ref . '-' . $invoice->uuid)
|
||||
->filename('invoice-'.$invoice->ref.'-'.$invoice->uuid)
|
||||
->addItems($items)
|
||||
->notes($invoice->comment ?? '')
|
||||
->logo(public_path('img/logo.png'))
|
||||
@@ -48,7 +48,7 @@ class InvoicePDF
|
||||
|
||||
public static function makeAddress($address)
|
||||
{
|
||||
return $address->address . '<br>' . $address->zipcode . ' ' . $address->city;
|
||||
return $address->address.'<br>'.$address->zipcode.' '.$address->city;
|
||||
}
|
||||
|
||||
public static function makeItems($details)
|
||||
@@ -61,7 +61,7 @@ class InvoicePDF
|
||||
->taxByPercent($detail->vat)
|
||||
->quantity($detail->quantity);
|
||||
}
|
||||
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user