[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2511] trunk



Revision: 2511
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2511&view=rev
Author:   einhverfr
Date:     2009-03-18 20:04:51 +0000 (Wed, 18 Mar 2009)

Log Message:
-----------
Correcting two bugs with reconciliation

Modified Paths:
--------------
    trunk/UI/reconciliation/report.html
    trunk/scripts/recon.pl
    trunk/sql/modules/Reconciliaton.sql

Modified: trunk/UI/reconciliation/report.html
===================================================================
--- trunk/UI/reconciliation/report.html	2009-03-18 17:52:19 UTC (rev 2510)
+++ trunk/UI/reconciliation/report.html	2009-03-18 20:04:51 UTC (rev 2511)
@@ -42,7 +42,7 @@
   <td><?lsmb outstanding_total ?></td>
 </tr>
 <tr>
-  <th><?lsmb text('Ending GL Balance:') ?></th><td><?lsmb our_total ?></td>
+  <th><?lsmb text('Ending GL Balance:') ?></th><td><?lsmb statement_gl_calc ?></td>
 </tr>
 </table>
 <br />

Modified: trunk/scripts/recon.pl
===================================================================
--- trunk/scripts/recon.pl	2009-03-18 17:52:19 UTC (rev 2510)
+++ trunk/scripts/recon.pl	2009-03-18 20:04:51 UTC (rev 2511)
@@ -404,9 +404,12 @@
             $l->{our_debits} = $recon->format_amount({amount => $l->{our_debits}, money => 1});
             $l->{our_credits} = $recon->format_amount({amount => $l->{our_credits}, money => 1});
         }
+	$recon->{statement_gl_calc} = $recon->{their_total} 
+		- $recon->{outstanding_total};
 	$recon->{out_of_balance} = $recon->{their_total} - $recon->{our_total};
         $recon->{cleared_total} = $recon->format_amount({amount => $recon->{cleared_total}, money => 1});
         $recon->{outstanding_total} = $recon->format_amount({amount => $recon->{outstanding_total}, money => 1});
+        $recon->{statement_gl_calc} = $recon->format_amount({amount => $recon->{statement_gl_calc}, money => 1});
         $recon->{total_cleared_debits} = $recon->format_amount(
               {amount => $recon->{total_cleared_debits}, money => 1}
         );

Modified: trunk/sql/modules/Reconciliaton.sql
===================================================================
--- trunk/sql/modules/Reconciliaton.sql	2009-03-18 17:52:19 UTC (rev 2510)
+++ trunk/sql/modules/Reconciliaton.sql	2009-03-18 20:04:51 UTC (rev 2511)
@@ -54,6 +54,9 @@
 	in_report_id int, in_line_ids int[]) RETURNS bool AS
 $$
 BEGIN
+	UPDATE cr_report_line SET cleared = false
+	WHERE report_id = in_report_id;
+
 	UPDATE cr_report_line SET cleared = true
 	WHERE report_id = in_report_id AND id = ANY(in_line_ids);
 	RETURN found;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.