From: G. Richardson Date: Fri, 23 Dec 2016 07:28:47 +0000 (+0100) Subject: Dialogbuchen - Abteilung nutzt immer L.select_tag als Dropdown X-Git-Tag: release-3.5.4~1785 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f0747a2f9c8d7a9d261c20b0d2a9d5911a6ad9b5;p=kivitendo-erp.git Dialogbuchen - Abteilung nutzt immer L.select_tag als Dropdown --- diff --git a/SL/GL.pm b/SL/GL.pm index 20d469a63..09fc2f03b 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -113,8 +113,6 @@ sub _post_transaction { do_query($form, $dbh, $query, @values); } - my ($null, $department_id) = split(/--/, $form->{department}); - $form->{ob_transaction} *= 1; $form->{cb_transaction} *= 1; @@ -126,7 +124,7 @@ sub _post_transaction { WHERE id = ?|; @values = ($form->{reference}, $form->{description}, $form->{notes}, - conv_date($form->{transdate}), conv_i($department_id), $form->{taxincluded} ? 't' : 'f', + conv_date($form->{transdate}), conv_i($form->{department_id}), $form->{taxincluded} ? 't' : 'f', $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f', conv_i($form->{id})); do_query($form, $dbh, $query, @values); @@ -233,14 +231,13 @@ sub all_transactions { push(@apvalues, like($form->{reference})); } - if ($form->{department}) { - my ($null, $department) = split /--/, $form->{department}; + if ($form->{department_id}) { $glwhere .= qq| AND g.department_id = ?|; $arwhere .= qq| AND a.department_id = ?|; $apwhere .= qq| AND a.department_id = ?|; - push(@glvalues, $department); - push(@arvalues, $department); - push(@apvalues, $department); + push(@glvalues, $form->{department_id}); + push(@arvalues, $form->{department_id}); + push(@apvalues, $form->{department_id}); } if ($form->{source}) { @@ -639,7 +636,8 @@ sub transaction { if ($form->{id}) { $query = qq|SELECT g.reference, g.description, g.notes, g.transdate, g.storno, g.storno_id, - d.description AS department, e.name AS employee, g.taxincluded, g.gldate, + g.department_id, d.description AS department, + e.name AS employee, g.taxincluded, g.gldate, g.ob_transaction, g.cb_transaction FROM gl g LEFT JOIN department d ON (d.id = g.department_id) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 7237a593c..2c203d33e 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -99,16 +99,7 @@ sub add { $form->{credit} = 0; $form->{tax} = 0; - # departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} || [] }) { - $form->{selectdepartment} = "