574 |
574 |
|
575 |
575 |
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
|
576 |
576 |
|
|
577 |
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
|
578 |
(undef,
|
|
579 |
$form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $cvar_configs,
|
|
580 |
'include_prefix' => 'l_',
|
|
581 |
'include_value' => 'Y');
|
|
582 |
|
577 |
583 |
setup_wh_journal_action_bar();
|
578 |
584 |
|
579 |
585 |
$form->header();
|
... | ... | |
641 |
647 |
|
642 |
648 |
my $report = SL::ReportGenerator->new(\%myconfig, $form);
|
643 |
649 |
|
|
650 |
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
|
651 |
my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
|
|
652 |
push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
|
|
653 |
|
644 |
654 |
my @hidden_variables = map { "l_${_}" } @columns;
|
645 |
655 |
push @hidden_variables, qw(warehouse_id bin_id partnumber description chargenumber bestbefore qty_op qty qty_unit unit partunit fromdate todate transtype_ids comment projectnumber);
|
646 |
656 |
push @hidden_variables, qw(classification_id);
|
... | ... | |
669 |
679 |
'oe_id' => { 'text' => $locale->text('Document'), },
|
670 |
680 |
);
|
671 |
681 |
|
|
682 |
my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @includeable_custom_variables;
|
|
683 |
%column_defs = (%column_defs, %column_defs_cvars);
|
|
684 |
|
672 |
685 |
if ($form->{transtype_ids} && 'ARRAY' eq ref $form->{transtype_ids}) {
|
673 |
686 |
for (my $i = 0; $i < scalar(@{ $form->{transtype_ids} }); $i++) {
|
674 |
687 |
delete $form->{transtype_ids}[$i] if $form->{transtype_ids}[$i] eq '';
|
... | ... | |
679 |
692 |
my $href = build_std_url('action=generate_journal', grep { $form->{$_} } @hidden_variables);
|
680 |
693 |
$href .= "&maxrows=".$form->{maxrows};
|
681 |
694 |
|
682 |
|
map { $column_defs{$_}->{link} = $href ."&page=".$page. "&sort=${_}&order=" . Q($_ eq $form->{sort} ? 1 - $form->{order} : $form->{order}) } @columns;
|
|
695 |
map { $column_defs{$_}->{link} = $href ."&page=".$page. "&sort=${_}&order=" . Q($_ eq $form->{sort} ? 1 - $form->{order} : $form->{order}) } grep {!/^cvar/} @columns;
|
683 |
696 |
|
684 |
697 |
my %column_alignment = map { $_ => 'right' } qw(qty);
|
685 |
698 |
|
... | ... | |
704 |
717 |
|
705 |
718 |
my $all_units = AM->retrieve_units(\%myconfig, $form);
|
706 |
719 |
|
|
720 |
CVar->add_custom_variables_to_report('module' => 'IC',
|
|
721 |
'trans_id_field' => 'parts_id',
|
|
722 |
'configs' => $cvar_configs,
|
|
723 |
'column_defs' => \%column_defs,
|
|
724 |
'data' => \@contents);
|
|
725 |
|
|
726 |
|
707 |
727 |
my %doc_types = ( 'sales_quotation' => { script => 'oe', title => $locale->text('Sales quotation') },
|
708 |
728 |
'sales_order' => { script => 'oe', title => $locale->text('Sales Order') },
|
709 |
729 |
'request_quotation' => { script => 'oe', title => $locale->text('Request quotation') },
|
Waren-CVars für Lagerbuchungsbericht
Übernahme aus Kundenprojekt