_hashify: verallgemeinert, getestet, nach SL::Util verschoben (und das dabei erfunden)
[kivitendo-erp.git] / SL / CA.pm
index 52d2b0b..e24be69 100644 (file)
--- a/SL/CA.pm
+++ b/SL/CA.pm
@@ -113,7 +113,7 @@ sub all_accounts {
     LEFT JOIN tax tx ON (tk.tax_id = tx.id)
     WHERE 1=1
     $where
-    GROUP BY c.accno, c.id, c.description, c.charttype, c.gifi_accno,
+    GROUP BY c.accno, c.id, c.description, c.charttype,
       c.category, c.link, c.pos_bwa, c.pos_bilanz, c.pos_eur, c.valid_from,
       c.datevautomatik
     ORDER BY c.accno
@@ -203,22 +203,6 @@ sub all_transactions {
     $project = qq| AND ac.project_id = ? |;
     @project_values = (conv_i($form->{project_id}));
   }
-  my $acc_cash_where = "";
-  my $ar_cash_where = "";
-  my $ap_cash_where = "";
-
-
-  if ($form->{method} eq "cash") {
-    $where = qq| (ac.trans_id IN (SELECT id FROM ar WHERE datepaid>= ? AND datepaid<= ? UNION SELECT id FROM ap WHERE datepaid>= ? AND datepaid<= ? UNION SELECT id FROM gl WHERE transdate>= ? AND transdate<= ?)) |;
-    @where_values = ();
-    push(@where_values, conv_date($form->{fromdate}));
-    push(@where_values, conv_date($form->{todate}));
-    push(@where_values, conv_date($form->{fromdate}));
-    push(@where_values, conv_date($form->{todate}));
-    push(@where_values, conv_date($form->{fromdate}));
-    push(@where_values, conv_date($form->{todate}));
- }
-
 
   if ($form->{accno}) {