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

SF.net SVN: ledger-smb:[3300] trunk/scripts/employee.pl



Revision: 3300
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3300&view=rev
Author:   einhverfr
Date:     2011-06-20 11:09:03 +0000 (Mon, 20 Jun 2011)

Log Message:
-----------
Employeenumber generation now works

Modified Paths:
--------------
    trunk/scripts/employee.pl

Modified: trunk/scripts/employee.pl
===================================================================
--- trunk/scripts/employee.pl	2011-06-20 09:40:17 UTC (rev 3299)
+++ trunk/scripts/employee.pl	2011-06-20 11:09:03 UTC (rev 3300)
@@ -159,6 +159,13 @@
     my ($request) = @_;
 
     my $employee = LedgerSMB::DBObject::Employee->new({base => $request});
+    if (!$employee->{employeenumber}){
+        my ($ref) = $employee->call_procedure(
+                             procname => 'setting_increment', 
+                             args     => ['employeenumber']
+                           );
+        ($employee->{employee_number}) = values %$ref;
+    }
     $employee->save();
     _render_main_screen($employee);
 }


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