mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:44:28 -04:00
Show read only values when editing a payment
This commit is contained in:
parent
e599b7ee89
commit
a5ead8407d
@ -4,6 +4,11 @@ use Utils;
|
||||
|
||||
class PaymentPresenter extends EntityPresenter {
|
||||
|
||||
public function amount()
|
||||
{
|
||||
return Utils::formatMoney($this->entity->amount, $this->entity->client->currency_id);
|
||||
}
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->entity->client ? $this->entity->client->getDisplayName() : '';
|
||||
|
@ -38,7 +38,11 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
@if (!$payment)
|
||||
@if ($payment)
|
||||
{!! Former::plaintext()->label('client')->value($payment->client->getDisplayName()) !!}
|
||||
{!! Former::plaintext()->label('invoice')->value($payment->invoice->getDisplayName()) !!}
|
||||
{!! Former::plaintext()->label('amount')->value($payment->present()->amount) !!}
|
||||
@else
|
||||
{!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!}
|
||||
{!! Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') !!}
|
||||
{!! Former::text('amount') !!}
|
||||
|
Loading…
x
Reference in New Issue
Block a user