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

SF.net SVN: ledger-smb:[3234] trunk/bin/oe.pl



Revision: 3234
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3234&view=rev
Author:   ehuelsmann
Date:     2011-06-13 09:16:06 +0000 (Mon, 13 Jun 2011)

Log Message:
-----------
Remove code not triggered.

Modified Paths:
--------------
    trunk/bin/oe.pl

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2011-06-13 08:59:47 UTC (rev 3233)
+++ trunk/bin/oe.pl	2011-06-13 09:16:06 UTC (rev 3234)
@@ -116,10 +116,10 @@
     # retrieve order/quotation
     OE->retrieve( \%myconfig, \%$form );
 
-    # get customer/vendor
-    $form->all_vc( \%myconfig, $form->{vc},
-        ( $form->{vc} eq 'customer' ) ? "AR" : "AP",
-        undef, $form->{transdate}, 1 );
+    # get projects, departments, languages
+    $form->get_regular_metadata( \%myconfig, $form->{vc},
+				 ( $form->{vc} eq 'customer' ) ? "AR" : "AP",
+				 undef, $form->{transdate}, 1 );
 
     # currencies
     @curr = split /:/, $form->{currencies};
@@ -158,12 +158,6 @@
         }
     }
 
-    if ( @{ $form->{"all_$form->{vc}"} } ) {
-        unless ( $form->{"$form->{vc}_id"} ) {
-            $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
-        }
-    }
-
     for (qw(terms taxincluded)) { $temp{$_} = $form->{$_} }
     $form->{shipto} = 1 if $form->{id};
 
@@ -178,17 +172,6 @@
     $form->{"old$form->{vc}"} =
       qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
 
-    # build selection list
-    $form->{"select$form->{vc}"} = "";
-    if ( @{ $form->{"all_$form->{vc}"} } ) {
-        $form->{ $form->{vc} } =
-          qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
-        for ( @{ $form->{"all_$form->{vc}"} } ) {
-            $form->{"select$form->{vc}"} .=
-              qq|<option value="$_->{name}--$_->{id}">$_->{name}\n|;
-        }
-    }
-
     # departments
     if ( @{ $form->{all_department} } ) {
         $form->{selectdepartment} = "<option>\n";
@@ -1253,14 +1236,6 @@
         }
     }
 
-    # setup vendor / customer selection
-    $form->all_vc( \%myconfig, $form->{vc},
-        ( $form->{vc} eq 'customer' ) ? "AR" : "AP" );
-
-    for ( @{ $form->{"all_$form->{vc}"} } ) {
-        $vc .= qq|<option value="$_->{name}--$_->{id}">$_->{name}\n|;
-    }
-
     $selectemployee = "";
     if ( @{ $form->{all_employee} } ) {
         $selectemployee = "<option>\n";
@@ -1292,6 +1267,7 @@
       : qq|<input name=$form->{vc} size=35>|;
 
     # departments
+    $form->all_departments();
     if ( @{ $form->{all_department} } ) {
         $form->{selectdepartment} = "<option>\n";
 


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