diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index eb03ea768db4..bb80ba840383 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -171,9 +171,10 @@ class ImportService } foreach ($jsonInvoice['payments'] as $jsonPayment) { - $jsonPayment['client_id'] = $jsonPayment['client'] = $client->id; // TODO: change to client_id once views are updated - $jsonPayment['invoice_id'] = $jsonPayment['invoice'] = $invoice->id; // TODO: change to invoice_id once views are updated + $jsonPayment['invoice_id'] = $invoice->public_id; if (EntityModel::validate($jsonPayment, ENTITY_PAYMENT) === true) { + $jsonPayment['client_id'] = $client->id; + $jsonPayment['invoice_id'] = $invoice->id; $payment = $this->paymentRepo->save($jsonPayment); $this->addSuccess($payment); } else { diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index f575503cb20a..9cc38a84f0ae 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2227,7 +2227,6 @@ $LANG = array( 'entity_state' => 'State', 'payment_status_name' => 'Status', 'client_created_at' => 'Date Created', - 'json_import_help' => 'We recommend importing into an empty account.', 'postmark_error' => 'There was a problem sending the email through Postmark: :link', ); diff --git a/resources/views/accounts/import_export.blade.php b/resources/views/accounts/import_export.blade.php index f86441de6dd5..36c8da0e4733 100644 --- a/resources/views/accounts/import_export.blade.php +++ b/resources/views/accounts/import_export.blade.php @@ -32,8 +32,7 @@ @foreach (\App\Services\ImportService::$entityTypes as $entityType) {!! Former::file("{$entityType}_file") - ->addGroupClass("import-file {$entityType}-file") - ->help($entityType == IMPORT_JSON ? '
' . trans('texts.json_import_help') : false) !!} + ->addGroupClass("import-file {$entityType}-file") !!} @endforeach {!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!} diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 8e38652b6413..cb039747ff04 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -218,6 +218,7 @@ // Setup state/status filter $('#statuses_{{ $entityType }}').select2({ placeholder: "{{ trans('texts.status') }}", + //allowClear: true, templateSelection: function(data, container) { if (data.id == 'archived') { $(container).css('color', '#fff');