summaryrefslogtreecommitdiff
path: root/scripts/recon.pl
diff options
context:
space:
mode:
authoraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-19 23:00:35 +0000
committeraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-19 23:00:35 +0000
commit3d8c7a3a98a3dfa05864b79e6cc2396871f20199 (patch)
tree8160b2834d1c5e8ac813a4c8bc2b26c8148f7741 /scripts/recon.pl
parent8febc823cc4048735469e58c574bcb4d92c3cfc7 (diff)
Copious Admin and Reconciliation changes.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2283 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts/recon.pl')
-rw-r--r--scripts/recon.pl26
1 files changed, 21 insertions, 5 deletions
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();
}