Revision dfd2c90e
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/Controller/CsvImport/CustomerVendor.pm | ||
---|---|---|
241 | 241 |
{ name => 'payment_id', description => $::locale->text('Payment terms (database ID)') }, |
242 | 242 |
{ name => 'payment', description => $::locale->text('Payment terms (name)') }, |
243 | 243 |
{ name => 'phone', description => $::locale->text('Phone') }, |
244 |
{ name => 'pricing_agreement', description => $::locale->text('Pricing agreement') }, |
|
245 | 244 |
{ name => 'street', description => $::locale->text('Street') }, |
246 | 245 |
{ name => 'taxnumber', description => $::locale->text('Tax Number / SSN') }, |
247 | 246 |
{ name => 'taxzone_id', description => $::locale->text('Steuersatz') }, |
SL/Controller/CsvImport/Part.pm | ||
---|---|---|
20 | 20 |
use Rose::Object::MakeMethods::Generic |
21 | 21 |
( |
22 | 22 |
scalar => [ qw(table makemodel_columns) ], |
23 |
'scalar --get_set_init' => [ qw(bg_by settings parts_by price_factors_by units_by packing_types_by partsgroups_by
|
|
23 |
'scalar --get_set_init' => [ qw(bg_by settings parts_by price_factors_by units_by partsgroups_by |
|
24 | 24 |
translation_columns all_pricegroups) ], |
25 | 25 |
); |
26 | 26 |
|
... | ... | |
43 | 43 |
return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_price_factors } } ) } qw(id description) }; |
44 | 44 |
} |
45 | 45 |
|
46 |
sub init_packing_types_by { |
|
47 |
my ($self) = @_; |
|
48 |
|
|
49 |
my $all_packing_types = SL::DB::Manager::PackingType->get_all; |
|
50 |
return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_packing_types } } ) } qw(id description) }; |
|
51 |
} |
|
52 |
|
|
53 | 46 |
sub init_partsgroups_by { |
54 | 47 |
my ($self) = @_; |
55 | 48 |
|
... | ... | |
118 | 111 |
$self->check_unit($entry); |
119 | 112 |
$self->check_price_factor($entry); |
120 | 113 |
$self->check_payment($entry); |
121 |
$self->check_packing_type($entry); |
|
122 | 114 |
$self->check_partsgroup($entry); |
123 | 115 |
$self->handle_pricegroups($entry); |
124 | 116 |
$self->check_existing($entry) unless @{ $entry->{errors} }; |
... | ... | |
132 | 124 |
|
133 | 125 |
$self->add_columns(qw(type)) if $self->settings->{parts_type} eq 'mixed'; |
134 | 126 |
$self->add_columns(qw(buchungsgruppen_id unit)); |
135 |
$self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw (price_factor payment packing_type partsgroup));
|
|
127 |
$self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw (price_factor payment partsgroup)); |
|
136 | 128 |
$self->add_columns(qw(shop)) if $self->settings->{shoparticle_if_missing}; |
137 | 129 |
$self->add_cvar_raw_data_columns; |
138 | 130 |
map { $self->add_raw_data_columns("pricegroup_${_}") } (1..scalar(@{ $self->all_pricegroups })); |
... | ... | |
206 | 198 |
|
207 | 199 |
if ($self->settings->{article_number_policy} eq 'update_prices') { |
208 | 200 |
if ($entry->{part}) { |
209 |
map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost min_sellprice prices);
|
|
201 |
map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost prices); |
|
210 | 202 |
push @{ $entry->{information} }, $::locale->text('Updating prices of existing entry in database'); |
211 | 203 |
$entry->{object_to_save} = $entry->{part}; |
212 | 204 |
} |
... | ... | |
289 | 281 |
return 1; |
290 | 282 |
} |
291 | 283 |
|
292 |
sub check_packing_type { |
|
293 |
my ($self, $entry) = @_; |
|
294 |
|
|
295 |
my $object = $entry->{object}; |
|
296 |
|
|
297 |
# Check whether or not packing type ID is valid. |
|
298 |
if ($object->packing_type_id && !$self->packing_types_by->{id}->{ $object->packing_type_id }) { |
|
299 |
push @{ $entry->{errors} }, $::locale->text('Error: Invalid packing type'); |
|
300 |
return 0; |
|
301 |
} |
|
302 |
|
|
303 |
# Map name to ID if given. |
|
304 |
if (!$object->packing_type_id && $entry->{raw_data}->{packing_type}) { |
|
305 |
my $type = $self->packing_types_by->{description}->{ $entry->{raw_data}->{packing_type} }; |
|
306 |
|
|
307 |
if (!$type) { |
|
308 |
push @{ $entry->{errors} }, $::locale->text('Error: Invalid packing type'); |
|
309 |
return 0; |
|
310 |
} |
|
311 |
|
|
312 |
$object->packing_type_id($type->id); |
|
313 |
} |
|
314 |
|
|
315 |
return 1; |
|
316 |
} |
|
317 |
|
|
318 | 284 |
sub check_partsgroup { |
319 | 285 |
my ($self, $entry) = @_; |
320 | 286 |
|
... | ... | |
447 | 413 |
$self->add_cvar_columns_to_displayable_columns; |
448 | 414 |
|
449 | 415 |
$self->add_displayable_columns({ name => 'bin', description => $::locale->text('Bin') }, |
450 |
{ name => 'binding_max_qty', description => $::locale->text('Binding Max Qty') }, |
|
451 | 416 |
{ name => 'buchungsgruppen_id', description => $::locale->text('Buchungsgruppe (database ID)') }, |
452 | 417 |
{ name => 'buchungsgruppe', description => $::locale->text('Buchungsgruppe (name)') }, |
453 | 418 |
{ name => 'description', description => $::locale->text('Description') }, |
... | ... | |
461 | 426 |
{ name => 'listprice', description => $::locale->text('List Price') }, |
462 | 427 |
{ name => 'make_X', description => $::locale->text('Make (with X being a number)') }, |
463 | 428 |
{ name => 'microfiche', description => $::locale->text('Microfiche') }, |
464 |
{ name => 'min_sellprice', description => $::locale->text('Minimum Sell Price') }, |
|
465 | 429 |
{ name => 'model_X', description => $::locale->text('Model (with X being a number)') }, |
466 | 430 |
{ name => 'not_discountable', description => $::locale->text('Not Discountable') }, |
467 | 431 |
{ name => 'notes', description => $::locale->text('Notes') }, |
468 | 432 |
{ name => 'obsolete', description => $::locale->text('Obsolete') }, |
469 | 433 |
{ name => 'onhand', description => $::locale->text('On Hand') }, |
470 |
{ name => 'packing_type_id', description => $::locale->text('Packing type (database ID)') }, |
|
471 |
{ name => 'packing_type', description => $::locale->text('Packing type (name)') }, |
|
472 | 434 |
{ name => 'partnumber', description => $::locale->text('Part Number') }, |
473 | 435 |
{ name => 'partsgroup_id', description => $::locale->text('Partsgroup (database ID)') }, |
474 | 436 |
{ name => 'partsgroup', description => $::locale->text('Partsgroup (name)') }, |
locale/de/all | ||
---|---|---|
277 | 277 |
'Bin From' => 'Quelllagerplatz', |
278 | 278 |
'Bin List' => 'Lagerliste', |
279 | 279 |
'Bin To' => 'Ziellagerplatz', |
280 |
'Binding Max Qty' => '', |
|
281 | 280 |
'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.', |
282 | 281 |
'Bins saved.' => 'Lagerplätze gespeichert.', |
283 | 282 |
'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 | 748 |
'Error: Gender (cp_gender) missing or invalid' => 'Fehler: Geschlecht (cp_gender) fehlt oder ungültig', |
750 | 749 |
'Error: Invalid business' => 'Fehler: Kunden-/Lieferantentyp ungültig', |
751 | 750 |
'Error: Invalid language' => 'Fehler: Sprache ungültig', |
752 |
'Error: Invalid packing type' => 'Fehler: Packtyp ungültig', |
|
753 | 751 |
'Error: Invalid part type' => 'Fehler: Artikeltyp ungültig', |
754 | 752 |
'Error: Invalid parts group' => 'Fehler: Warengruppe ungültig', |
755 | 753 |
'Error: Invalid payment terms' => 'Fehler: Zahlungsbedingungen ungültig', |
... | ... | |
1106 | 1104 |
'Method' => 'Verfahren', |
1107 | 1105 |
'Microfiche' => 'Mikrofilm', |
1108 | 1106 |
'Minimum Amount' => 'Mindestbetrag', |
1109 |
'Minimum Sell Price' => '', |
|
1110 | 1107 |
'Miscellaneous' => 'Verschiedenes', |
1111 | 1108 |
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', |
1112 | 1109 |
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', |
... | ... | |
1269 | 1266 |
'POSTED AS NEW' => 'Als neu gebucht', |
1270 | 1267 |
'PRINTED' => 'Gedruckt', |
1271 | 1268 |
'Packing Lists' => 'Lieferschein', |
1272 |
'Packing type (database ID)' => 'Pack-Typ (Datenbank-ID)', |
|
1273 |
'Packing type (name)' => 'Pack-Typ (Name)', |
|
1274 | 1269 |
'Page #1/#2' => 'Seite #1/#2', |
1275 | 1270 |
'Paid' => 'bezahlt', |
1276 | 1271 |
'Part' => 'Ware', |
... | ... | |
1376 | 1371 |
'Pricegroup missing!' => 'Preisgruppe fehlt!', |
1377 | 1372 |
'Pricegroup saved!' => 'Preisgruppe gespeichert!', |
1378 | 1373 |
'Pricegroups' => 'Preisgruppen', |
1379 |
'Pricing agreement' => '', |
|
1380 | 1374 |
'Print' => 'Drucken', |
1381 | 1375 |
'Print and Post' => 'Drucken und Buchen', |
1382 | 1376 |
'Print automatically' => 'Automatisch ausdrucken', |
... | ... | |
1572 | 1566 |
'Selection' => 'Auswahlbox', |
1573 | 1567 |
'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\'.', |
1574 | 1568 |
'Sell Price' => 'Verkaufspreis', |
1575 |
'Sellprice' => '', |
|
1569 |
'Sellprice' => 'Verkaufspreis',
|
|
1576 | 1570 |
'Sellprice adjustment' => 'Verkaufspreis: Preisanpassung', |
1577 | 1571 |
'Sellprice for price group \'#1\'' => 'Verkaufspreis für Preisgruppe \'#1\'', |
1578 | 1572 |
'Sellprice significant places' => 'Verkaufspreis: Nachkommastellen', |
Auch abrufbar als: Unified diff
Kundenspezifische Felder entfernt