X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCsvImport.pm;h=d1ff7199fef59d61fb8336b13e9d38b62c48bd08;hb=f15f5e4321df31d2279edb480e9c7fc15c3af31c;hp=05043d9d3d96ba705bb364701b2087c7bfd4e3ba;hpb=11fafb0ba321d8d345fd551c48b93aded6ac9b84;p=kivitendo-erp.git diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 05043d9d3..d1ff7199f 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -13,6 +13,7 @@ use SL::Helper::Flash; use SL::Locale::String; use SL::SessionFile; use SL::SessionFile::Random; +use SL::Controller::CsvImport::AdditionalBillingAddress; use SL::Controller::CsvImport::Contact; use SL::Controller::CsvImport::CustomerVendor; use SL::Controller::CsvImport::Part; @@ -104,7 +105,7 @@ sub action_result { $self->profile($profile); if ($data->{errors} and my $first_error = $data->{errors}->[0]) { - flash('error', $::locale->text('There was an error parsing the csv file: #1 in line #2: #3', $first_error->[2], $first_error->[0], $first_error->[1])); + flash('error', $::locale->text('There was an error parsing the csv file: #1 in line #2.', $first_error->[2], $first_error->[4])); } if ($data->{progress}{finished} || $data->{errors}) { @@ -307,7 +308,7 @@ sub check_auth { sub check_type { my ($self) = @_; - die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts inventories customers_vendors addresses contacts projects orders delivery_orders bank_transactions ar_transactions); + die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts inventories customers_vendors billing_addresses addresses contacts projects orders delivery_orders bank_transactions ar_transactions); $self->type($::form->{profile}->{type}); } @@ -348,6 +349,7 @@ sub render_inputs { } my $title = $self->type eq 'customers_vendors' ? $::locale->text('CSV import: customers and vendors') + : $self->type eq 'billing_addresses' ? $::locale->text('CSV import: additional billing addresses') : $self->type eq 'addresses' ? $::locale->text('CSV import: shipping addresses') : $self->type eq 'contacts' ? $::locale->text('CSV import: contacts') : $self->type eq 'parts' ? $::locale->text('CSV import: parts and services') @@ -720,6 +722,7 @@ sub init_worker { return $self->{type} eq 'customers_vendors' ? SL::Controller::CsvImport::CustomerVendor->new(@args) : $self->{type} eq 'contacts' ? SL::Controller::CsvImport::Contact->new(@args) + : $self->{type} eq 'billing_addresses' ? SL::Controller::CsvImport::AdditionalBillingAddress->new(@args) : $self->{type} eq 'addresses' ? SL::Controller::CsvImport::Shipto->new(@args) : $self->{type} eq 'parts' ? SL::Controller::CsvImport::Part->new(@args) : $self->{type} eq 'inventories' ? SL::Controller::CsvImport::Inventory->new(@args)