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

SF.net SVN: ledger-smb:[4987] trunk/LedgerSMB/Scripts



Revision: 4987
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4987&view=rev
Author:   einhverfr
Date:     2012-07-14 10:47:58 +0000 (Sat, 14 Jul 2012)
Log Message:
-----------
Fixes for employees

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/employee/country.pm
    trunk/LedgerSMB/Scripts/employee.pm

Modified: trunk/LedgerSMB/Scripts/employee/country.pm
===================================================================
--- trunk/LedgerSMB/Scripts/employee/country.pm	2012-07-14 10:45:58 UTC (rev 4986)
+++ trunk/LedgerSMB/Scripts/employee/country.pm	2012-07-14 10:47:58 UTC (rev 4987)
@@ -31,8 +31,8 @@
 
        "232" => [ { div_title => 'W4', # UNITED STATES
                          file => 'country_us_w4',
-                   save_sproc => 'employee_us__save_w4' }]
-}
+                   save_sproc => 'employee_us__save_w4' }],
+);
 
 =back
 

Modified: trunk/LedgerSMB/Scripts/employee.pm
===================================================================
--- trunk/LedgerSMB/Scripts/employee.pm	2012-07-14 10:45:58 UTC (rev 4986)
+++ trunk/LedgerSMB/Scripts/employee.pm	2012-07-14 10:47:58 UTC (rev 4987)
@@ -26,6 +26,7 @@
 use LedgerSMB::DBObject::Entity::User;
 use LedgerSMB::App_State;
 use LedgerSMB::Template;
+use LedgerSMB::File;
 use LedgerSMB::Scripts::employee::country;
 
 use strict;
@@ -88,7 +89,7 @@
     if ($employee->{entity_id}){
         $user = LedgerSMB::DBObject::Entity::User->get($employee->{entity_id});
         @entity_files = LedgerSMB::File->list(
-               {ref_key => $entity_id, file_class => '4'}
+               {ref_key => $employee->{entity_id}, file_class => '4'}
         );
     }
     # DIVS logic
@@ -120,6 +121,7 @@
              push @DIVS, $cform->{file};
              $DIV_LABEL{$cform->{file}} = $cform->{div_title};
          }
+    }
 
     # DIVS contents
     my $entity_id = $employee->{entity_id};

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