X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/7679dfa4ba64c4cc24a027fa5bdfd5e616ca92a8..777bf75cfcfc81a87479a508ea900de4a64c483e:/SL/RP.pm diff --git a/SL/RP.pm b/SL/RP.pm index 21b199e02..19af9d8a7 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -800,7 +800,7 @@ sub trial_balance { # but we use the same function to collect information if ($form->{project_id}) { - $project = qq| AND ac.project_id = | . conv_i($form->{project_id}, 'NULL') . qq|) |; + $project = qq| AND (ac.project_id = | . conv_i($form->{project_id}, 'NULL') . qq|) |; } # get beginning balances @@ -980,6 +980,7 @@ sub trial_balance { $project AND ac.amount > 0 AND c.accno = ?) AS credit |; + $drcr = prepare_query($form, $dbh, $q_drcr); if ($form->{project_id}) { @@ -1641,7 +1642,7 @@ sub bwa { $form->{ "$key" . "neutraleraufwand" } + $form->{ "$key" . "neutralertrag" }; $form->{ "$key" . "ergebnis" } = - $form->{ "$key" . "ergebnisvorsteuern" } + $form->{35}{$key}; + $form->{ "$key" . "ergebnisvorsteuern" } - $form->{35}{$key}; if ($form->{ "$key" . "gesamtleistung" } > 0) { foreach $category (@categories) {