From c1c68d325862924ce923738ba525f550b0ac824d Mon Sep 17 00:00:00 2001 From: Philip Reetz Date: Tue, 18 Oct 2005 11:13:24 +0000 Subject: [PATCH] Aenderungen fuer die Unterstuetzung von Splitbuchungen beim Dialogbuchen --- SL/GL.pm | 20 +++---- bin/mozilla/gl.pl | 137 ++++++++++++++++++++-------------------------- 2 files changed, 70 insertions(+), 87 deletions(-) diff --git a/SL/GL.pm b/SL/GL.pm index 894a00da1..8772ec9e0 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -40,7 +40,7 @@ package GL; sub delete_transaction { my ($self, $myconfig, $form) = @_; - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); # connect to database my $dbh = $form->dbconnect_noauto($myconfig); @@ -54,7 +54,7 @@ sub delete_transaction { # commit and redirect my $rc = $dbh->commit; $dbh->disconnect; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); $rc; @@ -62,7 +62,7 @@ sub delete_transaction { sub post_transaction { my ($self, $myconfig, $form) = @_; - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); my ($debit, $credit) = (0, 0); my $project_id; @@ -213,7 +213,7 @@ sub post_transaction { # commit and redirect my $rc = $dbh->commit; $dbh->disconnect; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); $rc; @@ -221,7 +221,7 @@ sub post_transaction { sub all_transactions { my ($self, $myconfig, $form) = @_; - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); # connect to database my $dbh = $form->dbconnect($myconfig); @@ -489,7 +489,7 @@ sub all_transactions { ($form->{gifi_account_description}) = $sth->fetchrow_array; $sth->finish; } - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); $dbh->disconnect; @@ -497,7 +497,7 @@ sub all_transactions { sub transaction { my ($self, $myconfig, $form) = @_; - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); my ($query, $sth, $ref); @@ -526,9 +526,9 @@ sub transaction { $sth->finish; # retrieve individual rows - $query = "SELECT c.accno, a.amount, project_id, + $query = "SELECT c.accno, c.taxkey_id AS accnotaxkey, a.amount, project_id, (SELECT p.projectnumber FROM project p - WHERE a.project_id = p.id) AS projectnumber, a.taxkey, (SELECT c1.accno FROM chart c1, tax t WHERE t.taxkey=a.taxkey AND c1.id=t.chart_id) AS taxaccno + WHERE a.project_id = p.id) AS projectnumber, a.taxkey, (SELECT c1.accno FROM chart c1, tax t WHERE t.taxkey=a.taxkey AND c1.id=t.chart_id) AS taxaccno, (SELECT t1.rate FROM tax t1 WHERE t1.taxkey=a.taxkey) AS taxrate FROM acc_trans a, chart c WHERE a.chart_id = c.id AND a.trans_id = $form->{id} @@ -585,7 +585,7 @@ sub transaction { $sth->finish; $sth->finish; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); $dbh->disconnect; diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 4a2d9792b..3433b47f0 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -122,19 +122,11 @@ sub edit { $lxdebug->enter_sub(); GL->transaction(\%myconfig, \%$form); - map { - if ($form->{debitaccno} eq $_->{accno}) { - $form->{debitchart} .= - "" } @{ $form->{chart} }; + map { $tax .= qq|