1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Ninja/Presenters/ExpensePresenter.php

24 lines
494 B
PHP
Raw Normal View History

2016-01-06 20:52:09 +01:00
<?php namespace App\Ninja\Presenters;
use Utils;
2016-05-23 11:26:08 +02:00
class ExpensePresenter extends EntityPresenter {
2016-01-06 20:52:09 +01:00
2016-01-07 16:14:11 +01:00
// Expenses
2016-01-06 20:52:09 +01:00
public function vendor()
{
return $this->entity->vendor ? $this->entity->vendor->getDisplayName() : '';
}
public function expense_date()
{
return Utils::fromSqlDate($this->entity->expense_date);
}
2016-01-21 21:36:49 +01:00
2016-02-24 22:54:43 +01:00
public function invoiced_amount()
{
return $this->entity->invoice_id ? $this->entity->convertedAmount() : 0;
2016-02-24 22:54:43 +01:00
}
2016-05-23 11:26:08 +02:00
}