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

SF.net SVN: ledger-smb:[6039] trunk/LedgerSMB/Scripts



Revision: 6039
          http://sourceforge.net/p/ledger-smb/code/6039
Author:   einhverfr
Date:     2013-09-16 02:25:21 +0000 (Mon, 16 Sep 2013)
Log Message:
-----------
All POD-related tests currently passing now

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/import_csv.pm
    trunk/LedgerSMB/Scripts/taxform.pm

Modified: trunk/LedgerSMB/Scripts/import_csv.pm
===================================================================
--- trunk/LedgerSMB/Scripts/import_csv.pm	2013-09-16 01:54:16 UTC (rev 6038)
+++ trunk/LedgerSMB/Scripts/import_csv.pm	2013-09-16 02:25:21 UTC (rev 6039)
@@ -307,6 +307,12 @@
              },
 };
 
+=head2 parse_file
+
+This parses a file, and returns a the csv in tabular format.
+
+=cut
+
 sub parse_file {
     my $self = shift @_;
 
@@ -338,6 +344,12 @@
     return @{$self->{import_entries}};
 }
 
+=head2 begin_import
+
+This displays the begin data entry screen.
+
+=cut
+
 sub begin_import {
     my ($request) = @_;
     my $template = LedgerSMB::Template->new(
@@ -350,6 +362,13 @@
     $template->render($request);
 }
 
+=head2 run_import
+
+run_import is the routine responsible for the primary work.  It accepts the 
+data in $request and processes it according to the dispatch tables.
+
+=cut
+
 sub run_import {
     my ($request) = @_;
     my @entries = parse_file($request);
@@ -363,6 +382,14 @@
     begin_import($request);
 }
 
+=head1 COPYRIGHT
+
+Copyright(C) 2008-2013 The LedgerSMB Core Team.  This file may be re-used in 
+accordance with the GNU General Public License (GNU GPL) v2 or at your option 
+any later version.  Please see the included LICENSE.txt for more details.
+
+=cut
+
 eval { do 'scripts/custom/import_trans.pl'; };
 
 1;

Modified: trunk/LedgerSMB/Scripts/taxform.pm
===================================================================
--- trunk/LedgerSMB/Scripts/taxform.pm	2013-09-16 01:54:16 UTC (rev 6038)
+++ trunk/LedgerSMB/Scripts/taxform.pm	2013-09-16 02:25:21 UTC (rev 6039)
@@ -139,8 +139,34 @@
     $report->render($request);
 }
 
-sub print { 
+=item save
+
+Saves a tax form, returns to edit screen.
+
+=cut
+
+
+sub save
+{
     my ($request) = @_;
+    my $taxform = LedgerSMB::DBObject::TaxForm->new({base => $request}); 
+    
+    $taxform->save();
+    edit($taxform);
+}
+
+=item print
+
+Prints the tax forms, using the 1099 templates.
+
+=cut
+
+sub print {
+    my ($request) = @_;
+    my $taxform = LedgerSMB::DBObject::TaxForm->new({base => $request});
+    my $form_info = $taxform->get($request->{tax_form_id});
+    $request->{taxform_name} = $form_info->{form_name};
+    $request->{format} = 'PDF';
     my $report = LedgerSMB::Report::Taxform::Summary->new(%$request);
     $report->run_report($request);
     if ($request->{meta_number}){
@@ -171,38 +197,6 @@
     );
 }
 
-sub save
-{
-    my ($request) = @_;
-    my $taxform = LedgerSMB::DBObject::TaxForm->new({base => $request}); 
-    
-    $taxform->save();
-    $taxform->get_metadata();
-    my $template = LedgerSMB::Template->new(
-        user =>$request->{_user}, 
-        locale => $request->{_locale},
-        path => 'UI',
-        template => 'taxform/add_taxform',
-        format => 'HTML'
-    );
-    $template->render($taxform);
-}
-
-=item print
-
-Prints the tax forms, using the 1099 templates.
-
-=cut
-
-sub print {
-    my ($request) = @_;
-    my $taxform = LedgerSMB::DBObject::TaxForm->new({base => $request});
-    my $form_info = $taxform->get($request->{tax_form_id});
-    $request->{taxform_name} = $form_info->{form_name};
-    $request->{format} = 'PDF';
-    generate_report($request);    
-}
-
 =item list_all
 
 Lists all tax forms.

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/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits