invoiceninja/app/Ninja/Presenters/CreditPresenter.php

28 lines
458 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Ninja\Presenters;
2015-11-12 22:36:28 +02:00
use Utils;
/**
2017-01-30 21:40:43 +02:00
* Class CreditPresenter.
*/
class CreditPresenter extends EntityPresenter
{
/**
* @return string
*/
2015-11-12 22:36:28 +02:00
public function client()
{
return $this->entity->client ? $this->entity->client->getDisplayName() : '';
}
/**
* @return \DateTime|string
*/
2015-11-12 22:36:28 +02:00
public function credit_date()
{
return Utils::fromSqlDate($this->entity->credit_date);
}
2016-05-23 12:26:08 +03:00
}