summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LedgerSMB/DBObject/Admin.pm3
-rw-r--r--LedgerSMB/DBObject/Reconciliation.pm (renamed from LedgerSMB/Reconciliation.pm)12
-rw-r--r--UI/Reconciliation/list.html24
-rw-r--r--scripts/admin.pl32
-rw-r--r--scripts/recon.pl20
5 files changed, 73 insertions, 18 deletions
diff --git a/LedgerSMB/DBObject/Admin.pm b/LedgerSMB/DBObject/Admin.pm
index fae330a8..67218005 100644
--- a/LedgerSMB/DBObject/Admin.pm
+++ b/LedgerSMB/DBObject/Admin.pm
@@ -112,9 +112,10 @@ sub save_roles {
# These roles are were ALL checked on the page, so they're the active ones.
- if ($active_roles{$role} && $self->{$role}) {
+ if ( $active_roles{$role} && $self->{$role} ) {
# do nothing.
+ ;
}
elsif ($active_roles{$role} && !($self->{$role} )) {
diff --git a/LedgerSMB/Reconciliation.pm b/LedgerSMB/DBObject/Reconciliation.pm
index 458b757c..7a7ba313 100644
--- a/LedgerSMB/Reconciliation.pm
+++ b/LedgerSMB/DBObject/Reconciliation.pm
@@ -85,7 +85,7 @@ your software.
=cut
-package LedgerSMB::Reconciliation;
+package LedgerSMB::DBObject::Reconciliation;
use base qw(LedgerSMB::DBObject);
use LedgerSMB::DBObject;
@@ -237,5 +237,13 @@ sub get_pending {
);
}
-
+sub get_report_list {
+
+ my $self = shift @_;
+
+ return $self->exec_method(
+ funcname=>'reconciliation__report_list',
+ args=>[$self->{account},$self->{report}]
+ );
+}
1; \ No newline at end of file
diff --git a/UI/Reconciliation/list.html b/UI/Reconciliation/list.html
index 48d9bb31..720f140d 100644
--- a/UI/Reconciliation/list.html
+++ b/UI/Reconciliation/list.html
@@ -1,12 +1,20 @@
-<div>
- <table>
- <td>
- <tr>ID</tr>
- <tr>Account</tr>
- <tr></tr>
- </td>
- <?lsmb FOR result IN results?>
+<?lsmb import base.html?>
+<div class="content">
+ <table>
+ <tr>
+ <td>ID</td>
+ <td>Account</td>
+ <td>Date Range</td>
+ <td>Total</td>
+ </tr>
+ <?lsmb FOR item IN reports?>
+ <tr>
+ <td><a href="recon.pl?action=report&amp;report_id=<?lsmb item.report_id?>"><?lsmb item.report_id?></a></td>
+ <td><?lsmb item.account?></td>
+ <td><?lsmb item.range?></td>
+ <td><?lsmb item.total?></td>
+ </tr>
<?lsmb END?>
</table>
</div> \ No newline at end of file
diff --git a/scripts/admin.pl b/scripts/admin.pl
index e022cf8f..486dda5f 100644
--- a/scripts/admin.pl
+++ b/scripts/admin.pl
@@ -199,7 +199,7 @@ sub new_group {
my ($class, $request) = @_;
my $template = LedgerSMB::Template->new( user=>$user,
- template=>'Admin/new_group', language=>$user->{language},
+ template=>'Admin/new_group.html', language=>$user->{language},
format=>'HTML', path=>'UI');
$template->render();
@@ -207,7 +207,7 @@ sub new_group {
sub cancel {
- __default(@_);
+ &mainpage(@_);
}
sub __default {
@@ -215,14 +215,32 @@ sub __default {
my ($request) = @_;
my $template;
+
+
+}
+
+sub mainpage {
+
+ my ($request) = @_;
+
+ my $template;
+
+ # We need to test for a login here first.
+
+
+
my $user = LedgerSMB::DBObject::User->new(base=>$request, copy=>'all');
- $user->get_all_users();
+ my $ret = $user->get_all_users();
- $template = LedgerSMB::Template->new( user=>$user,
- template=>'Admin/main', language=>$user->{language},
- format=>'HTML', path=>'UI');
- $template->render($user);
+ $template = LedgerSMB::Template->new(
+ user=>$user,
+ template=>'Admin/main.html',
+ language=>$user->{language},
+ format=>'HTML',
+ path=>'UI'
+ );
+ $template->render({users=>$ret});
}
#eval { do "scripts/custom/admin.pl"};
diff --git a/scripts/recon.pl b/scripts/recon.pl
index 705588ed..d1337dbb 100644
--- a/scripts/recon.pl
+++ b/scripts/recon.pl
@@ -401,6 +401,26 @@ sub pending {
}
}
+sub __default {
+
+ my ($class, $request) = @_;
+
+ my $recon = LedgerSMB::DBObject::Reconciliation->new($request, copy=>'all');
+ my $template;
+
+ $template = LedgerSMB::Template->new(
+ user => $user,
+ template => 'reconciliation/list.html',
+ language => $user->{language},
+ format=>'html'
+ );
+ return $template->render(
+ {
+ reports=>$recon->get_report_list()
+ }
+ );
+}
+
# eval { do "scripts/custom/Reconciliation.pl" };
1;