diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-23 01:41:00 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-23 01:41:00 +0000 |
commit | 5475344a9df26261a23098d52fff5b21084d8627 (patch) | |
tree | dd4ec41a5b33c30f078e127e50fd4d0ce44f1957 | |
parent | 588d85c60cb2629050a550ea56111e6a81d63d6d (diff) |
Fixing accidental commit of user-specific customizations
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1893 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Form.pm | 6 | ||||
-rwxr-xr-x | LedgerSMB/HR.pm | 8 | ||||
-rwxr-xr-x | LedgerSMB/User.pm | 2 | ||||
-rwxr-xr-x | bin/hr.pl | 16 | ||||
-rwxr-xr-x | bin/ir.pl | 7 | ||||
-rwxr-xr-x | bin/is.pl | 4 | ||||
-rwxr-xr-x | bin/oe.pl | 6 |
7 files changed, 9 insertions, 40 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 9376beab..34ca7187 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -2153,9 +2153,6 @@ sub all_departments { 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 @@ sub create_links { my ( $self, $module, $myconfig, $vc, $job ) = @_; - $self->{department_id} = $myconfig->{department_id}; # get last customers or vendors my ( $query, $sth ); @@ -2395,8 +2391,6 @@ sub lastname_used { 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"; diff --git a/LedgerSMB/HR.pm b/LedgerSMB/HR.pm index 7324694e..4f1f4dab 100755 --- a/LedgerSMB/HR.pm +++ b/LedgerSMB/HR.pm @@ -126,10 +126,6 @@ sub save_employee { 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 @@ sub save_employee { dob = ?, iban = ?, bic = ?, - department_id = ?, managerid = ? WHERE id = ?|; $sth = $dbh->prepare($query); @@ -168,8 +163,7 @@ sub save_employee { $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 ); diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 00047f36..cbdb0c41 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -137,7 +137,7 @@ sub fetch_config { 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;" @@ -528,17 +528,6 @@ sub employee_links { 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 @@ sub employee_header { <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> @@ -139,15 +139,14 @@ qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|; # 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"; @@ -274,7 +273,7 @@ sub form_header { 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} ) { @@ -153,8 +153,6 @@ qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|; 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 @@ sub form_header { 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} = @@ -192,6 +192,8 @@ qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|; # 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 @@ sub form_header { 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 @@ sub transactions { # 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 ); |