Revision 32b92345
Von Kivitendo Admin vor etwa 9 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
537 | 537 |
|
538 | 538 |
# force new project, if not set yet |
539 | 539 |
if ($::instance_conf->get_order_always_project && !$form->{"globalproject_id"} && ($form->{type} eq 'sales_order')) { |
540 |
require SL::DB::Customer; |
|
541 |
my $customer = SL::DB::Manager::Customer->find_by( id => $form->{customer_id} ); |
|
542 |
die "Can't find customer" unless $customer; |
|
540 | 543 |
my $new_project = SL::DB::Project->new( |
541 | 544 |
projectnumber => $form->{ordnumber}, |
542 |
description => $form->{customer}, |
|
545 |
description => $customer->name, |
|
546 |
customer_id => $customer->id, |
|
543 | 547 |
active => 1, |
544 | 548 |
project_type_id => $::instance_conf->get_project_type_id, |
545 | 549 |
project_status_id => $::instance_conf->get_project_status_id, |
Auch abrufbar als: Unified diff
Projektzwang bei Verkaufsaufträgen - auch Kunden verlinken