842 |
842 |
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
|
843 |
843 |
$form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
|
844 |
844 |
|
|
845 |
$form->{CT_CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT');
|
|
846 |
($form->{CT_CUSTOM_VARIABLES_FILTER_CODE},
|
|
847 |
$form->{CT_CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $form->{CT_CUSTOM_VARIABLES},
|
|
848 |
'include_prefix' => 'l_',
|
|
849 |
'include_value' => 'Y');
|
|
850 |
|
845 |
851 |
# constants and subs for template
|
846 |
852 |
$form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" };
|
847 |
853 |
|
... | ... | |
898 |
904 |
datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
|
899 |
905 |
marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts customertype);
|
900 |
906 |
|
|
907 |
my $ct_cvar_configs = CVar->get_configs('module' => 'CT');
|
|
908 |
my @ct_includeable_custom_variables = grep { $_->{includeable} } @{ $ct_cvar_configs };
|
|
909 |
my @ct_searchable_custom_variables = grep { $_->{searchable} } @{ $ct_cvar_configs };
|
|
910 |
|
|
911 |
my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @ct_includeable_custom_variables;
|
|
912 |
push @columns, map { "cvar_$_->{name}" } @ct_includeable_custom_variables;
|
|
913 |
|
901 |
914 |
my @hidden_variables = map { "l_${_}" } @columns;
|
902 |
915 |
push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto employee_id salesman_id business_id);
|
|
916 |
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
|
903 |
917 |
|
904 |
918 |
$href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
|
905 |
919 |
|
... | ... | |
934 |
948 |
'payment_terms' => { 'text' => $locale->text('Payment Terms'), },
|
935 |
949 |
'charts' => { 'text' => $locale->text('Buchungskonto'), },
|
936 |
950 |
'customertype' => { 'text' => $locale->text('Customer type'), },
|
|
951 |
%column_defs_cvars,
|
937 |
952 |
);
|
938 |
953 |
|
939 |
954 |
foreach my $name (qw(id transdate duedate invnumber ordnumber cusordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
|
... | ... | |
953 |
968 |
|
954 |
969 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
|
955 |
970 |
|
|
971 |
CVar->add_custom_variables_to_report('module' => 'CT',
|
|
972 |
'trans_id_field' => 'customer_id',
|
|
973 |
'configs' => $ct_cvar_configs,
|
|
974 |
'column_defs' => \%column_defs,
|
|
975 |
'data' => $form->{AR});
|
|
976 |
|
956 |
977 |
my @options;
|
957 |
978 |
if ($form->{customer}) {
|
958 |
979 |
push @options, $locale->text('Customer') . " : $form->{customer}";
|
Filtern/Anzeigen von Kunden-/Lieferanten-CVars in VK-Rechnungs-Berichten
Conflicts: