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

SF.net SVN: ledger-smb:[6018] trunk/LedgerSMB/Scripts/taxform.pm



Revision: 6018
          http://sourceforge.net/p/ledger-smb/code/6018
Author:   einhverfr
Date:     2013-09-14 07:41:37 +0000 (Sat, 14 Sep 2013)
Log Message:
-----------
Tax form list on to new framework

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

Modified: trunk/LedgerSMB/Scripts/taxform.pm
===================================================================
--- trunk/LedgerSMB/Scripts/taxform.pm	2013-09-13 15:38:10 UTC (rev 6017)
+++ trunk/LedgerSMB/Scripts/taxform.pm	2013-09-14 07:41:37 UTC (rev 6018)
@@ -29,6 +29,7 @@
 use LedgerSMB::Form;
 use LedgerSMB::Report::Taxform::Summary;
 use LedgerSMB::Report::Taxform::Detail;
+use LedgerSMB::Report::Taxform::List;
 
 =pod
 
@@ -209,44 +210,8 @@
 =cut
 
 sub list_all {
-    my ($request) = @_;
-
-    my $locale = $request->{_locale};
-    $request->{title} = $locale->text('Tax Form List');
-
-    my $taxform = LedgerSMB::DBObject::TaxForm->new({base => $request});
-    my @rows = $taxform->get_full_list;
-    my $template = LedgerSMB::Template->new(
-        user => $request->{_user},
-        template => 'form-dynatable',
-        locale => $request->{_locale},
-        path => 'UI',
-        format => 'HTML'
-    );
-    
-    my @columns = qw(form_name country_name default_reportable);
-    my $heading = {form_name => $locale->text('Tax Form Name'),
-                country_name => $locale->text('Country'),
-          default_reportable => $locale->text('Default Reportable')};
-    for my $r (@rows){
-        $r->{form_name} = { text => $r->{form_name},
-                            href => "taxform.pl?action=add_taxform&id=$r->{id}".
-                                    "&country_id=$r->{country_id}".
-                                    "&form_name=$r->{form_name}".
-                                 "&default_reportable=$r->{default_reportable}",
-                          };
-        if ($r->{default_reportable}){
-            $r->{default_reportable} = $locale->text('Yes');
-        } else {
-            $r->{default_reportable} = $locale->text('No');
-        }
-    }
-    $template->render({
-        form => $request,
-     columns => ..hidden..,
-     heading => $heading,
-        rows => ..hidden..,
-    });
+    my $report = LedgerSMB::Report::Taxform::List->new();
+    $report->render;
 }
 
 =back

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