From f31f0fd95aa2eb2e61f09900a2a011984da5a274 Mon Sep 17 00:00:00 2001 From: aurynn_cmd Date: Tue, 1 Jul 2008 23:34:41 +0000 Subject: Adding Pending Transactions support to reconciliation. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2182 4979c152-3d1c-0410-bac9-87ea11338e46 --- scripts/Reconciliation.pl | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'scripts') diff --git a/scripts/Reconciliation.pl b/scripts/Reconciliation.pl index f4769c8c..9c823a09 100644 --- a/scripts/Reconciliation.pl +++ b/scripts/Reconciliation.pl @@ -358,6 +358,48 @@ sub corrections { } ); } + +=pod + +=over + +=item pending ($self, $request, $user) + +Requires {date} and {month}, to handle the month-to-month pending transactions +in the database. No mechanism is provided to grab ALL pending transactions +from the acc_trans table. + +=back + +=cut + + +sub pending { + + my ($class, $request) = @_; + + my $recon = LedgerSMB::DBObject::Reconciliation->new(base=>request, copy=>'all'); + my $template; + + $template= LedgerSMB::Template->new( + user => $user, + template=>'reconciliation/pending.html', + language=>$user->{language}, + format=>'html' + ); + if ($request->type() eq "POST") { + return $template->render( + { + pending=>$recon->get_pending($request->{year}."-".$request->{month}); + } + ); + } + else { + + return $template->render(); + } +} + # eval { do "scripts/custom/Reconciliation.pl" }; 1; -- cgit v1.2.3