Revision 57ac7b3c
Von Moritz Bunkus vor mehr als 12 Jahren hinzugefügt
bin/mozilla/arap.pl | ||
---|---|---|
|
||
$form->{"${name}_id"} = $new_id;
|
||
|
||
_reset_salesman_id();
|
||
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
|
||
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
|
||
|
||
... | ... | |
$form->{$name} = $form->{name_list}[0]->{name};
|
||
$form->{"old$name"} = qq|$form->{$name}--$form->{"${name}_id"}|;
|
||
|
||
_reset_salesman_id();
|
||
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
|
||
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
|
||
|
||
... | ... | |
# index for new item
|
||
my $i = $form->{ndx};
|
||
|
||
_reset_salesman_id();
|
||
|
||
$form->{ $form->{vc} } = $form->{"new_name_$i"};
|
||
$form->{"$form->{vc}_id"} = $form->{"new_id_$i"};
|
||
$form->{"old$form->{vc}"} =
|
||
... | ... | |
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
# 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};
|
||
}
|
||
|
||
sub check_project {
|
||
$main::lxdebug->enter_sub();
|
||
|
Auch abrufbar als: Unified diff
"Verkäufer/in" bei Wechsel Kunde/Lieferant auf aktuellen Benutzer setzen, falls K/L keinen gesetzt hat
Fixt #1949.