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

SF.net SVN: ledger-smb:[4270] branches/1.3



Revision: 4270
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4270&view=rev
Author:   einhverfr
Date:     2012-01-20 10:51:40 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
Added reverse_bank_recs setting for those who want to display from bank perspective

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/UI/reconciliation/report.html
    branches/1.3/scripts/recon.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-01-20 07:39:04 UTC (rev 4269)
+++ branches/1.3/Changelog	2012-01-20 10:51:40 UTC (rev 4270)
@@ -4,6 +4,9 @@
 
 Changelog for 1.3.11
 * Fixed outstanding report for payment reversal and partial payments (Chris T)
+* Fixed handling of non-existing roles in menu grants (Chris T)
+* Added reverse_bank_recs setting for those that want to
+  do recs from bank perspective (Chris T)
 
 Changelog for 1.3.10
 * Fixes for permissions for exchangerate table (Erik H)

Modified: branches/1.3/UI/reconciliation/report.html
===================================================================
--- branches/1.3/UI/reconciliation/report.html	2012-01-20 07:39:04 UTC (rev 4269)
+++ branches/1.3/UI/reconciliation/report.html	2012-01-20 10:51:40 UTC (rev 4270)
@@ -99,10 +99,18 @@
 			<td><?lsmb row.scn ?> </td>
 			<td><?lsmb row.post_date ?></td>
 			<td><?lsmb row.payee ?></td>
-			<td><?lsmb row.our_debits ?></td>
-			<td><?lsmb row.our_credits ?></td>
-			<td><?lsmb row.their_debits ?></td>
-			<td><?lsmb row.their_credits ?></td>
+			<td><?lsmb IF reverse; row.our_credits;
+                                   ELSE; row.our_debits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.our_debits;
+                                   ELSE; row.our_credits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.their_credits;
+                                   ELSE; row.their_debits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.their_debits;
+                                   ELSE; row.their_credits;
+                                   END; ?></td>
 		</tr>
 	<?lsmb i = i + 1 -?>
 	<?lsmb END ?>
@@ -150,10 +158,18 @@
 			<td><?lsmb row.scn ?> </td>
 			<td><?lsmb row.post_date ?></td>
 			<td><?lsmb row.payee ?></td>
-			<td><?lsmb row.our_debits ?></td>
-			<td><?lsmb row.our_credits ?></td>
-			<td><?lsmb row.their_debits ?></td>
-			<td><?lsmb row.their_credits ?></td>
+			<td><?lsmb IF reverse; row.our_credits;
+                                   ELSE; row.our_debits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.our_debits;
+                                   ELSE; row.our_credits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.their_credits;
+                                   ELSE; row.their_debits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.their_debits;
+                                   ELSE; row.their_credits;
+                                   END; ?></td>
 		</tr>
 	<?lsmb i = i + 1 -?>
 	<?lsmb END -?>
@@ -196,8 +212,12 @@
 			<td><?lsmb row.scn ?> </td>
 			<td><?lsmb row.post_date ?></td>
 			<td><?lsmb row.payee ?></td>
-			<td><?lsmb row.our_debits ?></td>
-			<td><?lsmb row.our_credits ?></td>
+			<td><?lsmb IF reverse; row.our_credits;
+                                   ELSE; row.our_debits;
+                                   END; ?></td>
+			<td><?lsmb IF reverse; row.our_debits;
+                                   ELSE; row.our_credits;
+                                   END; ?></td>
 		</tr>
 	<?lsmb i = i + 1 -?>
 	<?lsmb END ?>

Modified: branches/1.3/scripts/recon.pl
===================================================================
--- branches/1.3/scripts/recon.pl	2012-01-20 07:39:04 UTC (rev 4269)
+++ branches/1.3/scripts/recon.pl	2012-01-20 10:51:40 UTC (rev 4270)
@@ -21,6 +21,7 @@
 
 use LedgerSMB::Template;
 use LedgerSMB::DBObject::Reconciliation;
+use LedgerSMB::Setting;
 
 use Data::Dumper;
 use strict;
@@ -279,6 +280,10 @@
 sub _display_report {
         my $recon = shift;
         $recon->get();
+        my $setting_handle = LedgerSMB::Setting->new(base => $recon);
+        $recon->{reverse} = $setting_handle->get('reverse_bank_recs');
+        delete $recon->{reverse} unless $recon->{account_info}->{category}
+                                        eq 'A';
         $recon->close_form;
         $recon->open_form({commit => 1});
         $recon->add_entries($recon->import_file('csv_file')) if !$recon->{submitted};

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