Revision dd2ee66b
Von Kivitendo Admin vor mehr als 7 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
354 | 354 |
$form->get_lists("taxzones" => ($form->{id} ? "ALL_TAXZONES" : "ALL_ACTIVE_TAXZONES"), |
355 | 355 |
"payments" => "ALL_PAYMENTS", |
356 | 356 |
"currencies" => "ALL_CURRENCIES", |
357 |
"departments" => "ALL_DEPARTMENTS", |
|
358 | 357 |
$vc => { key => "ALL_" . uc($vc), |
359 | 358 |
limit => $myconfig{vclimit} + 1 }, |
360 | 359 |
"price_factors" => "ALL_PRICE_FACTORS"); |
361 | 360 |
|
361 |
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; |
|
362 |
|
|
362 | 363 |
# Projects |
363 | 364 |
my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); |
364 | 365 |
my @old_ids_cond = @old_project_ids ? (id => \@old_project_ids) : (); |
... | ... | |
396 | 397 |
] |
397 | 398 |
]); |
398 | 399 |
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; |
399 |
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" }; |
|
400 | 400 |
|
401 | 401 |
# vendor/customer |
402 | 402 |
$TMPL_VAR{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" }; |
... | ... | |
775 | 775 |
# setup vendor / customer data |
776 | 776 |
$form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP"); |
777 | 777 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, |
778 |
"departments" => "ALL_DEPARTMENTS", |
|
779 | 778 |
"$form->{vc}s" => "ALL_VC", |
780 | 779 |
"taxzones" => "ALL_TAXZONES", |
781 | 780 |
"business_types" => "ALL_BUSINESS_TYPES",); |
782 | 781 |
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); |
782 |
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; |
|
783 | 783 |
|
784 | 784 |
$form->{CT_CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT'); |
785 | 785 |
($form->{CT_CUSTOM_VARIABLES_FILTER_CODE}, |
... | ... | |
980 | 980 |
'data' => $form->{OE}); |
981 | 981 |
|
982 | 982 |
my @options; |
983 |
my ($department) = split m/--/, $form->{department}; |
|
984 | 983 |
|
985 | 984 |
push @options, $locale->text('Customer') . " : $form->{customer}" if $form->{customer}; |
986 | 985 |
push @options, $locale->text('Vendor') . " : $form->{vendor}" if $form->{vendor}; |
987 | 986 |
push @options, $locale->text('Contact Person') . " : $form->{cp_name}" if $form->{cp_name}; |
988 |
push @options, $locale->text('Department') . " : $department" if $form->{department}; |
|
989 |
if ($form->{department_id}) { |
|
990 |
unless ($form->{department}) { |
|
991 |
require SL::DB::Department; |
|
992 |
my $department = SL::DB::Manager::Department->find_by(id => $::form->{department_id}); |
|
993 |
push @options, $locale->text('Department') . " : " . $department->description if $department; |
|
994 |
} |
|
995 |
} |
|
987 |
push @options, $locale->text('Department') . " : $form->{department}" if $form->{department}; |
|
996 | 988 |
push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; |
997 | 989 |
push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}" if $form->{cusordnumber}; |
998 | 990 |
push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes}; |
... | ... | |
1031 | 1023 |
push @options, $locale->text('Steuersatz') . " : " . SL::DB::TaxZone->new(id => $form->{taxzone_id})->load->description; |
1032 | 1024 |
} |
1033 | 1025 |
|
1026 |
if ($form->{department_id}) { |
|
1027 |
push @options, $locale->text('Department') . " : " . SL::DB::Department->new(id => $form->{department_id})->load->description; |
|
1028 |
} |
|
1029 |
|
|
1034 | 1030 |
if (($form->{order_probability_value} || '') ne '') { |
1035 | 1031 |
push @options, $::locale->text('Order probability') . ' ' . ($form->{order_probability_op} eq 'le' ? '<=' : '>=') . ' ' . $form->{order_probability_value} . '%'; |
1036 | 1032 |
} |
Auch abrufbar als: Unified diff
Aufträge - Abteilung per ALL_DEPARTMENTS und L.select_tag