From 40cfb5eee3162b7e25b20f7e0f52c3def98313bc Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Fri, 23 Dec 2016 08:52:03 +0100 Subject: [PATCH] Kreditorenbuchung - Abteilung nutzt immer L.select_tag als Dropdown --- SL/AP.pm | 10 ++-------- bin/mozilla/ap.pl | 19 +++++++++---------- templates/webpages/ap/form_header.html | 7 ++----- templates/webpages/ap/search.html | 12 +----------- 4 files changed, 14 insertions(+), 34 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index ef3109f8f..46b25ea27 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -66,8 +66,6 @@ sub _post_transaction { $form->{defaultcurrency} = $form->get_default_currency($myconfig); $form->{taxincluded} = 0 unless $form->{taxincluded}; - ($null, $form->{department_id}) = split(/--/, $form->{department}); - if ($form->{currency} eq $form->{defaultcurrency}) { $form->{exchangerate} = 1; } else { @@ -463,13 +461,9 @@ sub ap_transactions { $where .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; push(@values, (like($form->{"cp_name"}))x2); } - if ($form->{department}) { - # ähnlich wie commit 0bbfb33b6aa8e38bb6c81d1684ab7d08e5b5c5af abteilung - # wird so nicht mehr als zeichenkette zusammengebaut - # hätte zu ee9f9f9aa4c3b9d5d20ab10a45c12bcaa6aa78d0 auffallen können ;-) jan - #my ($null, $department_id) = split /--/, $form->{department}; + if ($form->{department_id}) { $where .= " AND a.department_id = ?"; - push(@values, $form->{department}); + push(@values, $form->{department_id}); } if ($form->{invnumber}) { $where .= " AND a.invnumber ILIKE ?"; diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 4ceb12819..3440f93fb 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -100,6 +100,7 @@ sub add { $form->{initial_transdate} = $form->{transdate}; create_links(dont_save => 1); $form->{transdate} = $form->{initial_transdate}; + &display_form; $main::lxdebug->leave_sub(); @@ -187,11 +188,7 @@ sub create_links { (@{ $form->{all_vendor} }); } - # departments - if (@{ $form->{all_departments} || [] }) { - $form->{department} = "$form->{department}--$form->{department_id}"; - $form->{selectdepartment} = "