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

SF.net SVN: ledger-smb:[3345] trunk



Revision: 3345
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3345&view=rev
Author:   ehuelsmann
Date:     2011-06-26 16:21:43 +0000 (Sun, 26 Jun 2011)

Log Message:
-----------
 * LedgerSMB/Form.pm (create_links): pass arguments as a hash, in preparation of extension.

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/bin/aa.pl
    trunk/bin/ir.pl
    trunk/bin/is.pl

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-06-26 16:12:23 UTC (rev 3344)
+++ trunk/LedgerSMB/Form.pm	2011-06-26 16:21:43 UTC (rev 3345)
@@ -2287,7 +2287,8 @@
 
 }
 
-=item $form->create_links($module, $myconfig, $vc[, $job]);
+=item $form->create_links( { module => $module,
+    myconfig => $myconfig, vc => $vc, [, job => $job ] });
 
 Populates the hash referred to as $form->{${module}_links} details about
 accounts that have $module in their link field.  The hash is keyed upon link
@@ -2321,7 +2322,12 @@
 
 sub create_links {
 
-    my ( $self, $module, $myconfig, $vc, $job ) = @_;
+    my $self = shift;
+    my %args = @_;
+    my $module = $args{module};
+    my $myconfig = $args{myconfig};
+    my $vc = $args{vc};
+    my $job = $args{job};
 
     # get last customers or vendors
     my ( $query, $sth );

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2011-06-26 16:12:23 UTC (rev 3344)
+++ trunk/bin/aa.pl	2011-06-26 16:21:43 UTC (rev 3345)
@@ -157,7 +157,9 @@
         $form->{vc}   = 'customer';
     }
 
-    $form->create_links( $form->{ARAP}, \%myconfig, $form->{vc} );
+    $form->create_links( { module => $form->{ARAP},
+			   myconfig => \%myconfig,
+			   vc => $form->{vc} } );
 
     $duedate     = $form->{duedate};
     $taxincluded = $form->{taxincluded};
@@ -1394,7 +1396,9 @@
 
 sub search {
 
-    $form->create_links( $form->{ARAP}, \%myconfig, $form->{vc} );
+    $form->create_links( { module => $form->{ARAP},
+			   myconfig => \%myconfig,
+			   vc => $form->{vc} } );
 
     $form->{"select$form->{ARAP}"} = "<option>\n";
     for ( @{ $form->{"$form->{ARAP}_links"}{ $form->{ARAP} } } ) {

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2011-06-26 16:12:23 UTC (rev 3344)
+++ trunk/bin/ir.pl	2011-06-26 16:21:43 UTC (rev 3345)
@@ -89,7 +89,10 @@
     $form->{type} = "invoice";
 
     # create links
-    $form->create_links( "AP", \%myconfig, "vendor", 1 );
+    $form->create_links( { module => "AP",
+			   myconfig => \%myconfig,
+			   vc => "vendor",
+			   job => 1 } );
 
     # currencies
     @curr = split /:/, $form->{currencies};

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2011-06-26 16:12:23 UTC (rev 3344)
+++ trunk/bin/is.pl	2011-06-26 16:21:43 UTC (rev 3345)
@@ -94,7 +94,10 @@
     $form->{type} = "invoice";
 
     # create links
-    $form->create_links( "AR", \%myconfig, "customer", 1 );
+    $form->create_links( { module => "AR",
+			   myconfig => \%myconfig,
+			   vc => "customer",
+			   job => 1 } );
 
     # currencies
     @curr = split /:/, $form->{currencies};


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