X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fio.pl;h=6975fd9c194e25c8fdf0bf9e668346b5e1f57c70;hb=a200453a04fc89fdf02dbe39e1d951cb1b55191c;hp=b49106d209a6fe509f830588b7ba8124d5232f4d;hpb=1514a9d0b358fad627d81e8c88f71536c4e0aaba;p=kivitendo-erp.git
diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl
index b49106d20..6975fd9c1 100644
--- a/bin/mozilla/io.pl
+++ b/bin/mozilla/io.pl
@@ -38,14 +38,14 @@ use SL::IC;
use CGI::Ajax;
use CGI;
-require "$form->{path}/common.pl";
+require "bin/mozilla/common.pl";
# any custom scripts for this one
-if (-f "$form->{path}/custom_io.pl") {
- eval { require "$form->{path}/custom_io.pl"; };
+if (-f "bin/mozilla/custom_io.pl") {
+ eval { require "bin/mozilla/custom_io.pl"; };
}
-if (-f "$form->{path}/$form->{login}_io.pl") {
- eval { require "$form->{path}/$form->{login}_io.pl"; };
+if (-f "bin/mozilla/$form->{login}_io.pl") {
+ eval { require "bin/mozilla/$form->{login}_io.pl"; };
}
1;
@@ -368,9 +368,9 @@ sub display_row {
}
$column_data{sellprice_pg} =
- qq|
| |;
+ qq| | |;
$column_data{sellprice} =
- qq| | |;
+ qq| | |;
} else {
# for last row and report
@@ -388,10 +388,10 @@ sub display_row {
# for last row
$column_data{sellprice_pg} = qq| | |;
- }
-
+ }
+
$column_data{sellprice} =
- qq| | |;
@@ -486,7 +486,7 @@ sub display_row {
? 'deliverydate'
: 'reqdate'; # invoice uses a different term for the same thing.
print qq|
- ${$reqdate_term}
+ ${$reqdate_term}
|;
}
my $subtotalchecked = ($form->{"subtotal_$i"}) ? "checked" : "";
@@ -583,7 +583,7 @@ sub select_item {
$colspan = $#column_index + 1;
print qq|
-
+
-
-
-
-|;
+ print $form->parse_html_template('generic/edit_email',
+ { title => $title,
+ a_filename => $attachment_filename,
+ _print_options_ => print_options('inline'),
+ HIDDEN => [ map +{ name => $_, value => $form->{$_} }, @hidden_keys ],
+ SHOW_BCC => $myconfig{role} eq 'admin' });
$lxdebug->leave_sub();
}
@@ -1425,7 +1295,7 @@ sub send_email {
my $callback = $form->{script} . "?action=edit";
map({ $callback .= "\&${_}=" . E($form->{$_}); }
- qw(login password path type id));
+ qw(login password type id));
print_form("return");
@@ -1498,7 +1368,7 @@ sub print_options {
push @MEDIA, grep $_,
opthash("screen", $form->{OP}{screen}, $locale->text('Screen')),
- (scalar keys %{ $form->{printers} } && $latex_templates) ?
+ (scalar @{ $form->{printers} } && $latex_templates) ?
opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef,
($latex_templates) ?
opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef
@@ -1521,12 +1391,12 @@ sub print_options {
push @PRINTER_ID,
map { opthash($_->{id}, ($_->{id} eq $form->{printer_id} ? 'selected' : ''), $_->{printer_description}) } +{}, @{ $form->{printers} }
- if (ref $form->{printers} eq 'ARRAY');
+ if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } });
@SELECTS = map { sname => lc $_, DATA => \@$_, show => scalar @$_ }, qw(FORMNAME LANGUAGE_ID FORMAT SENDMODE MEDIA PRINTER_ID);
%template_vars = (
- display_copies => scalar keys %{ $form->{printers} } && $latex_templates && $form->{media} ne 'email',
+ display_copies => scalar @{ $form->{printers} } && $latex_templates && $form->{media} ne 'email',
display_remove_draft => (!$form->{id} && $form->{draft_id}),
groupitems_checked => $form->{groupitems} ? "checked" : '',
remove_draft_checked => $form->{remove_draft} ? "checked" : ''
@@ -1713,9 +1583,10 @@ sub print_form {
$form->{rowcount}--;
- &{"$display_form"};
+ call_sub($display_form);
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "PRINTED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1735,7 +1606,7 @@ sub print_form {
$salesman_id_saved = $form->{salesman_id};
$cp_id_saved = $form->{cp_id};
- &{"$form->{vc}_details"}();
+ call_sub("$form->{vc}_details");
$form->{language_id} = $language_saved;
$form->{payment_id} = $payment_id_saved;
@@ -1908,6 +1779,7 @@ sub print_form {
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
if($form->{media} =~ /printer/) {
$form->{addition} = "PRINTED";
}
@@ -1964,7 +1836,7 @@ sub print_form {
} qw(paid exchangerate);
}
- &{"$display_form"};
+ call_sub($display_form);
exit;
}
@@ -1975,7 +1847,7 @@ sub print_form {
$form->redirect(qq|$form->{label} $form->{"${inv}number"} $msg|);
}
if ($form->{printing}) {
- &{"$display_form"};
+ call_sub($display_form);
exit;
}
@@ -2029,7 +1901,7 @@ sub ship_to {
contact email phone fax));
# get details for name
- &{"$form->{vc}_details"}(@addr_vars);
+ call_sub("$form->{vc}_details", @addr_vars);
$number =
($form->{vc} eq 'customer')
@@ -2189,7 +2061,7 @@ sub new_license {
map { $form->{$_} = $form->escape($form->{$_}, 1) }
qw(partnumber description);
$form->{callback} =
- qq|$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&customer=$customer&partnumber=$form->{partnumber}&description=$form->{description}&previousform="$previousform"&initial=1|;
+ qq|$form->{script}?login=$form->{login}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&customer=$customer&partnumber=$form->{partnumber}&description=$form->{description}&previousform="$previousform"&initial=1|;
$form->redirect;
$lxdebug->leave_sub();