$main::lxdebug->leave_sub();
}
+sub ajax_response_header {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $db_charset = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET;
+ my $cgi = $main::cgi || CGI->new('');
+ my $output = $cgi->header('-charset' => $db_charset);
+
+ $main::lxdebug->leave_sub();
+
+ return $output;
+}
+
sub _prepare_html_template {
$main::lxdebug->enter_sub();
$auth->assert('customer_vendor_edit');
CT->get_contact(\%myconfig, \%$form);
- print $cgi->header(), join '__pjx__', map $form->{"cp_$_"},
+ print $form->ajax_response_header(), join '__pjx__', map $form->{"cp_$_"},
qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday used);
$lxdebug->leave_sub();
$auth->assert('customer_vendor_edit');
CT->get_shipto(\%myconfig, \%$form);
- print $cgi->header(), join '__pjx__', map $form->{"shipto$_"},
+ print $form->ajax_response_header(), join '__pjx__', map $form->{"shipto$_"},
qw(name department_1 department_2 street zipcode city country contact phone fax email used);
$lxdebug->leave_sub();
CT->get_delivery(\%myconfig, \%$form );
- print $cgi->header(), $form->parse_html_template('ct/get_delivery');
+ print $form->ajax_response_header(), $form->parse_html_template('ct/get_delivery');
$lxdebug->leave_sub();
}
sub set_duedate_vendor {
$lxdebug->enter_sub();
- print $cgi->header(), IR->get_duedate('vendor_id' => $form->{vendor_id},
- 'invdate' => $form->{invdate},
- 'default' => $form->{old_duedate});
+ print $form->ajax_response_header(), IR->get_duedate('vendor_id' => $form->{vendor_id},
+ 'invdate' => $form->{invdate},
+ 'default' => $form->{old_duedate});
$lxdebug->leave_sub();
}