[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1614] trunk
- Subject: SF.net SVN: ledger-smb: [1614] trunk
- From: ..hidden..
- Date: Sat, 15 Sep 2007 19:47:11 -0700
Revision: 1614
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1614&view=rev
Author: einhverfr
Date: 2007-09-15 19:47:11 -0700 (Sat, 15 Sep 2007)
Log Message:
-----------
Adding constructor to LedgerSMB::Template::Elements
Modified Paths:
--------------
trunk/LedgerSMB/DBObject/Report.pm
trunk/LedgerSMB/Template/Elements.pm
trunk/sql/modules/Report.sql
Modified: trunk/LedgerSMB/DBObject/Report.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Report.pm 2007-09-16 02:36:58 UTC (rev 1613)
+++ trunk/LedgerSMB/DBObject/Report.pm 2007-09-16 02:47:11 UTC (rev 1614)
@@ -1,10 +1,75 @@
-=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
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
+
Modified: trunk/LedgerSMB/Template/Elements.pm
===================================================================
--- trunk/LedgerSMB/Template/Elements.pm 2007-09-16 02:36:58 UTC (rev 1613)
+++ trunk/LedgerSMB/Template/Elements.pm 2007-09-16 02:47:11 UTC (rev 1614)
@@ -11,6 +11,27 @@
=over
+=item LedgerSMB::Template::Elements->new()
+
+Returns a blessed hashref from this namespace.
+
+=back
+
+=cut
+
+package LedgerSMB::Template::Elements;
+use strict;
+
+
+sub new {
+ my ($class) = @_;
+ my $self = {};
+ bless $self, $class;
+ return $self;
+}
+
+=over
+
=item $object->generate_hidden_elements([...]);
Builds data structure for hidden form fields. Values from the
@@ -26,8 +47,6 @@
=cut
-package LedgerSMB::Template::Elements;
-use strict;
sub generate_hidden_elements {
my $self = shift;
Modified: trunk/sql/modules/Report.sql
===================================================================
--- trunk/sql/modules/Report.sql 2007-09-16 02:36:58 UTC (rev 1613)
+++ trunk/sql/modules/Report.sql 2007-09-16 02:47:11 UTC (rev 1614)
@@ -1,6 +1,6 @@
CREATE TYPE report_aging_item AS (
entity_id int,
- meta_number varchar(24),
+ account_number varchar(24),
name text,
address1 text,
address2 text,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.