invoiceninja/app/Ninja/Presenters/InvoicePresenter.php
2015-11-08 10:43:49 +02:00

24 lines
562 B
PHP

<?php namespace App\Ninja\Presenters;
use Utils;
use Laracasts\Presenter\Presenter;
class InvoicePresenter extends Presenter {
public function minimumAmountDue()
{
$amount = $this->entity->getRequestedAmount();
$currencyId = $this->entity->client->currency_id;
return Utils::formatMoney($amount, $currencyId);
}
public function totalAmountDue()
{
$amount = $this->entity->balance;
$currencyId = $this->entity->client->currency_id;
return Utils::formatMoney($amount, $currencyId);
}
}