if ($self->settings->{article_number_policy} eq 'update_prices') {
if ($entry->{part}) {
- map { $entry->{part}->$_( $object->$_ ) if defined $object->$_ } qw(sellprice listprice lastcost);
+ map { $entry->{part}->$_( $object->$_ ) if defined $object->$_ } qw(sellprice listprice lastcost);
# merge prices
my %prices_by_pricegroup_id = map { $_->pricegroup->id => $_ } $entry->{part}->prices, $object->prices;
push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database');
$entry->{object_to_save} = $entry->{part};
}
-
+ } elsif ( $self->settings->{article_number_policy} eq 'skip' ) {
+ push(@{$entry->{errors}}, $::locale->text('Skipping due to existing entry in database')) if ( $entry->{part} );
} else {
$object->partnumber('####') if $entry->{part};
}
'Single quotes' => 'Einfache Anführungszeichen',
'Single values in item mode, cumulated values in invoice mode' => 'Einzelwerte im Artikelmodus, kumulierte Werte im Rechnungsmodus',
'Skip' => 'Überspringen',
+ 'Skip entry' => 'Eintrag überspringen',
+ 'Skipping due to existing entry in database' => 'Übersprungen, wegen existierender Artikelnummer',
'Skonto' => 'Skonto',
'Skonto Terms' => 'Zahlungsziel Skonto',
'Sold' => 'Verkauft',
<tr>
<th align="right">[%- LxERP.t8('Parts with existing part numbers') %]:</th>
<td colspan="10">
- [% opts = [ [ 'update_prices', LxERP.t8('Update prices of existing entries') ], [ 'insert_new', LxERP.t8('Insert with new part number') ] ] %]
+ [% opts = [ [ 'update_prices', LxERP.t8('Update prices of existing entries') ], [ 'insert_new', LxERP.t8('Insert with new part number') ], [ 'skip', LxERP.t8('Skip entry') ] ] %]
[% L.select_tag('settings.article_number_policy', L.options_for_select(opts, default => SELF.profile.get('article_number_policy')), style => 'width: 300px') %]
</td>
</tr>