774 |
774 |
"business_types" => "ALL_BUSINESS_TYPES",);
|
775 |
775 |
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
|
776 |
776 |
|
|
777 |
$form->{CT_CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT');
|
|
778 |
($form->{CT_CUSTOM_VARIABLES_FILTER_CODE},
|
|
779 |
$form->{CT_CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $form->{CT_CUSTOM_VARIABLES},
|
|
780 |
'include_prefix' => 'l_',
|
|
781 |
'include_value' => 'Y');
|
|
782 |
|
777 |
783 |
# constants and subs for template
|
778 |
784 |
$form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" };
|
779 |
785 |
|
... | ... | |
883 |
889 |
|
884 |
890 |
my $report = SL::ReportGenerator->new(\%myconfig, $form);
|
885 |
891 |
|
|
892 |
my $ct_cvar_configs = CVar->get_configs('module' => 'CT');
|
|
893 |
my @ct_includeable_custom_variables = grep { $_->{includeable} } @{ $ct_cvar_configs };
|
|
894 |
my @ct_searchable_custom_variables = grep { $_->{searchable} } @{ $ct_cvar_configs };
|
|
895 |
|
|
896 |
my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @ct_includeable_custom_variables;
|
|
897 |
push @columns, map { "cvar_$_->{name}" } @ct_includeable_custom_variables;
|
|
898 |
|
886 |
899 |
my @hidden_variables = map { "l_${_}" } @columns;
|
887 |
900 |
push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber cusordnumber
|
888 |
901 |
transaction_description transdatefrom transdateto type vc employee_id salesman_id
|
889 |
902 |
reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
|
890 |
903 |
business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto
|
891 |
904 |
order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to);
|
|
905 |
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
|
892 |
906 |
|
893 |
907 |
my @keys_for_url = grep { $form->{$_} } @hidden_variables;
|
894 |
908 |
push @keys_for_url, 'taxzone_id' if $form->{taxzone_id} ne ''; # taxzone_id could be 0
|
... | ... | |
930 |
944 |
'order_probability' => { 'text' => $locale->text('Order probability'), },
|
931 |
945 |
'expected_billing_date' => { 'text' => $locale->text('Exp. bill. date'), },
|
932 |
946 |
'expected_netamount' => { 'text' => $locale->text('Exp. netamount'), },
|
|
947 |
%column_defs_cvars,
|
933 |
948 |
);
|
934 |
949 |
|
935 |
950 |
foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone insertdate)) {
|
... | ... | |
948 |
963 |
$report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
|
949 |
964 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
|
950 |
965 |
|
|
966 |
CVar->add_custom_variables_to_report('module' => 'CT',
|
|
967 |
'trans_id_field' => "$form->{vc}_id",
|
|
968 |
'configs' => $ct_cvar_configs,
|
|
969 |
'column_defs' => \%column_defs,
|
|
970 |
'data' => $form->{OE});
|
|
971 |
|
951 |
972 |
my @options;
|
952 |
973 |
my ($department) = split m/--/, $form->{department};
|
953 |
974 |
|
Filtern/Anzeigen von Kunden-/Lieferanten-CVars in Angebots/Auftrags-Berichten
Conflicts: