[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6027] trunk
- Subject: SF.net SVN: ledger-smb:[6027] trunk
- From: ..hidden..
- Date: Sat, 14 Sep 2013 13:01:43 +0000
Revision: 6027
http://sourceforge.net/p/ledger-smb/code/6027
Author: einhverfr
Date: 2013-09-14 13:01:42 +0000 (Sat, 14 Sep 2013)
Log Message:
-----------
SIC listing moved to new framework
Modified Paths:
--------------
trunk/LedgerSMB/Scripts/reports.pm
trunk/sql/Pg-database.sql
trunk/sql/modules/Company.sql
trunk/sql/modules/menu_rebuild.sql
Added Paths:
-----------
trunk/LedgerSMB/Report/Listings/SIC.pm
Added: trunk/LedgerSMB/Report/Listings/SIC.pm
===================================================================
--- trunk/LedgerSMB/Report/Listings/SIC.pm (rev 0)
+++ trunk/LedgerSMB/Report/Listings/SIC.pm 2013-09-14 13:01:42 UTC (rev 6027)
@@ -0,0 +1,90 @@
+=head1 NAME
+
+LedgerSMB::Report::Listings::SIC - List SIC codes in LedgerSMB
+
+=head1 SYNOPSIS
+
+ LedgerSMB::Report::Listings::SIC->new->render;
+
+=cut
+
+package LedgerSMB::Report::Listings::SIC;
+use Moose;
+extends 'LedgerSMB::Report';
+
+=head1 DESCRIPTION
+
+This provides a listing of SIC (or NAICS or similar) listings used in LedgerSMB
+for categorizing customers.
+
+=head1 REPORT CRITERIA
+
+None
+
+=head1 REPORT CONSTANTS
+
+=head2 columns
+
+=over
+
+=item code
+
+=item description
+
+=back
+
+=cut
+
+sub columns {
+ return [
+ { col_id => 'code',
+ type => 'href',
+ href_base => 'am.pl?action=edit_sic&code=',
+ name => LedgerSMB::Report::text('Code'), },
+
+ { col_id => 'description',
+ type => 'text',
+ name => LedgerSMB::Report::text('Description'), }
+ ];
+}
+
+=head2 header_lines
+
+None
+
+=cut
+
+sub header_lines { return []; }
+
+=head2 name
+
+Standard Industrial Codes
+
+=cut
+
+sub name { return LedgerSMB::Report::text('Standard Industrial Codes'); }
+
+=head1 METHODS
+
+=head2 run_report
+
+=cut
+
+sub run_report{
+ my ($self) = @_;
+ my @rows = $self->exec_method(funcname => 'sic__list');
+ for my $row(@rows){
+ $row->{row_id} = $row->{code};
+ }
+ $self->rows(..hidden..);
+}
+
+=head1 COPYRIGHT
+
+Copyright(C) 2013 The LedgerSMB Core Team. This file may be reused in
+accordance with the GNU General Public License version 2 or at your option any
+later version. Please see the included LICENSE.TXT for details.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
Modified: trunk/LedgerSMB/Scripts/reports.pm
===================================================================
--- trunk/LedgerSMB/Scripts/reports.pm 2013-09-14 12:18:00 UTC (rev 6026)
+++ trunk/LedgerSMB/Scripts/reports.pm 2013-09-14 13:01:42 UTC (rev 6027)
@@ -22,6 +22,7 @@
use LedgerSMB::Report::Listings::GIFI;
use LedgerSMB::Report::Listings::Warehouse;
use LedgerSMB::Report::Listings::Language;
+use LedgerSMB::Report::Listings::SIC;
use strict;
=pod
@@ -141,6 +142,16 @@
sub list_language {
LedgerSMB::Report::Listings::Language->new()->render();
}
+
+=item list_sic
+
+Lists sic codes
+
+=cut
+
+sub list_sic {
+ LedgerSMB::Report::Listings::SIC->new->render;
+}
=item balance_sheet
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2013-09-14 12:18:00 UTC (rev 6026)
+++ trunk/sql/Pg-database.sql 2013-09-14 13:01:42 UTC (rev 6027)
@@ -3167,7 +3167,7 @@
152 action list_language 381
153 menu 1 382
154 module am.pl 383
-155 module am.pl 384
+155 module reports.pl 384
154 action add_sic 385
155 action list_sic 386
86 action search_screen 610
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2013-09-14 12:18:00 UTC (rev 6026)
+++ trunk/sql/modules/Company.sql 2013-09-14 13:01:42 UTC (rev 6027)
@@ -1695,4 +1695,10 @@
select true;
$$ language sql;
+CREATE OR REPLACE FUNCTION sic__list()
+RETURNS SETOF sic LANGUAGE SQL AS
+$$
+SELECT * FROM sic ORDER BY code;
+$$;
+
COMMIT;
Modified: trunk/sql/modules/menu_rebuild.sql
===================================================================
--- trunk/sql/modules/menu_rebuild.sql 2013-09-14 12:18:00 UTC (rev 6026)
+++ trunk/sql/modules/menu_rebuild.sql 2013-09-14 13:01:42 UTC (rev 6027)
@@ -477,7 +477,7 @@
152 action list_language 381
153 menu 1 382
154 module am.pl 383
-155 module am.pl 384
+155 module reports.pl 384
154 action add_sic 385
155 action list_sic 386
86 action search_screen 610
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits