[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Subtotal in balance sheet
- Subject: Subtotal in balance sheet
- From: "Jos Verdoold" <..hidden..>
- Date: Mon, 17 Mar 2008 17:05:40 +0100
Dear LedgerSMB-ers,
I stumbled upon a common problem which involves the last column (_last_period) in a two column balance sheet: the subtotal(s) will go wrong. I saw this before (and believed it was fixed before...) but could not find a fix in the last version in the SVN trunk. Maybe someone can take a look at this piece of patch code for the file LedgerSMB/RP.pm and maybe merge it with the current trunk.
--- RP.pm.orig 2008-03-17 16:46:09.000000000 +0100
+++ RP.pm 2008-03-17 16:45:20.000000000 +0100
@@ -639,8 +639,11 @@
if ($last_period) {
- $form->{"total_$account{$category}{labels}_last_period"} +=
- $form->{$category}{$key}{last} * $account{$category}{ml};
+ if ( $form->{$category}{$key}{charttype} eq 'A' ) {
+ $form->{"total_$account{$category}{labels}_last_period"} +=
+ $form->{$category}{$key}{last} * $account{$category}{ml};
+ $dash = "- ";
+ }
Regards,
Jos