1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/app/Models/Presenters/QuotePresenter.php
michael-hampton f7650d0692
Ft email (#3326)
* Emails

* change to user service

* refactor emails

* refactor emails

* refactor emails

* refactor emails

* emails

* emails

* emails

* emails

* emails

* emails

* emails

* emails

* emails

* emails

* Update EmailPayment.php

* Update SendEmail.php

* Update SendEmail.php

* Update SendEmail.php

* Update and rename BuildEmail.php to EmailBuilder.php

* Create InvoiceEmail

* Create QuoteEmail.php

* Rename InvoiceEmail to InvoiceEmail.php

* Create PaymentEmail.php

* Update SendEmail.php

* Update SendEmail.php

* Update SendEmail.php

* Update SendEmail.php

* Update InvoiceEmail.php

* Update EmailInvoice.php

* Update SendEmail.php

* Update TemplateEmail.php

* Update EmailBuilder.php

* Update InvoiceEmail.php

* Update QuoteEmail.php

* Update PaymentEmail.php

* Update InvoiceEmail.php

* Update QuoteEmail.php

* Update QuoteInvitation.php

* Update EmailQuote.php

* Update SendEmail.php

* Update SendEmail.php

* Update PaymentService.php

* Update PaymentEmail.php

* Update PaymentEmail.php

* Update PaymentEmail.php

* Update EmailBuilder.php

* Update PaymentEmail.php

* Update EmailPayment.php

* Update SendEmail.php

* Update InvoiceService.php

* Update SendEmail.php

* Update PaymentService.php

* Update SendEmail.php

* Update QuoteService.php

* Update EmailPayment.php

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-02-15 20:01:15 +11:00

83 lines
1.6 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Models\Presenters;
use App\Utils\Number;
use App\Utils\Traits\MakesDates;
/**
* Class InvoicePresenter
*
* For convenience and to allow users to easiliy
* customise their invoices, we provide all possible
* invoice variables to be available from this presenter.
*
* Shortcuts to other presenters are here to facilitate
* a clean UI / UX
*
* @package App\Models\Presenters
*/
class QuotePresenter extends EntityPresenter
{
use MakesDates;
public function amount()
{
return Number::formatMoney($this->balance, $this->client);
}
public function invoice_number()
{
if ($this->number != '') {
return $this->number;
} else {
return '';
}
}
public function clientName()
{
return $this->client->present()->name();
}
public function address()
{
return $this->client->present()->address();
}
public function shippingAddress()
{
return $this->client->present()->shipping_address();
}
public function companyLogo()
{
return $this->company->logo;
}
public function clientLogo()
{
return $this->client->logo;
}
public function companyName()
{
return $this->company->present()->name();
}
public function companyAddress()
{
return $this->company->present()->address();
}
}