0 0 Punkte

Hallo,

ich lade meine Umsätze von einer Bankwebseite herunter (Kein MT940 Format). In der Datei befinde sich 13 Spalten für Verwendungszwecke (VWZ1-14) diese sollen zu einem Verwendungszweck zusammengefasst werden. Prinzipiell ist das ja in Kivitendo schon vorgesehen, nur leider funktioniert das über den Importassistenten bzw. Spaltenzuordnung nicht, da man nur einmal "purpose" als Feld zur Auswahl hat. Wenn man allen VWZ-Feldern das Zielfeld "purpose" zuordnet wird beim Import nur ein Feld zugeordnet.

Das war in der 3.4er Version auch schon so, ich habe das damals folgendermaßen gelöst.
In der Datei SL/Controller/CsvImport/BankTransaction.pm habe ich in den Auflistungen "purpose1" bis "purpose13" hinzugefügt:

86 sub _displayable_columns {
 87  (
 88    { name => 'local_bank_code',       description => $::locale->text('Own bank code') },
 89    { name => 'local_account_number',  description => $::locale->text('Own bank account number or IBAN') },
 90    { name => 'local_bank_account_id', description => $::locale->text('ID of own bank account') },
 91    { name => 'remote_bank_code',      description => $::locale->text('Bank code of the goal/source') },
 92    { name => 'remote_account_number', description => $::locale->text('Account number of the goal/source') },
 93    { name => 'transdate',             description => $::locale->text('Transdate') },
 94    { name => 'valutadate',            description => $::locale->text('Valutadate') },
 95    { name => 'amount',                description => $::locale->text('Amount') },
 96    { name => 'currency',              description => $::locale->text('Currency') },
 97    { name => 'currency_id',           description => $::locale->text('Currency (database ID)')          },
 98    { name => 'remote_name',           description => $::locale->text('Name of the goal/source (if field names remote_name and remote_name_1 exist they will be combined into field "remote_name")') },
 99    { name => 'purpose',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
100    { name => 'purpose1',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
101    { name => 'purpose2',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
102    { name => 'purpose3',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
103    { name => 'purpose4',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
104    { name => 'purpose5',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
105    { name => 'purpose6',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
106    { name => 'purpose7',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
107    { name => 'purpose8',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
108    { name => 'purpose9',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
109    { name => 'purpose10',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
110    { name => 'purpose11',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
111    { name => 'purpose12',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
112    { name => 'purpose13',               description => $::locale->text('Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")') },
113  );
177   my $purpose = join('', $entry->{raw_data}->{purpose},
178                          $entry->{raw_data}->{purpose1},
179                          $entry->{raw_data}->{purpose2},
180                          $entry->{raw_data}->{purpose3},
181                          $entry->{raw_data}->{purpose4},
182                          $entry->{raw_data}->{purpose5},
183                          $entry->{raw_data}->{purpose6},
184                          $entry->{raw_data}->{purpose7},
185                          $entry->{raw_data}->{purpose8},
186                          $entry->{raw_data}->{purpose9},
187                          $entry->{raw_data}->{purpose10},
188                          $entry->{raw_data}->{purpose11},
189                          $entry->{raw_data}->{purpose12},
190                          $entry->{raw_data}->{purpose13});

So kann man im Importassistenten die Verwendungszwecke zuordnen und beim Import werden Sie dann zusammengefasst. Ob das eine optimale Lösung ist kann ich nicht sagen, bin kein Entwickler. Aber Sie funktioniert. Vielleicht kann das jemand in den Sourcecode einfügen, dann fliegt es mir nicht bei jedem Update um die Ohren. ;-)

Ein weiteres Problem sind Umlaute bei Spaltenüberschriften z.B. 'Auftraggeber / Empfänger' oder 'Währung'. Die werden in der Spaltenzuordnung als "Auftraggeber/Empf\xE4nger" und "W\xE4hrung" angezeigt und auch so in die Datenbank im Importprofil geschrieben. Die muss man dann direkt in der Datenbank wieder auf die korrekten Umlaute ändern, damit die Felder auch importiert werden können.

Vielleicht mag sich ja jemand auch mal dieses Thema anschauen.

Grüße
Andreas

1 Antwort

0 0 Punkte

Hi Andreas,

der erste Punkt ist wie gestern besprochen in den Standard gewandert.

Bei einer git-Installation kann das wie folgt geholt werden:

service apache2 stop
git checkout master
git pull
git checkout mein_eigener_branch
git cherry-pick 0f37ddcd492b271a6b
service apache2 start

Das zweite Problem sollte so auch nicht passieren.
Stimmt den das Encoding der CSV-Datei mit dem Encoding der im CSV-Profil überein?

Ähnliche Fragen

0 0 Punkte
1 1 Antwort
mfreund Gefragt 8, Jan 2024
Die Export CSV sieht z.B. wie folgt aus: transdate,reqdate,ordnumber,cusordnumber,name,amount,employee,delivered Erwartet wird beim Import: datatype,billing_address_id,cl...
0 0 Punkte
1 1 Antwort
Jenny Gefragt 7, Mär 2013
Hallo, habe seit Anfang der Woche das Problem, dass der Kundenimport per CSV nicht mehr funktioniert. Nach dem Klicken auf "Test und Vorschau" fängt sich der orange Fort...
0 0 Punkte
0 0 Antworten
AEITB Gefragt 8, Mai 2017
Hallo, Kann man die Positionen aus dem Lieferantenauftrag als CSV File aus dem Kivitendo exportieren, oder als Anhang zur einer eMail hinzufügen ? Einige unser Lieferant...
0 0 Punkte
3 3 Antworten
Anonym Gefragt 14, Jun 2012
Hello@all :) Kivitendo mach auf mich, nach den ersten Schritten der Einarbeitung, einen positiven Eindruck. Der CSV Import von alten Daten war, nach kleinen Anlaufproblem...
0 0 Punkte
2 2 Antworten
florkowe Gefragt 30, Jun 2022
Hallo kivi Team, es ist ja bereits möglich über System->CSV-Import->Waren Preislisten von Lieferanten per CSV zu importieren. Sogar ein Profil kann man sich abspeichern...