summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-16 02:47:11 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-16 02:47:11 +0000
commitbc7aa50d96c4f70e3f44bf41e4976424d8928564 (patch)
treeae13e9896b408c25fd51e7d42f5ccfe0d568159b /LedgerSMB/DBObject
parentdbc295b18c12363990a8c27db49f580178df0432 (diff)
Adding constructor to LedgerSMB::Template::Elements
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1614 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r--LedgerSMB/DBObject/Report.pm69
1 files changed, 67 insertions, 2 deletions
diff --git a/LedgerSMB/DBObject/Report.pm b/LedgerSMB/DBObject/Report.pm
index f9c37ab7..a8750106 100644
--- a/LedgerSMB/DBObject/Report.pm
+++ b/LedgerSMB/DBObject/Report.pm
@@ -1,6 +1,11 @@
-=head1: LedgerSMB::Report: Stub function for custom reports.
-=head1: Copyright (c) 2007. LedgerSMB Core Team
+=head1: NAME
+
+LedgerSMB::Report: Stub function for custom reports.
+
+=head1: COPYRIGHT
+
+Copyright (c) 2007. LedgerSMB Core Team
=cut
@@ -8,3 +13,63 @@ package LedgerSMB::DBObject::Report;
use base qw(LedgerSMB::DBObject);
use strict;
our $VERSION = '1.0.0';
+
+1;
+
+=head1 METHODS
+
+=cut
+
+
+
+# Place report definitions at the bottom of the file, please. CT
+
+=head1 DEFINED REPORTS
+
+=cut
+
+sub definition_invoice_aging {
+ my ($self) = @_;
+ my @{$self->{entities}} =
+ $self->exec_method(funcname => 'payment_get_all_accounts');
+
+ my $entity_options = [];
+ for my $entity (@{$self->{entities}}){
+ my $option = {};
+ $option->{value} = $entity->{id};
+ $option->{label} = $entity->{name};
+ push @$entity_options, $option;
+ }
+
+ $self->{criteria} = [
+ {}
+ ];
+ $self->{columns} = [
+ {id => 'entity_id', label => 'Entity ID'},
+ {id => 'account_number', label => 'Account Number'},
+ {id => 'name', label => 'Name'},
+ {id => 'country', label => 'Country'},
+ {id => 'contact_name', label => 'Contact'},
+ {id => 'email', label => 'Email'},
+ {id => 'phone', label => 'Telephone'},
+ {id => 'fax', label => 'Fax'},
+ {id => 'invnumber', label => 'Invoice Number'},
+ {id => 'transdate', label => 'Date'},
+ {id => 'till', label => 'Till'},
+ {id => 'ordnumber', label => 'Order Number'},
+ {id => 'ponumber', label => 'PO Number'},
+ {id => 'c0', label => 'Current'},
+ {id => 'c30', label => '30'},
+ {id => 'c60', label => '60'},
+ {id => 'c90', label => '90'},
+ {id => 'duedate' label => 'Due'},
+ {id => 'curr', label => 'Currency'},
+ {id => 'exchangerate', label => 'Exchange Rate'},
+ ];
+
+}
+
+=head1 ADDING DEFINED REPORTS
+
+=cut
+