[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5241] addons/1.3/report_framework/trunk



Revision: 5241
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5241&view=rev
Author:   einhverfr
Date:     2012-11-22 07:39:18 +0000 (Thu, 22 Nov 2012)
Log Message:
-----------
Adding omitted files

Added Paths:
-----------
    addons/1.3/report_framework/trunk/pnl.pl
    addons/1.3/report_framework/trunk/scripts/
    addons/1.3/report_framework/trunk/scripts/pnl.pl

Copied: addons/1.3/report_framework/trunk/pnl.pl (from rev 5237, trunk/pnl.pl)
===================================================================
--- addons/1.3/report_framework/trunk/pnl.pl	                        (rev 0)
+++ addons/1.3/report_framework/trunk/pnl.pl	2012-11-22 07:39:18 UTC (rev 5241)
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
+use FindBin;
+BEGIN {
+  lib->import($FindBin::Bin) unless $ENV{mod_perl}
+}
+
+require 'lsmb-request.pl';

Copied: addons/1.3/report_framework/trunk/scripts/pnl.pl (from rev 5237, trunk/LedgerSMB/Scripts/pnl.pm)
===================================================================
--- addons/1.3/report_framework/trunk/scripts/pnl.pl	                        (rev 0)
+++ addons/1.3/report_framework/trunk/scripts/pnl.pl	2012-11-22 07:39:18 UTC (rev 5241)
@@ -0,0 +1,61 @@
+=head1 NAME
+
+LedgerSMB::Scripts::pnl - PNL report workflows for LedgerSMB
+
+=head1 SYNOPSIS
+
+Called via lsmb-handler.pl:
+
+ LedgerSMB::Scripts::pnl->can($request->{action})->($request);
+
+=head1 DESCRIPTION
+
+This module provides workflow logic for producing various reports regaridng 
+profit and loss.
+
+=head1 METHODS/WORKFLOWS
+
+=over
+
+=item generate_income_statement
+
+Generates an income statement.
+
+=cut
+
+package LedgerSMB::Scripts::pnl;
+
+use LedgerSMB::Report::PNL::Income_Statement;
+use LedgerSMB::Report::PNL::Product;
+use LedgerSMB::Report::PNL::ECA;
+use LedgerSMB::Report::PNL::Invoice;
+use LedgerSMB::Report;
+use LedgerSMB::App_State;
+
+
+sub generate_income_statement {
+    my ($request) = @_;
+    my $rpt;
+    if ($request->{pnl_type} eq 'invoice'){
+        $rpt = LedgerSMB::Report::PNL::Invoice->new(%$request);
+    } elsif ($request->{pnl_type} eq 'eca'){
+        $rpt = LedgerSMB::Report::PNL::ECA->new(%$request);
+    } elsif ($request->{pnl_type} eq 'product'){
+        $rpt = LedgerSMB::Report::PNL::Product->new(%$request);
+    } else {
+        $rpt =LedgerSMB::Report::PNL::Income_Statement->new(%$request);
+    }
+    $rpt->render($request);
+}
+
+=back
+
+=head1 COPYRIGHT
+
+COPYRIGHT (C) 2012 The LedgerSMB Core Team.  This file may be re-used under the
+terms of the LedgerSMB General Public License version 2 or at your option any
+later version.  Please see enclosed LICENSE file for details.
+
+=cut
+
+1;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.