sub order_details {
$main::lxdebug->enter_sub();
- my ($self) = @_;
-
- my $myconfig = \%main::myconfig;
- my $form = $main::form;
+ my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->get_standard_dbh($myconfig);
my $ic_cvar_configs = CVar->get_configs(module => 'IC');
$form->{TEMPLATE_ARRAYS} = { };
- IC->prepare_parts_for_printing();
+ IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
my @arrays =
qw(runningnumber number description longdescription qty unit
IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount});
if ($self->{type} =~ /_delivery_order$/) {
- DO->order_details();
+ DO->order_details(\%::myconfig, $self);
} elsif ($self->{type} =~ /sales_order|sales_quotation|request_quotation|purchase_order/) {
OE->order_details(\%::myconfig, $self);
} else {
my $self = shift;
my %params = @_;
- my $myconfig = \%main::myconfig;
- my $form = $main::form;
+ my $myconfig = $params{myconfig} || \%main::myconfig;
+ my $form = $params{form} || $main::form;
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig);
$form->{discount} = [];
- IC->prepare_parts_for_printing();
+ IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
my $ic_cvar_configs = CVar->get_configs(module => 'IC');
$form->{discount} = [];
$form->{TEMPLATE_ARRAYS} = { };
- IC->prepare_parts_for_printing();
+ IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
my $ic_cvar_configs = CVar->get_configs(module => 'IC');
# create the form variables
if ($form->{type} =~ /_delivery_order$/) {
- DO->order_details();
+ DO->order_details(\%myconfig, \%$form);
} elsif ($order) {
OE->order_details(\%myconfig, \%$form);
} else {