From 023fab8dbe0db533376eab5435bac167c0d71744 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 2 Mar 2011 10:10:18 +0100 Subject: [PATCH] Standard-Buchungsgruppe in CSV-Import-Profil via ID speichern --- SL/DB/CsvImportProfile.pm | 2 +- templates/webpages/csv_import/_form_parts.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DB/CsvImportProfile.pm b/SL/DB/CsvImportProfile.pm index 58e3d6838..e0dfe1674 100644 --- a/SL/DB/CsvImportProfile.pm +++ b/SL/DB/CsvImportProfile.pm @@ -51,7 +51,7 @@ sub set_defaults { part_group_sep_char => '!', shoparticle_if_missing => '0', parts_type => 'part', - default_buchungsgruppe => ($bugru ? $bugru->description : undef), + default_buchungsgruppe => ($bugru ? $bugru->id : undef), apply_buchungsgruppe => 'all', ); } else { diff --git a/templates/webpages/csv_import/_form_parts.html b/templates/webpages/csv_import/_form_parts.html index 21dd42316..2c9545a2c 100644 --- a/templates/webpages/csv_import/_form_parts.html +++ b/templates/webpages/csv_import/_form_parts.html @@ -50,7 +50,7 @@ [%- LxERP.t8('Default buchungsgruppe') %]: - [% opts = L.options_for_select(SELF.all_buchungsgruppen, tilte => 'description', value => 'description', default => SELF.profile.get('default_buchungsgruppe')) %] + [% opts = L.options_for_select(SELF.all_buchungsgruppen, title => 'description', default => SELF.profile.get('default_buchungsgruppe')) %] [% L.select_tag('settings.default_buchungsgruppe', opts, style => 'width: 300px') %]
[% opts = [ [ 'never', LxERP.t8('Do not set default buchungsgruppe') ], [ 'all', LxERP.t8('Apply to all parts') ], [ 'missing', LxERP.t8('Apply to parts without buchungsgruppe') ] ] %] -- 2.20.1