+# Reset the $::form field 'salesman_id' to the ID of the currently
+# logged in user. Useful when changing to a customer/vendor that has
+# no salesman listed in their master data.
+sub _reset_salesman_id {
+ my $current_employee = SL::DB::Manager::Employee->current;
+ $::form->{salesman_id} = $current_employee->id if $current_employee && exists $::form->{salesman_id};
+}
+