mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
24 lines
494 B
PHP
24 lines
494 B
PHP
<?php namespace App\Ninja\Presenters;
|
|
|
|
use Utils;
|
|
|
|
class ExpensePresenter extends EntityPresenter {
|
|
|
|
// Expenses
|
|
public function vendor()
|
|
{
|
|
return $this->entity->vendor ? $this->entity->vendor->getDisplayName() : '';
|
|
}
|
|
|
|
public function expense_date()
|
|
{
|
|
return Utils::fromSqlDate($this->entity->expense_date);
|
|
}
|
|
|
|
public function invoiced_amount()
|
|
{
|
|
return $this->entity->invoice_id ? $this->entity->convertedAmount() : 0;
|
|
}
|
|
|
|
}
|