X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FRP.pm;h=19af9d8a744eb948e166979a4219a3d1c114f288;hb=ee3ab257a5a8f5d4d20ffcf5f3b8259b822037f2;hp=21b199e0230bbfbb3a4bdd87e6d3d8267390c1e3;hpb=7679dfa4ba64c4cc24a027fa5bdfd5e616ca92a8;p=kivitendo-erp.git 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) {