summaryrefslogtreecommitdiff
path: root/bin/hr.pl
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-24 03:15:55 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-24 03:15:55 +0000
commita8c675b5c7481a9f8a26462961e863bffde2cdeb (patch)
tree5436b45a1069bfe7db59f4e2dfc07656215720a1 /bin/hr.pl
parent6e70663c6f44a527786859b6390a092dda33fed8 (diff)
Closing bug 1895526-- exchange rate double parse on check payments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@2078 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/hr.pl')
-rwxr-xr-xbin/hr.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/hr.pl b/bin/hr.pl
index 78b098c0..dee1b0e2 100755
--- a/bin/hr.pl
+++ b/bin/hr.pl
@@ -528,6 +528,16 @@ sub employee_links {
for ( keys %$form ) { $form->{$_} = $form->quote( $form->{$_} ) }
+ $form->all_departments;
+ if ( @{ $form->{all_department} } ) {
+ $form->{selectdepartment} = "<option>\n";
+
+ for ( @{ $form->{all_department} } ) {
+ $form->{selectdepartment} .=
+qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
+ }
+ }
+ $form->{selectdepartment} =~ s/("$form->{department}")/$1 selected/;
if ( @{ $form->{all_deduction} } ) {
$form->{selectdeduction} = "<option>\n";
for ( @{ $form->{all_deduction} } ) {
@@ -731,6 +741,11 @@ 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>
@@ -1411,6 +1426,17 @@ sub update_employee {
@flds = qw(before after);
$count = 0;
@a = ();
+ $form->all_departments;
+ if ( @{ $form->{all_department} } ) {
+ $form->{selectdepartment} = "<option>\n";
+
+ for ( @{ $form->{all_department} } ) {
+ $form->{selectdepartment} .=
+qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
+ }
+ }
+ $form->{selectdepartment} =~ s/ selected//;
+ $form->{selectdepartment} =~ s/("$form->{department}")/$1 selected/;
for $i ( 1 .. $form->{deduction_rows} ) {
for (@flds) {
$form->{"${_}_$i"} =