From 3d8c7a3a98a3dfa05864b79e6cc2396871f20199 Mon Sep 17 00:00:00 2001 From: aurynn_cmd Date: Tue, 19 Aug 2008 23:00:35 +0000 Subject: Copious Admin and Reconciliation changes. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2283 4979c152-3d1c-0410-bac9-87ea11338e46 --- scripts/recon.pl | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'scripts/recon.pl') diff --git a/scripts/recon.pl b/scripts/recon.pl index a6076775..f128e1d8 100644 --- a/scripts/recon.pl +++ b/scripts/recon.pl @@ -71,33 +71,49 @@ status =cut +sub pending_search { + + &search(shift @_,"pending"); +} + +sub approved_search { + + &search(shift @_,"approved"); +} + sub search { - my ($request) = @_; + my ($request,$type) = @_; if ($request->type() eq "POST") { # WE HAS DATUMS # INTENTIONAL BAD PLURALIZATION OF LATIN my $search = LedgerSMB::DBObject::Reconciliation->new(base => $request, copy => 'all'); - my $results = $search->search(); + my $results = $search->search($type); my $total = $search->total(); - my $template = LedgerSMB::Template->new( user => $user, - template => 'reconciliation/report', language => $user->{language}, + my $template = LedgerSMB::Template->new( + user => $user, + template => 'reconciliation/report', + language => $user->{language}, format => 'HTML', path=>"UI"); return $template->render({report => $results, total => $total}); } else { + my $recon = LedgerSMB::DBObject::Reconciliation->new(base=>$request, copy=>'all'); + my $template = LedgerSMB::Template->new( user => $user, template=>'reconciliation/search', language=>$user->{language}, format=>'HTML', - path=>"UI" + path=>"UI", + mode=>$type, + accounts=>$recon->get_accounts(); ); return $template->render(); } -- cgit v1.2.3