From a99065f70b9d662bf2517032e021a4946eac5a47 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 16 May 2017 16:47:20 +0300 Subject: [PATCH] Private note in a payment #1478 --- app/Ninja/Repositories/PaymentRepository.php | 3 +++ resources/views/export/clients.blade.php | 4 ++++ resources/views/export/invoices.blade.php | 4 ++++ resources/views/export/payments.blade.php | 2 ++ resources/views/payments/edit.blade.php | 1 + 5 files changed, 14 insertions(+) diff --git a/app/Ninja/Repositories/PaymentRepository.php b/app/Ninja/Repositories/PaymentRepository.php index 4d6683744a..34d6555c89 100644 --- a/app/Ninja/Repositories/PaymentRepository.php +++ b/app/Ninja/Repositories/PaymentRepository.php @@ -189,6 +189,9 @@ class PaymentRepository extends BaseRepository if (isset($input['transaction_reference'])) { $payment->transaction_reference = trim($input['transaction_reference']); } + if (isset($input['private_notes'])) { + $payment->private_notes = trim($input['private_notes']); + } if (! $publicId) { $clientId = $input['client_id']; diff --git a/resources/views/export/clients.blade.php b/resources/views/export/clients.blade.php index d2ad3c95ce..ad4f7f3803 100644 --- a/resources/views/export/clients.blade.php +++ b/resources/views/export/clients.blade.php @@ -15,6 +15,8 @@ {{ trans('texts.vat_number') }} {{ trans('texts.website') }} {{ trans('texts.phone') }} + {{ trans('texts.public_notes') }} + {{ trans('texts.private_notes') }} @if ($account->custom_client_label1) {{ $account->custom_client_label1 }} @endif @@ -41,6 +43,8 @@ {{ $client->vat_number }} {{ $client->website }} {{ $client->work_phone }} + {{ $client->public_notes }} + {{ $client->private_notes }} @if ($account->custom_client_label1) {{ $client->custom_value1 }} @endif diff --git a/resources/views/export/invoices.blade.php b/resources/views/export/invoices.blade.php index 1e99f85b1b..fb99572753 100644 --- a/resources/views/export/invoices.blade.php +++ b/resources/views/export/invoices.blade.php @@ -11,6 +11,8 @@ {{ trans('texts.status') }} {{ trans(isset($entityType) && $entityType == ENTITY_QUOTE ? 'texts.quote_date' : 'texts.invoice_date') }} {{ trans('texts.due_date') }} + {{ trans('texts.public_notes') }} + {{ trans('texts.private_notes') }} @if ($account->custom_invoice_label1) {{ $account->custom_invoice_label1 }} @endif @@ -40,6 +42,8 @@ {{ $invoice->present()->status }} {{ $invoice->present()->invoice_date }} {{ $invoice->present()->due_date }} + {{ $invoice->public_notes }} + {{ $invoice->private_notes }} @if ($account->custom_invoice_label1) {{ $invoice->custom_value1 }} @endif diff --git a/resources/views/export/payments.blade.php b/resources/views/export/payments.blade.php index 81cee2297d..898cae71e9 100644 --- a/resources/views/export/payments.blade.php +++ b/resources/views/export/payments.blade.php @@ -8,6 +8,7 @@ {{ trans('texts.payment_date') }} {{ trans('texts.method') }} {{ trans('texts.transaction_reference') }} + {{ trans('texts.private_notes') }} @foreach ($payments as $payment) @@ -22,6 +23,7 @@ {{ $payment->present()->payment_date }} {{ $payment->present()->method }} {{ $payment->transaction_reference }} + {{ $payment->private_notes }} @endif @endforeach diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php index d64ca35aba..aa974d7c0c 100644 --- a/resources/views/payments/edit.blade.php +++ b/resources/views/payments/edit.blade.php @@ -69,6 +69,7 @@ ->addGroupClass('payment_date') ->append('') !!} {!! Former::text('transaction_reference') !!} + {!! Former::textarea('private_notes') !!} @if (!$payment) {!! Former::checkbox('email_receipt')