sub delete_transaction {
   my ($self, $myconfig, $form) = @_;
-  $lxdebug->enter_sub();
+  $main::lxdebug->enter_sub();
 
   # connect to database
   my $dbh = $form->dbconnect_noauto($myconfig);
   # commit and redirect
   my $rc = $dbh->commit;
   $dbh->disconnect;
-  $lxdebug->leave_sub();
+  $main::lxdebug->leave_sub();
 
   $rc;
 
 
 sub post_transaction {
   my ($self, $myconfig, $form) = @_;
-  $lxdebug->enter_sub();
+  $main::lxdebug->enter_sub();
 
   my ($debit, $credit) = (0, 0);
   my $project_id;
   # commit and redirect
   my $rc = $dbh->commit;
   $dbh->disconnect;
-  $lxdebug->leave_sub();
+  $main::lxdebug->leave_sub();
 
   $rc;
 
 
 sub all_transactions {
   my ($self, $myconfig, $form) = @_;
-  $lxdebug->enter_sub();
+  $main::lxdebug->enter_sub();
 
   # connect to database
   my $dbh = $form->dbconnect($myconfig);
     ($form->{gifi_account_description}) = $sth->fetchrow_array;
     $sth->finish;
   }
-  $lxdebug->leave_sub();
+  $main::lxdebug->leave_sub();
 
   $dbh->disconnect;
 
 
 sub transaction {
   my ($self, $myconfig, $form) = @_;
-  $lxdebug->enter_sub();
+  $main::lxdebug->enter_sub();
 
   my ($query, $sth, $ref);
 
     $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}
   $sth->finish;
 
   $sth->finish;
-  $lxdebug->leave_sub();
+  $main::lxdebug->leave_sub();
 
   $dbh->disconnect;