{ name => 'taxincluded', description => $::locale->text('Tax Included') },
{ name => 'customer', description => $::locale->text('Customer (name)') },
{ name => 'customernumber', description => $::locale->text('Customer Number') },
+ { name => 'customer_gln', description => $::locale->text('Customer GLN') },
{ name => 'customer_id', description => $::locale->text('Customer (database ID)') },
{ name => 'language_id', description => $::locale->text('Language (database ID)') },
{ name => 'language', description => $::locale->text('Language (name)') },
$object->transactions( [] ); # initialise transactions for ar object so methods work on unsaved transactions
my $vc_obj;
- if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_id)) {
+ if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_gln customer_id)) {
$self->check_vc($entry, 'customer_id');
# check_vc only sets customer_id, but we need vc_obj later for customer defaults
$vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id;
- } elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_id)) {
+ } elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_gln vendor_id)) {
$self->check_vc($entry, 'vendor_id');
$vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if $object->vendor_id;
} else {
vendors => { map { ( $_->vendornumber => $_ ) } @{ $self->all_vc->{vendors} } } );
my %by_name = ( customers => { map { ( $_->name => $_ ) } @{ $self->all_vc->{customers} } },
vendors => { map { ( $_->name => $_ ) } @{ $self->all_vc->{vendors} } } );
+ my %by_gln = ( customers => { map { ( $_->gln => $_ ) } @{ $self->all_vc->{customers} } },
+ vendors => { map { ( $_->gln => $_ ) } @{ $self->all_vc->{vendors} } } );
return { id => \%by_id,
number => \%by_number,
- name => \%by_name, };
+ name => \%by_name,
+ gln => \%by_gln };
}
sub check_vc {
}
if (!$entry->{object}->$id_column) {
- my $vc = $self->vc_by->{name}->{customers}->{ $entry->{raw_data}->{customer} }
- || $self->vc_by->{name}->{vendors}->{ $entry->{raw_data}->{vendor} };
+ my $vc = ($entry->{raw_data}->{customer} && $self->vc_by->{name}->{customers}->{ $entry->{raw_data}->{customer} })
+ || ($entry->{raw_data}->{vendor} && $self->vc_by->{name}->{vendors}->{ $entry->{raw_data}->{vendor} });
+ $entry->{object}->$id_column($vc->id) if $vc;
+ }
+
+ if (!$entry->{object}->$id_column) {
+ my $vc = ($entry->{raw_data}->{customer_gln} && $self->vc_by->{gln}->{customers}->{ $entry->{raw_data}->{customer_gln} })
+ || ($entry->{raw_data}->{vendor_gln} && $self->vc_by->{gln}->{vendors}->{ $entry->{raw_data}->{vendor_gln} } );
$entry->{object}->$id_column($vc->id) if $vc;
}
{ name => 'customer', description => $::locale->text('Customer (name)') },
{ name => 'customernumber', description => $::locale->text('Customer Number') },
+ { name => 'customer_gln', description => $::locale->text('Customer GLN') },
{ name => 'vendor', description => $::locale->text('Vendor (name)') },
{ name => 'vendornumber', description => $::locale->text('Vendor Number') },
+ { name => 'vendor_gln', description => $::locale->text('Vendor GLN') },
);
}
{ name => 'taxincluded', description => $::locale->text('Tax Included') },
{ name => 'customer', description => $::locale->text('Customer (name)') },
{ name => 'customernumber', description => $::locale->text('Customer Number') },
+ { name => 'customer_gln', description => $::locale->text('Customer GLN') },
{ name => 'customer_id', description => $::locale->text('Customer (database ID)') },
{ name => 'vendor', description => $::locale->text('Vendor (name)') },
{ name => 'vendornumber', description => $::locale->text('Vendor Number') },
+ { name => 'vendor_gln', description => $::locale->text('Vendor GLN') },
{ name => 'vendor_id', description => $::locale->text('Vendor (database ID)') },
{ name => 'language_id', description => $::locale->text('Language (database ID)') },
{ name => 'language', description => $::locale->text('Language (name)') },
my $object = $entry->{object};
my $vc_obj;
- if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_id)) {
+ if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_gln customer_id)) {
$self->check_vc($entry, 'customer_id');
$vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id;
- } elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_id)) {
+ } elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_gln vendor_id)) {
$self->check_vc($entry, 'vendor_id');
$vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if $object->vendor_id;
} else {
{ name => 'trans_id', description => $::locale->text('Customer/Vendor (database ID)') },
{ name => 'customer', description => $::locale->text('Customer (name)') },
{ name => 'customernumber', description => $::locale->text('Customer Number') },
+ { name => 'customer_gln', description => $::locale->text('Customer GLN') },
{ name => 'vendor', description => $::locale->text('Vendor (name)') },
{ name => 'vendornumber', description => $::locale->text('Vendor Number') },
+ { name => 'vendor_gln', description => $::locale->text('Vendor GLN') },
);
}
'Assume Tax Consultant Data in Tax Computation?' => 'Beraterdaten in UStVA übernehmen?',
'At least' => 'Mindestens',
'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.',
- '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.',
+ '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.',
'At most' => 'Höchstens',
'At the moment the transaction looks like this:' => 'Aktuell sieht die Buchung wie folgt aus:',
'Attach PDF:' => 'PDF anhängen',
'Customer (database ID)' => 'Kunde (Datenbank-ID)',
'Customer (name)' => 'Kunde (Name)',
'Customer Discount' => 'Kundenrabatt',
+ 'Customer GLN' => 'GLN des Kunden',
'Customer Master Data' => 'Kundenstammdaten',
'Customer Name' => 'Kundenname',
'Customer Number' => 'Kundennummer',
'Vendor (database ID)' => 'Lieferant (Datenbank-ID)',
'Vendor (name)' => 'Lieferant (Name)',
'Vendor Discount' => 'Lieferantenrabatt',
+ 'Vendor GLN' => 'GLN des Lieferanten',
'Vendor Invoice' => 'Einkaufsrechnung',
'Vendor Invoices & AP Transactions' => 'Einkaufsrechnungen & Kreditorenbuchungen',
'Vendor Master Data' => 'Lieferantenstammdaten',
'Assume Tax Consultant Data in Tax Computation?' => '',
'At least' => '',
'At least one Perl module that kivitendo ERP requires for running is not installed on your system.' => '',
- '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.' => '',
+ '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.' => '',
'At most' => '',
'At the moment the transaction looks like this:' => '',
'Attach PDF:' => '',
'Customer (database ID)' => '',
'Customer (name)' => '',
'Customer Discount' => '',
+ 'Customer GLN' => '',
'Customer Master Data' => '',
'Customer Name' => '',
'Customer Number' => '',
'Vendor (database ID)' => '',
'Vendor (name)' => '',
'Vendor Discount' => '',
+ 'Vendor GLN' => '',
'Vendor Invoice' => '',
'Vendor Invoices & AP Transactions' => '',
'Vendor Master Data' => '',
[%- IF SELF.type == 'contacts' %]
<p>
[%- LxERP.t8("You can update existing contacts by providing the 'cp_id' column with their database IDs. Otherwise: ") %]
- [%- 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') %]
+ [%- 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') %]
</p>
[%- ELSIF SELF.type == 'addresses' %]
<p>
- [%- 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') %]
+ [%- 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') %]
</p>
[%- ELSIF SELF.type == 'parts' %]