From: Sven Schöling Date: Tue, 10 Jan 2012 15:25:08 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~69^2~1 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/7e724d7659b622237a945ebd52646dc558405fd0?hp=9ae7f1f9554c44bb7146be17c31acf224c249c7e Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/DO.pm b/SL/DO.pm index 8e4136172..8d61b0f1f 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -76,10 +76,9 @@ sub transactions { push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|; - my $department_id = (split /--/, $form->{department})[1]; - if ($department_id) { + if ($form->{department_id}) { push @where, qq|dord.department_id = ?|; - push @values, conv_i($department_id); + push @values, conv_i($form->{department_id}); } if ($form->{project_id}) { @@ -327,7 +326,6 @@ sub save { $h_item->finish(); $h_item_stock->finish(); - ($null, $form->{department_id}) = split(/--/, $form->{department}); # save DO record $query = diff --git a/SL/Form.pm b/SL/Form.pm index 529426ec2..d537d2838 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2512,7 +2512,7 @@ sub get_name { return scalar(@{ $self->{name_list} }); } -# the selection sub is used in the AR, AP, IS, IR and OE module +# the selection sub is used in the AR, AP, IS, IR, DO and OE module # sub all_vc { $main::lxdebug->enter_sub(); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 9e709356f..17b9fcc1d 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -40,7 +40,6 @@ use SL::IR; use SL::IS; use SL::ReportGenerator; use SL::WH; - require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/invoice_io.pl"; @@ -302,8 +301,17 @@ sub form_header { $form->header(); # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' - $form->{department} .= '--' . $form->{department_id}; - + # und Erweiterung für Bug 1760: + # Das war leider nur ein Teil-Fix, da das Verhalten den 'Erneuern'-Knopf + # nicht überlebt. Konsequent jetzt auf L umgestellt + # $ perldoc SL::Template::Plugin::L + # Daher entsprechend nur die Anpassung in form_header + # und in DO.pm gemacht. 4 Testfälle: + # department_id speichern | i.O. + # department_id lesen | i.O. + # department leer überlebt erneuern | i.O. + # department nicht leer überlebt erneuern | i.O. + # $main::lxdebug->message(0, 'ABTEILUNGS ID in form?' . $form->{department_id}); print $form->parse_html_template('do/form_header'); $main::lxdebug->leave_sub(); diff --git a/doc/changelog b/doc/changelog index 479c59eda..4c2d8d2b6 100644 --- a/doc/changelog +++ b/doc/changelog @@ -83,6 +83,8 @@ - Bugfix 1566: Variablen für Verkäufer und USTID in Mahnungsdruck hinzugefügt - Bugfix 1588: Einzelteile eines Erzeugnisses von Verkaufsbericht ausnehmen - Bugfix 1756: Ertrag in Bruttorechnungen korrekt berechnen + - Bugfix 1760 - 1760: Bei einem Lieferschein wird die Abteilung nicht mitgespeichert + diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index a83a2b91e..b41ea72d4 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -1,5 +1,8 @@ [%- USE T8 %] -[% USE HTML %][% USE LxERP %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] + @@ -201,20 +204,8 @@ [% 'Department' | $T8 %] - [%- IF delivered %] - - [%- FOREACH row = ALL_DEPARTMENTS %] - [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %] - [%- END %] - [%- ELSE %] - - [%- END %] - + [% L.select_tag('department_id', L.options_for_select(ALL_DEPARTMENTS, default=department_id, title="description", with_empty=1), style='width: 250px', disabled => delivered )%] + [%- END %]