From: Moritz Bunkus Date: Tue, 3 May 2011 14:04:04 +0000 (+0200) Subject: Kundenspezifische Felder entfernt X-Git-Tag: release-2.7.0beta1~396^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dfd2c90eb39f3b6727933f2985df1111c6109ab5;p=kivitendo-erp.git Kundenspezifische Felder entfernt --- diff --git a/SL/Controller/CsvImport/CustomerVendor.pm b/SL/Controller/CsvImport/CustomerVendor.pm index 66a0f1bd0..e42a93df8 100644 --- a/SL/Controller/CsvImport/CustomerVendor.pm +++ b/SL/Controller/CsvImport/CustomerVendor.pm @@ -241,7 +241,6 @@ sub setup_displayable_columns { { name => 'payment_id', description => $::locale->text('Payment terms (database ID)') }, { name => 'payment', description => $::locale->text('Payment terms (name)') }, { name => 'phone', description => $::locale->text('Phone') }, - { name => 'pricing_agreement', description => $::locale->text('Pricing agreement') }, { name => 'street', description => $::locale->text('Street') }, { name => 'taxnumber', description => $::locale->text('Tax Number / SSN') }, { name => 'taxzone_id', description => $::locale->text('Steuersatz') }, diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 1181c73d4..5ae7bddcf 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -20,7 +20,7 @@ use parent qw(SL::Controller::CsvImport::Base); use Rose::Object::MakeMethods::Generic ( scalar => [ qw(table makemodel_columns) ], - 'scalar --get_set_init' => [ qw(bg_by settings parts_by price_factors_by units_by packing_types_by partsgroups_by + 'scalar --get_set_init' => [ qw(bg_by settings parts_by price_factors_by units_by partsgroups_by translation_columns all_pricegroups) ], ); @@ -43,13 +43,6 @@ sub init_price_factors_by { return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_price_factors } } ) } qw(id description) }; } -sub init_packing_types_by { - my ($self) = @_; - - my $all_packing_types = SL::DB::Manager::PackingType->get_all; - return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_packing_types } } ) } qw(id description) }; -} - sub init_partsgroups_by { my ($self) = @_; @@ -118,7 +111,6 @@ sub check_objects { $self->check_unit($entry); $self->check_price_factor($entry); $self->check_payment($entry); - $self->check_packing_type($entry); $self->check_partsgroup($entry); $self->handle_pricegroups($entry); $self->check_existing($entry) unless @{ $entry->{errors} }; @@ -132,7 +124,7 @@ sub check_objects { $self->add_columns(qw(type)) if $self->settings->{parts_type} eq 'mixed'; $self->add_columns(qw(buchungsgruppen_id unit)); - $self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw (price_factor payment packing_type partsgroup)); + $self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw (price_factor payment partsgroup)); $self->add_columns(qw(shop)) if $self->settings->{shoparticle_if_missing}; $self->add_cvar_raw_data_columns; map { $self->add_raw_data_columns("pricegroup_${_}") } (1..scalar(@{ $self->all_pricegroups })); @@ -206,7 +198,7 @@ sub check_existing { if ($self->settings->{article_number_policy} eq 'update_prices') { if ($entry->{part}) { - map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost min_sellprice prices); + map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost prices); push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database'); $entry->{object_to_save} = $entry->{part}; } @@ -289,32 +281,6 @@ sub check_price_factor { return 1; } -sub check_packing_type { - my ($self, $entry) = @_; - - my $object = $entry->{object}; - - # Check whether or not packing type ID is valid. - if ($object->packing_type_id && !$self->packing_types_by->{id}->{ $object->packing_type_id }) { - push @{ $entry->{errors} }, $::locale->text('Error: Invalid packing type'); - return 0; - } - - # Map name to ID if given. - if (!$object->packing_type_id && $entry->{raw_data}->{packing_type}) { - my $type = $self->packing_types_by->{description}->{ $entry->{raw_data}->{packing_type} }; - - if (!$type) { - push @{ $entry->{errors} }, $::locale->text('Error: Invalid packing type'); - return 0; - } - - $object->packing_type_id($type->id); - } - - return 1; -} - sub check_partsgroup { my ($self, $entry) = @_; @@ -447,7 +413,6 @@ sub setup_displayable_columns { $self->add_cvar_columns_to_displayable_columns; $self->add_displayable_columns({ name => 'bin', description => $::locale->text('Bin') }, - { name => 'binding_max_qty', description => $::locale->text('Binding Max Qty') }, { name => 'buchungsgruppen_id', description => $::locale->text('Buchungsgruppe (database ID)') }, { name => 'buchungsgruppe', description => $::locale->text('Buchungsgruppe (name)') }, { name => 'description', description => $::locale->text('Description') }, @@ -461,14 +426,11 @@ sub setup_displayable_columns { { name => 'listprice', description => $::locale->text('List Price') }, { name => 'make_X', description => $::locale->text('Make (with X being a number)') }, { name => 'microfiche', description => $::locale->text('Microfiche') }, - { name => 'min_sellprice', description => $::locale->text('Minimum Sell Price') }, { name => 'model_X', description => $::locale->text('Model (with X being a number)') }, { name => 'not_discountable', description => $::locale->text('Not Discountable') }, { name => 'notes', description => $::locale->text('Notes') }, { name => 'obsolete', description => $::locale->text('Obsolete') }, { name => 'onhand', description => $::locale->text('On Hand') }, - { name => 'packing_type_id', description => $::locale->text('Packing type (database ID)') }, - { name => 'packing_type', description => $::locale->text('Packing type (name)') }, { name => 'partnumber', description => $::locale->text('Part Number') }, { name => 'partsgroup_id', description => $::locale->text('Partsgroup (database ID)') }, { name => 'partsgroup', description => $::locale->text('Partsgroup (name)') }, diff --git a/locale/de/all b/locale/de/all index 7647d94bf..fc36154d7 100644 --- a/locale/de/all +++ b/locale/de/all @@ -277,7 +277,6 @@ $self->{texts} = { 'Bin From' => 'Quelllagerplatz', 'Bin List' => 'Lagerliste', 'Bin To' => 'Ziellagerplatz', - 'Binding Max Qty' => '', 'Binding to the LDAP server as "#1" failed. Please check config/lx_office.conf.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte überprüfen Sie die Angaben in config/lx_office.conf.', 'Bins saved.' => 'Lagerplätze gespeichert.', 'Bins that have been used in the past cannot be deleted anymore. For these bins there\'s no checkbox in the "Delete" column.' => 'Lagerplätze, die bereits benutzt wurden, können nicht mehr gelöscht werden. Deswegen fehlt bei ihnen die Checkbox in der Spalte "Löschen".', @@ -749,7 +748,6 @@ $self->{texts} = { 'Error: Gender (cp_gender) missing or invalid' => 'Fehler: Geschlecht (cp_gender) fehlt oder ungültig', 'Error: Invalid business' => 'Fehler: Kunden-/Lieferantentyp ungültig', 'Error: Invalid language' => 'Fehler: Sprache ungültig', - 'Error: Invalid packing type' => 'Fehler: Packtyp ungültig', 'Error: Invalid part type' => 'Fehler: Artikeltyp ungültig', 'Error: Invalid parts group' => 'Fehler: Warengruppe ungültig', 'Error: Invalid payment terms' => 'Fehler: Zahlungsbedingungen ungültig', @@ -1106,7 +1104,6 @@ $self->{texts} = { 'Method' => 'Verfahren', 'Microfiche' => 'Mikrofilm', 'Minimum Amount' => 'Mindestbetrag', - 'Minimum Sell Price' => '', 'Miscellaneous' => 'Verschiedenes', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', @@ -1269,8 +1266,6 @@ $self->{texts} = { 'POSTED AS NEW' => 'Als neu gebucht', 'PRINTED' => 'Gedruckt', 'Packing Lists' => 'Lieferschein', - 'Packing type (database ID)' => 'Pack-Typ (Datenbank-ID)', - 'Packing type (name)' => 'Pack-Typ (Name)', 'Page #1/#2' => 'Seite #1/#2', 'Paid' => 'bezahlt', 'Part' => 'Ware', @@ -1376,7 +1371,6 @@ $self->{texts} = { 'Pricegroup missing!' => 'Preisgruppe fehlt!', 'Pricegroup saved!' => 'Preisgruppe gespeichert!', 'Pricegroups' => 'Preisgruppen', - 'Pricing agreement' => '', 'Print' => 'Drucken', 'Print and Post' => 'Drucken und Buchen', 'Print automatically' => 'Automatisch ausdrucken', @@ -1572,7 +1566,7 @@ $self->{texts} = { 'Selection' => 'Auswahlbox', 'Selection fields: The option field must contain the available options for the selection. Options are separated by \'##\', for example \'Early##Normal##Late\'.' => 'Auswahlboxen: Das Optionenfeld muss die für die Auswahl verfügbaren Einträge enthalten. Die Einträge werden mit \'##\' voneinander getrennt. Beispiel: \'Früh##Normal##Spät\'.', 'Sell Price' => 'Verkaufspreis', - 'Sellprice' => '', + 'Sellprice' => 'Verkaufspreis', 'Sellprice adjustment' => 'Verkaufspreis: Preisanpassung', 'Sellprice for price group \'#1\'' => 'Verkaufspreis für Preisgruppe \'#1\'', 'Sellprice significant places' => 'Verkaufspreis: Nachkommastellen',