From df073d6e09c0f87fb2e88cc215ace843a5851d4a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 12 Apr 2007 20:46:20 +0000 Subject: Formatting with Perltidy git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1068 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/ir.pl | 1448 ++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 816 insertions(+), 632 deletions(-) (limited to 'bin/ir.pl') diff --git a/bin/ir.pl b/bin/ir.pl index 425c7935..b88d7337 100755 --- a/bin/ir.pl +++ b/bin/ir.pl @@ -8,9 +8,9 @@ # with permission. # # This file contains source code included with or based on SQL-Ledger which -# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed -# under the GNU General Public License version 2 or, at your option, any later -# version. For a full list including contact information of contributors, +# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed +# under the GNU General Public License version 2 or, at your option, any later +# version. For a full list including contact information of contributors, # maintainers, and copyright holders, see the CONTRIBUTORS file. # # Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork): @@ -38,7 +38,6 @@ # #====================================================================== - use LedgerSMB::IR; use LedgerSMB::PE; use LedgerSMB::Tax; @@ -47,277 +46,331 @@ require "bin/io.pl"; require "bin/arap.pl"; 1; -# end of main - +# end of main sub add { - $form->{title} = $locale->text('Add Vendor Invoice'); + $form->{title} = $locale->text('Add Vendor Invoice'); - $form->{callback} = "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&sessionid=$form->{sessionid}" unless $form->{callback}; - &invoice_links; - &prepare_invoice; - &display_form; - -} + $form->{callback} = +"$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&sessionid=$form->{sessionid}" + unless $form->{callback}; + &invoice_links; + &prepare_invoice; + &display_form; +} sub edit { - $form->{title} = $locale->text('Edit Vendor Invoice'); + $form->{title} = $locale->text('Edit Vendor Invoice'); - &invoice_links; - &prepare_invoice; - &display_form; - -} + &invoice_links; + &prepare_invoice; + &display_form; +} sub invoice_links { - - $form->{vc} = "vendor"; - $form->{type} = "invoice"; - - # create links - $form->create_links("AP", \%myconfig, "vendor", 1); - - # currencies - @curr = split /:/, $form->{currencies}; - $form->{defaultcurrency} = $curr[0]; - chomp $form->{defaultcurrency}; - - for (@curr) { $form->{selectcurrency} .= "