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

SF.net SVN: ledger-smb: [1893] branches/1.2



Revision: 1893
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1893&view=rev
Author:   einhverfr
Date:     2007-11-22 17:41:00 -0800 (Thu, 22 Nov 2007)

Log Message:
-----------
Fixing accidental commit of user-specific customizations

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm
    branches/1.2/LedgerSMB/HR.pm
    branches/1.2/LedgerSMB/User.pm
    branches/1.2/bin/hr.pl
    branches/1.2/bin/ir.pl
    branches/1.2/bin/is.pl
    branches/1.2/bin/oe.pl

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/LedgerSMB/Form.pm	2007-11-23 01:41:00 UTC (rev 1893)
@@ -2153,9 +2153,6 @@
 
     while ( my $ref = $sth->fetchrow_hashref('NAME_lc') ) {
         push @{ $self->{all_department} }, $ref;
-        if ($self->{department_id} == $ref->{id}){
-            $self->{department} = "$ref->{description}--$ref->{id}";
-        }
     }
 
     $sth->finish;
@@ -2220,7 +2217,6 @@
 
     my ( $self, $module, $myconfig, $vc, $job ) = @_;
 
-    $self->{department_id} = $myconfig->{department_id};
     # get last customers or vendors
     my ( $query, $sth );
 
@@ -2395,8 +2391,6 @@
     my ( $self, $myconfig, $dbh2, $vc, $module ) = @_;
 
     my $dbh = $self->{dbh};
-    $self->{department_id} = $myconfig->{department_id};
-
     $vc ||= $self->{vc};    # add default to correct for improper passing
     my $arap = ( $vc eq 'customer' ) ? "ar" : "ap";
     my $where = "1 = 1";

Modified: branches/1.2/LedgerSMB/HR.pm
===================================================================
--- branches/1.2/LedgerSMB/HR.pm	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/LedgerSMB/HR.pm	2007-11-23 01:41:00 UTC (rev 1893)
@@ -126,10 +126,6 @@
     my ( $null, $managerid ) = split /--/, $form->{manager};
     $managerid     *= 1;
     $form->{sales} *= 1;
-    my ($department, $department_id) = (undef, undef);
-    if ($form->{department}){
-	($department, $department_id) = split /--/, $form->{department};
-    }
 
 
     $query = qq|
@@ -154,7 +150,6 @@
 		       dob = ?,
 		       iban = ?,
 		       bic = ?,
-		       department_id = ?,
 		       managerid = ?
 		 WHERE id = ?|;
     $sth = $dbh->prepare($query);
@@ -168,8 +163,7 @@
         $form->{homephone},      $form->{startdate}, $form->{enddate},
         $form->{notes},          $form->{role},      $form->{sales},
         $form->{email},          $form->{ssn},       $form->{dob},
-        $form->{iban},           $form->{bic},       $department_id,
-	$managerid,
+        $form->{iban},           $form->{bic},       $managerid,
         $form->{id}
     ) || $form->dberror( __FILE__ . ':' . __LINE__ . ':' . $query );
 

Modified: branches/1.2/LedgerSMB/User.pm
===================================================================
--- branches/1.2/LedgerSMB/User.pm	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/LedgerSMB/User.pm	2007-11-23 01:41:00 UTC (rev 1893)
@@ -137,7 +137,7 @@
 											   email, fax, menuwidth, name, numberformat, 
 											   password, print, printer, role, sid, 
 											   signature, stylesheet, tel, templates, 
-											   timeout, vclimit, u.username, department_id
+											   timeout, vclimit, u.username
 										  FROM users_conf as uc, users as u
 										 WHERE u.username =  ?
 										   AND u.id = uc.id;"

Modified: branches/1.2/bin/hr.pl
===================================================================
--- branches/1.2/bin/hr.pl	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/bin/hr.pl	2007-11-23 01:41:00 UTC (rev 1893)
@@ -528,17 +528,6 @@
 
     for ( keys %$form ) { $form->{$_} = $form->quote( $form->{$_} ) }
 
-    $form->all_departments;
-    if ( @{ $form->{all_department} } ) {
-        $form->{selectdepartment} = "<option>\n";
-        $form->{department} = "$form->{department}--$form->{department_id}"
-          if $form->{department_id};
-
-        for ( @{ $form->{all_department} } ) {
-            $form->{selectdepartment} .=
-qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
-        }
-    }
     if ( @{ $form->{all_deduction} } ) {
         $form->{selectdeduction} = "<option>\n";
         for ( @{ $form->{all_deduction} } ) {
@@ -742,11 +731,6 @@
 		<th align=right nowrap>| . $locale->text('BIC') . qq|</th>
 		<td><input name=bic size=11 maxlength=11 value="$form->{bic}"></td>
 	      </tr>
-		<tr>
-		<th align=right nowrap>| . $locale->text('Department') . qq|</th>
-		<td><select name="department">
-		$form->{selectdepartment}
-		</select>
 	    </table>
 	  </td>
 	</tr>

Modified: branches/1.2/bin/ir.pl
===================================================================
--- branches/1.2/bin/ir.pl	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/bin/ir.pl	2007-11-23 01:41:00 UTC (rev 1893)
@@ -139,16 +139,15 @@
     # departments
     if ( @{ $form->{all_department} } ) {
         $form->{selectdepartment} = "<option>\n";
+        $form->{department} = "$form->{department}--$form->{department_id}"
+          if $form->{department_id};
 
         for ( @{ $form->{all_department} } ) {
             $form->{selectdepartment} .=
 qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
         }
     }
-    $form->{department} = "$form->{department}--$myconfig{department_id}"
-        if $myconfig{department_id};
 
-
     if ( @{ $form->{all_language} } ) {
         $form->{selectlanguage} = "<option>\n";
         for ( @{ $form->{all_language} } ) {
@@ -274,7 +273,7 @@
     for (qw(vendor department)) {
         $form->{"select$_"} = $form->unescape( $form->{"select$_"} );
         $form->{"select$_"} =~ s/ selected//;
-        $form->{"select$_"} =~ s/(<option value="[^"]*\Q$form->{$_}\E")/$1 selected/;
+        $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected/;
     }
 
     if ( $form->{selectlanguage} ) {

Modified: branches/1.2/bin/is.pl
===================================================================
--- branches/1.2/bin/is.pl	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/bin/is.pl	2007-11-23 01:41:00 UTC (rev 1893)
@@ -153,8 +153,6 @@
 qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
         }
     }
-    $form->{department} = "$form->{department}--$myconfig{department_id}"
-        if $myconfig{department_id};
 
     $form->{employee} = "$form->{employee}--$form->{employee_id}";
 
@@ -308,7 +306,7 @@
     for (qw(customer department employee)) {
         $form->{"select$_"} = $form->unescape( $form->{"select$_"} );
         $form->{"select$_"} =~ s/ selected//;
-        $form->{"select$_"} =~ s/(<option value="[^"]*\Q$form->{$_}\E")/$1 selected/;
+        $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected/;
     }
 
     $form->{exchangerate} =

Modified: branches/1.2/bin/oe.pl
===================================================================
--- branches/1.2/bin/oe.pl	2007-11-23 00:57:29 UTC (rev 1892)
+++ branches/1.2/bin/oe.pl	2007-11-23 01:41:00 UTC (rev 1893)
@@ -192,6 +192,8 @@
     # departments
     if ( @{ $form->{all_department} } ) {
         $form->{selectdepartment} = "<option>\n";
+        $form->{department} = "$form->{department}--$form->{department_id}"
+          if $form->{department_id};
 
         for ( @{ $form->{all_department} } ) {
             $form->{selectdepartment} .=
@@ -370,7 +372,7 @@
     for ( "$form->{vc}", "department", "employee" ) {
         $form->{"select$_"} = $form->unescape( $form->{"select$_"} );
         $form->{"select$_"} =~ s/ selected//;
-        $form->{"select$_"} =~ s/(<option value="[^"]*\Q$form->{$_}\E")/$1 selected/;
+        $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected/;
     }
 
     $form->{exchangerate} =
@@ -1510,8 +1512,6 @@
     # split vendor / customer
     ( $form->{ $form->{vc} }, $form->{"$form->{vc}_id"} ) =
       split( /--/, $form->{ $form->{vc} } );
-    $form->{department} = "$form->{department}--$myconfig{department_id}"
-        if $myconfig{department_id};
 
     OE->transactions( \%myconfig, \%$form );
 


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