Revision 31b1b2c2
Von Moritz Bunkus vor fast 13 Jahren hinzugefügt
SL/Controller/CsvImport.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use SL::DB::Buchungsgruppe; |
6 | 6 |
use SL::DB::CsvImportProfile; |
7 |
use SL::DB::Unit; |
|
7 | 8 |
use SL::Helper::Flash; |
8 | 9 |
use SL::SessionFile; |
9 | 10 |
use SL::Controller::CsvImport::Contact; |
... | ... | |
17 | 18 |
|
18 | 19 |
use Rose::Object::MakeMethods::Generic |
19 | 20 |
( |
20 |
scalar => [ qw(type profile file all_profiles all_charsets sep_char all_sep_chars quote_char all_quote_chars escape_char all_escape_chars all_buchungsgruppen |
|
21 |
scalar => [ qw(type profile file all_profiles all_charsets sep_char all_sep_chars quote_char all_quote_chars escape_char all_escape_chars all_buchungsgruppen all_units
|
|
21 | 22 |
import_status errors headers raw_data_headers info_headers data num_imported num_importable displayable_columns) ], |
22 | 23 |
); |
23 | 24 |
|
... | ... | |
144 | 145 |
|
145 | 146 |
if ($self->{type} eq 'parts') { |
146 | 147 |
$self->all_buchungsgruppen(SL::DB::Manager::Buchungsgruppe->get_all_sorted); |
148 |
$self->all_units(SL::DB::Manager::Unit->get_all_sorted); |
|
147 | 149 |
} |
148 | 150 |
|
149 | 151 |
$self->setup_help; |
SL/Controller/CsvImport/Part.pm | ||
---|---|---|
83 | 83 |
|
84 | 84 |
return { map { ( $_ => $self->controller->profile->get($_) ) } qw(apply_buchungsgruppe default_buchungsgruppe article_number_policy |
85 | 85 |
sellprice_places sellprice_adjustment sellprice_adjustment_type |
86 |
shoparticle_if_missing parts_type) }; |
|
86 |
shoparticle_if_missing parts_type default_unit) };
|
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
sub init_all_cvar_configs { |
... | ... | |
312 | 312 |
|
313 | 313 |
my $object = $entry->{object}; |
314 | 314 |
|
315 |
$object->unit($self->settings->{default_unit}) unless $object->unit; |
|
316 |
|
|
315 | 317 |
# Check whether or unit is valid. |
316 | 318 |
if (!$self->units_by->{name}->{ $object->unit }) { |
317 | 319 |
push @{ $entry->{errors} }, $::locale->text('Error: Unit missing or invalid'); |
... | ... | |
442 | 444 |
{ name => 'sellprice', description => $::locale->text('Sellprice') }, |
443 | 445 |
{ name => 'shop', description => $::locale->text('Shopartikel') }, |
444 | 446 |
{ name => 'type', description => $::locale->text('Article type (see below)') }, |
445 |
{ name => 'unit', description => $::locale->text('Unit') },
|
|
447 |
{ name => 'unit', description => $::locale->text('Unit (if missing or empty default unit will be used)') },
|
|
446 | 448 |
{ name => 've', description => $::locale->text('Verrechnungseinheit') }, |
447 | 449 |
{ name => 'weight', description => $::locale->text('Weight') }, |
448 | 450 |
); |
locale/de/all | ||
---|---|---|
557 | 557 |
'Default output medium' => 'Standardausgabekanal', |
558 | 558 |
'Default printer' => 'Standarddrucker', |
559 | 559 |
'Default template format' => 'Standardvorlagenformat', |
560 |
'Default unit' => 'Standardeinheit', |
|
560 | 561 |
'Default value' => 'Standardwert', |
561 | 562 |
'Defaults saved.' => 'Die Standardeinstellungen wurden gespeichert.', |
562 | 563 |
'Delete' => 'Löschen', |
... | ... | |
1969 | 1970 |
'Unchecked custom variables will not appear in orders and invoices.' => 'Unmarkierte Variablen werden für diesen Artikel nicht in Aufträgen und Rechnungen angezeigt.', |
1970 | 1971 |
'Unfinished follow-ups' => 'Nicht erledigte Wiedervorlagen', |
1971 | 1972 |
'Unit' => 'Einheit', |
1973 |
'Unit (if missing or empty default unit will be used)' => 'Einheit (falls nicht vorhanden oder leer wird die Standardeinheit benutzt)', |
|
1972 | 1974 |
'Unit missing.' => 'Die Einheit fehlt.', |
1973 | 1975 |
'Unit of measure' => 'Maßeinheit', |
1974 | 1976 |
'Units marked for deletion will be deleted upon saving.' => 'Einheiten, die zum Löschen markiert sind, werden beim Speichern gelöscht.', |
... | ... | |
2197 | 2199 |
'month' => 'Monatliche Abgabe', |
2198 | 2200 |
'monthly' => 'monatlich', |
2199 | 2201 |
'new Window' => 'neues Fenster', |
2200 |
'next' => 'Nächste', |
|
2201 | 2202 |
'no' => 'nein', |
2202 | 2203 |
'no bestbefore' => 'keine Mindesthaltbarkeit', |
2203 | 2204 |
'no chargenumber' => 'keine Chargennummer', |
... | ... | |
2221 | 2222 |
'pos_eur' => 'E/ÜR', |
2222 | 2223 |
'pos_ustva' => 'UStVA', |
2223 | 2224 |
'posted!' => 'gebucht', |
2224 |
'prev' => 'Vorherige', |
|
2225 | 2225 |
'print' => 'drucken', |
2226 | 2226 |
'proforma' => 'Proforma', |
2227 | 2227 |
'project_list' => 'projektliste', |
templates/webpages/csv_import/_form_parts.html | ||
---|---|---|
50 | 50 |
[% L.select_tag('settings.apply_buchungsgruppe', L.options_for_select(opts, default => SELF.profile.get('apply_buchungsgruppe')), style => 'width: 300px') %] |
51 | 51 |
</td> |
52 | 52 |
</tr> |
53 |
|
|
54 |
<tr> |
|
55 |
<th align="right" valign="top">[%- LxERP.t8('Default unit') %]:</th> |
|
56 |
<td colspan="10" valign="top"> |
|
57 |
[% opts = L.options_for_select(SELF.all_units, title => 'name', value => 'name', default => SELF.profile.get('default_unit')) %] |
|
58 |
[% L.select_tag('settings.default_unit', opts, style => 'width: 300px') %] |
|
59 |
</td> |
|
60 |
</tr> |
Auch abrufbar als: Unified diff
CSV-Import von Waren: Standardeinheit für Zeilen ohne Einheit hinzufügen