X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=SL%2FCA.pm;h=577d6b98a90e6c899ecb8d24447e1a55b1b21abd;hb=b632cee8434442efd8ae3962126c34123172daac;hp=c200b664eafa3223d88e46077fc4dec498080bcd;hpb=470a8fa1710b22e2b381eef4cacb01bebaeff725;p=kivitendo-erp.git diff --git a/SL/CA.pm b/SL/CA.pm index c200b664e..577d6b98a 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -84,7 +84,7 @@ sub all_accounts { $amount{ $ref->{accno} } = $ref->{amount}; } - my $where = "AND c.id = $chart_id" if ($chart_id ne ''); + my $where = $chart_id ne '' ? "AND c.id = $chart_id" : ''; $query = qq{ SELECT @@ -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}) {