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

SF.net SVN: ledger-smb:[4180] branches/1.3



Revision: 4180
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4180&view=rev
Author:   einhverfr
Date:     2011-12-09 10:56:50 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
Fixes for errors printing 1099 forms in batch mode.

Modified Paths:
--------------
    branches/1.3/UI/taxform/1099-MISC.tex
    branches/1.3/scripts/taxform.pl

Added Paths:
-----------
    branches/1.3/UI/taxform/summary_report.tex

Modified: branches/1.3/UI/taxform/1099-MISC.tex
===================================================================
--- branches/1.3/UI/taxform/1099-MISC.tex	2011-12-09 10:39:12 UTC (rev 4179)
+++ branches/1.3/UI/taxform/1099-MISC.tex	2011-12-09 10:56:50 UTC (rev 4180)
@@ -1,15 +1,14 @@
-\documentclass[usletter]{article}
-\usepackage{textpos}
-<?lsmb INCLUDE "${taxform}-base.tex" #$ ?>
+<?lsmb FILTER latex ?>
+<?lsmb INCLUDE "taxform/1099-MISC-base.tex" ?>
 \begin{document}
-<?lsmb FOR tf in results ?>
-<?lsmb INCLUDE taxform 
-pay_to_name = tf.legal_name
-pay_to_line_one = tf.line_one
-pay_to_line_two = tf.line_two
-pay_to_line_three = tf.line_three
-my_tax_code = business_number
+<?lsmb FOREACH tf IN results;
+INCLUDE taxform 
+legal_name = tf.legal_name
+street1 = tf.street1
+street2 = tf.street2
+street3 = tf.street3
 taxnumber = tf.taxnumber
-total_sum = tf.total_sum
-<?lsmb END # FOR tf  ?>
+total_sum = tf.total_sum;
+END # FOR tf  ?>
 \end{document}
+<?lsmb END # FILTER latex ?>

Added: branches/1.3/UI/taxform/summary_report.tex
===================================================================
--- branches/1.3/UI/taxform/summary_report.tex	                        (rev 0)
+++ branches/1.3/UI/taxform/summary_report.tex	2011-12-09 10:56:50 UTC (rev 4180)
@@ -0,0 +1 @@
+<?lsmb INCLUDE "taxform/${taxform_name}.tex" ?>

Modified: branches/1.3/scripts/taxform.pl
===================================================================
--- branches/1.3/scripts/taxform.pl	2011-12-09 10:39:12 UTC (rev 4179)
+++ branches/1.3/scripts/taxform.pl	2011-12-09 10:56:50 UTC (rev 4180)
@@ -189,6 +189,14 @@
         my @call_args = ($request->{'tax_form_id'}, $request->{begin_month}.' '.$request->{begin_day}.' '.$request->{begin_year}, $request->{end_month}.' '.$request->{end_day}.' '.$request->{end_year});
         my @results = $request->call_procedure(procname => 'tax_form_summary_report', args => ..hidden..);
         for my $r (@results){
+            my $company = LedgerSMB::DBObject::Vendor->new(base => $request);
+            $company->{id} = $r->{credit_id};
+            $company->get_billing_info;
+            delete $company->{id};
+            for my $k (keys %$company){
+                 $r->{$k} = $company->{$k};
+            }
+ 
             $r->{acc_sum} = $request->format_amount({amount => $r->{acc_sum}});
             $r->{invoice_sum} = 
                  $request->format_amount({amount => $r->{invoice_sum}});
@@ -200,6 +208,7 @@
             user => $request->{_user}, 
             locale => $request->{_locale},
             path => 'UI',
+            media => 'screen',
             template => 'taxform/summary_report',
             format => $request->{format},
         );

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