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