1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Ninja/Presenters/ClientPresenter.php
2015-11-12 22:36:28 +02:00

28 lines
643 B
PHP

<?php namespace App\Ninja\Presenters;
use Utils;
use Laracasts\Presenter\Presenter;
class ClientPresenter extends Presenter {
public function balance()
{
$amount = $this->entity->balance;
$currencyId = $this->entity->currency_id;
return Utils::formatMoney($amount, $currencyId);
}
public function paid_to_date()
{
$amount = $this->entity->paid_to_date;
$currencyId = $this->entity->currency_id;
return Utils::formatMoney($amount, $currencyId);
}
public function country()
{
return $this->entity->country ? $this->entity->country->name : '';
}
}