Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 69e4ce03

Von Philip Reetz vor mehr als 16 Jahren hinzugefügt

  • ID 69e4ce03a92228ef20d3f5c358da28e5c2aeecce
  • Vorgänger 00e42115
  • Nachfolger 689525d2

Ausgabefunktionen fuer offene Forderungen und Verbindlichekeiten und SuSa ueberarbeitet

Unterschiede anzeigen:

SL/RP.pm
809 809
        FROM acc_trans ac
810 810
        JOIN chart c ON (ac.chart_id = c.id)
811 811
        $dpt_join
812
        WHERE (ac.transdate < (select date_trunc('year', ?::date)))
812
        WHERE ((select date_trunc('year', ac.transdate::date)) = (select date_trunc('year', ?::date))) AND ac.ob_transaction 
813 813
          $dpt_where
814 814
          $project
815 815
        GROUP BY c.accno, c.category, c.description |;
......
865 865
      $tofrom   .= " AND (ac.transdate >= $fromdate)";
866 866
      $subwhere .= " AND (transdate >= $fromdate)";
867 867
      $sumsubwhere .= " AND (transdate >= (select date_trunc('year', date $fromdate))) ";
868
      $saldosubwhere .= " AND (((c.category='I' OR c.category='E') AND transdate>=(select date_trunc('year', date $fromdate))) OR (c.category NOT IN ('I', 'E'))) ";
868
      $saldosubwhere .= " AND transdate>=(select date_trunc('year', date $fromdate))  ";
869 869
      $invwhere .= " AND (a.transdate >= $fromdate)";
870
      $glsaldowhere .= " AND (((c.category='I' OR c.category='E') AND ac.transdate>=(select date_trunc('year', date $fromdate))) OR (c.category NOT IN ('I', 'E'))) ";
870
      $glsaldowhere .= " AND ac.transdate>=(select date_trunc('year', date $fromdate)) ";
871 871
      $glwhere = " AND (ac.transdate >= $fromdate)";
872 872
      $glsumwhere = " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) ";
873 873
    }
......
965 965
              )|;
966 966

  
967 967
  } else {
968
    $where .= $tofrom;
969
    $saldowhere .= $glsaldowhere;
970
    $sumwhere .= $glsumwhere;
968
    $where .= $tofrom . " AND (NOT ac.ob_transaction OR ac.ob_transaction IS NULL) AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)";
969
    $saldowhere .= $glsaldowhere . " AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)";
970
    $sumwhere .= $glsumwhere . " AND (NOT ac.ob_transaction OR ac.ob_transaction IS NULL) AND (NOT ac.cb_transaction OR ac.cb_transaction IS NULL)";
971 971
  }
972 972

  
973 973
  $query = qq|
......
1159 1159
    $project_drcr = prepare_query($form, $dbh, $q_project_drcr);
1160 1160
  }
1161 1161

  
1162

  
1162 1163
  my ($debit, $credit, $saldo, $soll_saldo, $haben_saldo,$soll_kummuliert, $haben_kummuliert, $last_transaction);
1163 1164

  
1164 1165
  foreach my $accno (sort keys %trb) {

Auch abrufbar als: Unified diff