mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for JSON payment import
This commit is contained in:
parent
b2c93897ed
commit
408aede80a
@ -171,9 +171,10 @@ class ImportService
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($jsonInvoice['payments'] as $jsonPayment) {
|
foreach ($jsonInvoice['payments'] as $jsonPayment) {
|
||||||
$jsonPayment['client_id'] = $jsonPayment['client'] = $client->id; // TODO: change to client_id once views are updated
|
$jsonPayment['invoice_id'] = $invoice->public_id;
|
||||||
$jsonPayment['invoice_id'] = $jsonPayment['invoice'] = $invoice->id; // TODO: change to invoice_id once views are updated
|
|
||||||
if (EntityModel::validate($jsonPayment, ENTITY_PAYMENT) === true) {
|
if (EntityModel::validate($jsonPayment, ENTITY_PAYMENT) === true) {
|
||||||
|
$jsonPayment['client_id'] = $client->id;
|
||||||
|
$jsonPayment['invoice_id'] = $invoice->id;
|
||||||
$payment = $this->paymentRepo->save($jsonPayment);
|
$payment = $this->paymentRepo->save($jsonPayment);
|
||||||
$this->addSuccess($payment);
|
$this->addSuccess($payment);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2227,7 +2227,6 @@ $LANG = array(
|
|||||||
'entity_state' => 'State',
|
'entity_state' => 'State',
|
||||||
'payment_status_name' => 'Status',
|
'payment_status_name' => 'Status',
|
||||||
'client_created_at' => 'Date Created',
|
'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',
|
'postmark_error' => 'There was a problem sending the email through Postmark: :link',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -32,8 +32,7 @@
|
|||||||
|
|
||||||
@foreach (\App\Services\ImportService::$entityTypes as $entityType)
|
@foreach (\App\Services\ImportService::$entityTypes as $entityType)
|
||||||
{!! Former::file("{$entityType}_file")
|
{!! Former::file("{$entityType}_file")
|
||||||
->addGroupClass("import-file {$entityType}-file")
|
->addGroupClass("import-file {$entityType}-file") !!}
|
||||||
->help($entityType == IMPORT_JSON ? '<br/>' . trans('texts.json_import_help') : false) !!}
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
{!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!}
|
{!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!}
|
||||||
|
@ -218,6 +218,7 @@
|
|||||||
// Setup state/status filter
|
// Setup state/status filter
|
||||||
$('#statuses_{{ $entityType }}').select2({
|
$('#statuses_{{ $entityType }}').select2({
|
||||||
placeholder: "{{ trans('texts.status') }}",
|
placeholder: "{{ trans('texts.status') }}",
|
||||||
|
//allowClear: true,
|
||||||
templateSelection: function(data, container) {
|
templateSelection: function(data, container) {
|
||||||
if (data.id == 'archived') {
|
if (data.id == 'archived') {
|
||||||
$(container).css('color', '#fff');
|
$(container).css('color', '#fff');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user