Revision d8b09e08
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
SL/Controller/CsvImport/ARTransaction.pm | ||
---|---|---|
108 | 108 |
{ name => 'taxincluded', description => $::locale->text('Tax Included') }, |
109 | 109 |
{ name => 'customer', description => $::locale->text('Customer (name)') }, |
110 | 110 |
{ name => 'customernumber', description => $::locale->text('Customer Number') }, |
111 |
{ name => 'customer_gln', description => $::locale->text('Customer GLN') }, |
|
111 | 112 |
{ name => 'customer_id', description => $::locale->text('Customer (database ID)') }, |
112 | 113 |
{ name => 'language_id', description => $::locale->text('Language (database ID)') }, |
113 | 114 |
{ name => 'language', description => $::locale->text('Language (name)') }, |
... | ... | |
251 | 252 |
$object->transactions( [] ); # initialise transactions for ar object so methods work on unsaved transactions |
252 | 253 |
|
253 | 254 |
my $vc_obj; |
254 |
if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_id)) { |
|
255 |
if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_gln customer_id)) {
|
|
255 | 256 |
$self->check_vc($entry, 'customer_id'); |
256 | 257 |
# check_vc only sets customer_id, but we need vc_obj later for customer defaults |
257 | 258 |
$vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id; |
258 |
} elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_id)) { |
|
259 |
} elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_gln vendor_id)) {
|
|
259 | 260 |
$self->check_vc($entry, 'vendor_id'); |
260 | 261 |
$vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if $object->vendor_id; |
261 | 262 |
} else { |
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
188 | 188 |
vendors => { map { ( $_->vendornumber => $_ ) } @{ $self->all_vc->{vendors} } } ); |
189 | 189 |
my %by_name = ( customers => { map { ( $_->name => $_ ) } @{ $self->all_vc->{customers} } }, |
190 | 190 |
vendors => { map { ( $_->name => $_ ) } @{ $self->all_vc->{vendors} } } ); |
191 |
my %by_gln = ( customers => { map { ( $_->gln => $_ ) } @{ $self->all_vc->{customers} } }, |
|
192 |
vendors => { map { ( $_->gln => $_ ) } @{ $self->all_vc->{vendors} } } ); |
|
191 | 193 |
|
192 | 194 |
return { id => \%by_id, |
193 | 195 |
number => \%by_number, |
194 |
name => \%by_name, }; |
|
196 |
name => \%by_name, |
|
197 |
gln => \%by_gln }; |
|
195 | 198 |
} |
196 | 199 |
|
197 | 200 |
sub check_vc { |
... | ... | |
208 | 211 |
} |
209 | 212 |
|
210 | 213 |
if (!$entry->{object}->$id_column) { |
211 |
my $vc = $self->vc_by->{name}->{customers}->{ $entry->{raw_data}->{customer} } |
|
212 |
|| $self->vc_by->{name}->{vendors}->{ $entry->{raw_data}->{vendor} }; |
|
214 |
my $vc = ($entry->{raw_data}->{customer} && $self->vc_by->{name}->{customers}->{ $entry->{raw_data}->{customer} }) |
|
215 |
|| ($entry->{raw_data}->{vendor} && $self->vc_by->{name}->{vendors}->{ $entry->{raw_data}->{vendor} }); |
|
216 |
$entry->{object}->$id_column($vc->id) if $vc; |
|
217 |
} |
|
218 |
|
|
219 |
if (!$entry->{object}->$id_column) { |
|
220 |
my $vc = ($entry->{raw_data}->{customer_gln} && $self->vc_by->{gln}->{customers}->{ $entry->{raw_data}->{customer_gln} }) |
|
221 |
|| ($entry->{raw_data}->{vendor_gln} && $self->vc_by->{gln}->{vendors}->{ $entry->{raw_data}->{vendor_gln} } ); |
|
213 | 222 |
$entry->{object}->$id_column($vc->id) if $vc; |
214 | 223 |
} |
215 | 224 |
|
SL/Controller/CsvImport/Contact.pm | ||
---|---|---|
158 | 158 |
|
159 | 159 |
{ name => 'customer', description => $::locale->text('Customer (name)') }, |
160 | 160 |
{ name => 'customernumber', description => $::locale->text('Customer Number') }, |
161 |
{ name => 'customer_gln', description => $::locale->text('Customer GLN') }, |
|
161 | 162 |
{ name => 'vendor', description => $::locale->text('Vendor (name)') }, |
162 | 163 |
{ name => 'vendornumber', description => $::locale->text('Vendor Number') }, |
164 |
{ name => 'vendor_gln', description => $::locale->text('Vendor GLN') }, |
|
163 | 165 |
); |
164 | 166 |
} |
165 | 167 |
|
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
133 | 133 |
{ name => 'taxincluded', description => $::locale->text('Tax Included') }, |
134 | 134 |
{ name => 'customer', description => $::locale->text('Customer (name)') }, |
135 | 135 |
{ name => 'customernumber', description => $::locale->text('Customer Number') }, |
136 |
{ name => 'customer_gln', description => $::locale->text('Customer GLN') }, |
|
136 | 137 |
{ name => 'customer_id', description => $::locale->text('Customer (database ID)') }, |
137 | 138 |
{ name => 'vendor', description => $::locale->text('Vendor (name)') }, |
138 | 139 |
{ name => 'vendornumber', description => $::locale->text('Vendor Number') }, |
140 |
{ name => 'vendor_gln', description => $::locale->text('Vendor GLN') }, |
|
139 | 141 |
{ name => 'vendor_id', description => $::locale->text('Vendor (database ID)') }, |
140 | 142 |
{ name => 'language_id', description => $::locale->text('Language (database ID)') }, |
141 | 143 |
{ name => 'language', description => $::locale->text('Language (name)') }, |
... | ... | |
300 | 302 |
my $object = $entry->{object}; |
301 | 303 |
|
302 | 304 |
my $vc_obj; |
303 |
if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_id)) { |
|
305 |
if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_gln customer_id)) {
|
|
304 | 306 |
$self->check_vc($entry, 'customer_id'); |
305 | 307 |
$vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id; |
306 |
} elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_id)) { |
|
308 |
} elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_gln vendor_id)) {
|
|
307 | 309 |
$self->check_vc($entry, 'vendor_id'); |
308 | 310 |
$vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if $object->vendor_id; |
309 | 311 |
} else { |
SL/Controller/CsvImport/Shipto.pm | ||
---|---|---|
120 | 120 |
{ name => 'trans_id', description => $::locale->text('Customer/Vendor (database ID)') }, |
121 | 121 |
{ name => 'customer', description => $::locale->text('Customer (name)') }, |
122 | 122 |
{ name => 'customernumber', description => $::locale->text('Customer Number') }, |
123 |
{ name => 'customer_gln', description => $::locale->text('Customer GLN') }, |
|
123 | 124 |
{ name => 'vendor', description => $::locale->text('Vendor (name)') }, |
124 | 125 |
{ name => 'vendornumber', description => $::locale->text('Vendor Number') }, |
126 |
{ name => 'vendor_gln', description => $::locale->text('Vendor GLN') }, |
|
125 | 127 |
); |
126 | 128 |
} |
127 | 129 |
|
locale/de/all | ||
---|---|---|
331 | 331 |
'Assume Tax Consultant Data in Tax Computation?' => 'Beraterdaten in UStVA übernehmen?', |
332 | 332 |
'At least' => 'Mindestens', |
333 | 333 |
'At least one Perl module that kivitendo ERP requires for running is not installed on your system.' => 'Mindestes ein Perl-Modul, das kivitendo ERP zur Ausführung benötigt, ist auf Ihrem System nicht installiert.', |
334 |
'At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.' => 'Mindestens eine der Spalten #1, customer, customernumber, vendor, vendornumber (von Zieltabelle abhängig) wird benötigt, um einen Eintrag einem bestehenden Kunden bzw. Lieferanten zuzuordnen.',
|
|
334 |
'At least one of the columns #1, customer, customernumber, customer_gln, vendor, vendornumber, vendor_gln (depending on the target table) is required for matching the entry to an existing customer or vendor.' => 'Mindestens eine der Spalten #1, customer, customernumber, customer_gln, vendor, vendornumber, vendor_gln (von Zieltabelle abhängig) wird benötigt, um einen Eintrag einem bestehenden Kunden bzw. Lieferanten zuzuordnen.',
|
|
335 | 335 |
'At most' => 'Höchstens', |
336 | 336 |
'At the moment the transaction looks like this:' => 'Aktuell sieht die Buchung wie folgt aus:', |
337 | 337 |
'Attach PDF:' => 'PDF anhängen', |
... | ... | |
768 | 768 |
'Customer (database ID)' => 'Kunde (Datenbank-ID)', |
769 | 769 |
'Customer (name)' => 'Kunde (Name)', |
770 | 770 |
'Customer Discount' => 'Kundenrabatt', |
771 |
'Customer GLN' => 'GLN des Kunden', |
|
771 | 772 |
'Customer Master Data' => 'Kundenstammdaten', |
772 | 773 |
'Customer Name' => 'Kundenname', |
773 | 774 |
'Customer Number' => 'Kundennummer', |
... | ... | |
3468 | 3469 |
'Vendor (database ID)' => 'Lieferant (Datenbank-ID)', |
3469 | 3470 |
'Vendor (name)' => 'Lieferant (Name)', |
3470 | 3471 |
'Vendor Discount' => 'Lieferantenrabatt', |
3472 |
'Vendor GLN' => 'GLN des Lieferanten', |
|
3471 | 3473 |
'Vendor Invoice' => 'Einkaufsrechnung', |
3472 | 3474 |
'Vendor Invoices & AP Transactions' => 'Einkaufsrechnungen & Kreditorenbuchungen', |
3473 | 3475 |
'Vendor Master Data' => 'Lieferantenstammdaten', |
locale/en/all | ||
---|---|---|
323 | 323 |
'Assume Tax Consultant Data in Tax Computation?' => '', |
324 | 324 |
'At least' => '', |
325 | 325 |
'At least one Perl module that kivitendo ERP requires for running is not installed on your system.' => '', |
326 |
'At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.' => '',
|
|
326 |
'At least one of the columns #1, customer, customernumber, customer_gln, vendor, vendornumber, vendor_gln (depending on the target table) is required for matching the entry to an existing customer or vendor.' => '',
|
|
327 | 327 |
'At most' => '', |
328 | 328 |
'At the moment the transaction looks like this:' => '', |
329 | 329 |
'Attach PDF:' => '', |
... | ... | |
768 | 768 |
'Customer (database ID)' => '', |
769 | 769 |
'Customer (name)' => '', |
770 | 770 |
'Customer Discount' => '', |
771 |
'Customer GLN' => '', |
|
771 | 772 |
'Customer Master Data' => '', |
772 | 773 |
'Customer Name' => '', |
773 | 774 |
'Customer Number' => '', |
... | ... | |
3422 | 3423 |
'Vendor (database ID)' => '', |
3423 | 3424 |
'Vendor (name)' => '', |
3424 | 3425 |
'Vendor Discount' => '', |
3426 |
'Vendor GLN' => '', |
|
3425 | 3427 |
'Vendor Invoice' => '', |
3426 | 3428 |
'Vendor Invoices & AP Transactions' => '', |
3427 | 3429 |
'Vendor Master Data' => '', |
templates/webpages/csv_import/form.html | ||
---|---|---|
108 | 108 |
[%- IF SELF.type == 'contacts' %] |
109 | 109 |
<p> |
110 | 110 |
[%- LxERP.t8("You can update existing contacts by providing the 'cp_id' column with their database IDs. Otherwise: ") %] |
111 |
[%- LxERP.t8('At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'cp_cv_id') %]
|
|
111 |
[%- LxERP.t8('At least one of the columns #1, customer, customernumber, customer_gln, vendor, vendornumber, vendor_gln (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'cp_cv_id') %]
|
|
112 | 112 |
</p> |
113 | 113 |
|
114 | 114 |
[%- ELSIF SELF.type == 'addresses' %] |
115 | 115 |
<p> |
116 |
[%- LxERP.t8('At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'trans_id') %]
|
|
116 |
[%- LxERP.t8('At least one of the columns #1, customer, customernumber, customer_gln, vendor, vendornumber, vendor_gln (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'trans_id') %]
|
|
117 | 117 |
</p> |
118 | 118 |
|
119 | 119 |
[%- ELSIF SELF.type == 'parts' %] |
Auch abrufbar als: Unified diff
CsvImport: Kunden/Lieferanten auch nach GLN suchen können.
Für die Imports, die die Angabe eines Kunden oder Lieferanten brauchen und
check_vc verwenden (Aufträge, Ansprchpersonen, Lieferanschriften,
Debitorenbuchungen), kann neben Id, Nummer oder Name auch die GLN verwendet
werden.