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

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



Revision: 2604
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2604&view=rev
Author:   einhverfr
Date:     2009-05-20 19:00:10 +0000 (Wed, 20 May 2009)

Log Message:
-----------
Adding approval info to reconciliation search

Modified Paths:
--------------
    trunk/scripts/recon.pl
    trunk/sql/modules/Reconciliation.sql

Modified: trunk/scripts/recon.pl
===================================================================
--- trunk/scripts/recon.pl	2009-05-20 04:20:14 UTC (rev 2603)
+++ trunk/scripts/recon.pl	2009-05-20 19:00:10 UTC (rev 2604)
@@ -164,13 +164,18 @@
 		href => "$search_url&order_by=updated",
             },
             entered_username => {
-		text => $request->{_locale}->text('Username'), 
+		text => $request->{_locale}->text('Entered By'), 
 		href => "$search_url&order_by=entered_username",
             },
+            approved_username => {
+		text => $request->{_locale}->text('Approved By'), 
+		href => "$search_url&order_by=approved_username",
+            },
         };
 	my $cols = [];
 	my @acts = $search->get_accounts;
-	@$cols = qw(select account end_date their_total approved submitted updated entered_username);
+	@$cols = qw(select account end_date their_total approved submitted 
+                    updated entered_username approved_username);
 	my $recon =$search;
 	for my $row(@results){
             my $act = undef;

Modified: trunk/sql/modules/Reconciliation.sql
===================================================================
--- trunk/sql/modules/Reconciliation.sql	2009-05-20 04:20:14 UTC (rev 2603)
+++ trunk/sql/modules/Reconciliation.sql	2009-05-20 19:00:10 UTC (rev 2604)
@@ -9,7 +9,9 @@
     entered_by int not null default person__get_my_entity_id() references entity(id),
     entered_username text not null default SESSION_USER,
     deleted boolean not null default 'f'::boolean,
-    deleted_by int not null default person__get_my_entity_id() references entity(id),
+    deleted_by int references entity(id),
+    approved_by int references entity(id),
+    approved_username text,
     CHECK (deleted is not true or approved is not true)
 );
 
@@ -149,7 +151,9 @@
         
         -- 
 	ac_entries := '{}';
-        update cr_report set approved = 't'
+        update cr_report set approved = 't',
+		approved_by = person__get_my_entity_id(),
+		approved_username = SESSION_USER
 	where id = in_report_id;
 
 	FOR current_row IN 


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