From 8f3dc0b4dfd14847df54366f0c146d058522d022 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Mon, 16 Jan 2006 16:32:12 +0000 Subject: [PATCH] Merge von 781 aus unstable: Bufix Druckvorschau etc. Druckvorschau, Drucken und Drucken+Buchen ueberarbeitet, Fehler bei der HTML-Vorschau beseitigt --- bin/mozilla/io.pl | 76 ++++++++++++++++++++++------------------------- bin/mozilla/is.pl | 19 +++++++----- bin/mozilla/oe.pl | 2 +- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index dcdaa3617..31322f088 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -771,39 +771,39 @@ sub display_form { &{"$form->{display_form}"}; exit; } - if ( $form->{print_and_post} - && $form->{second_run} - && ($form->{action} eq "display_form")) { - for (keys %$form) { $old_form->{$_} = $form->{$_} } - $old_form->{rowcount}++; - - #$form->{rowcount}--; - #$form->{rowcount}--; - - $form->{print_and_post} = 0; - - &print_form($old_form); - exit; - } - - $form->{action} = ""; - $form->{resubmit} = 0; - - if ($form->{print_and_post} && !$form->{second_run}) { - $form->{second_run} = 1; - $form->{action} = "display_form"; - $form->{rowcount}--; - my $rowcount = $form->{rowcount}; - - # get pricegroups for parts - IS->get_pricegroups_for_parts(\%myconfig, \%$form); - - # build up html code for prices_$i - set_pricegroup($rowcount); - - $form->{resubmit} = 1; - - } +# if ( $form->{print_and_post} +# && $form->{second_run} +# && ($form->{action} eq "display_form")) { +# for (keys %$form) { $old_form->{$_} = $form->{$_} } +# $old_form->{rowcount}++; +# +# #$form->{rowcount}--; +# #$form->{rowcount}--; +# +# $form->{print_and_post} = 0; +# +# &print_form($old_form); +# exit; +# } +# +# $form->{action} = ""; +# $form->{resubmit} = 0; +# +# if ($form->{print_and_post} && !$form->{second_run}) { +# $form->{second_run} = 1; +# $form->{action} = "display_form"; +# $form->{rowcount}--; +# my $rowcount = $form->{rowcount}; +# +# # get pricegroups for parts +# IS->get_pricegroups_for_parts(\%myconfig, \%$form); +# +# # build up html code for prices_$i +# set_pricegroup($rowcount); +# +# $form->{resubmit} = 1; +# +# } &form_header; $numrows = ++$form->{rowcount}; @@ -1261,10 +1261,10 @@ sub print_options { $form->{copies} = 3 unless $form->{copies}; $form->{PD}{ $form->{formname} } = "selected"; - $form->{DF}{ $form->{format} } = ""; + $form->{DF}{ $form->{format} } = "selected"; $form->{OP}{ $form->{media} } = "selected"; $form->{SM}{ $form->{sendmode} } = "selected"; - + print(STDERR $form->{format} , " Format\n"); if ($form->{type} eq 'purchase_order') { $type = qq|{duedate}>|; } - if ($form->{resubmit}) { - $onload = "document.invoice.submit()"; + if ($form->{resubmit} && ($form->{format} eq "html")) { + $onload = qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|; + } elsif($form->{resubmit}) { + $onload = qq|document.invoice.submit()|; } else { $onload = "fokus()"; } @@ -763,8 +768,6 @@ sub form_footer { {oldinvtotal}> -{print_and_post}> -{second_run}> @@ -1092,7 +1095,7 @@ sub print_and_post { $form->{print_and_post} = 1; &post(); - &display_form(); + &edit(); $lxdebug->leave_sub(); } diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6e33356ee..e05d0130a 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -217,7 +217,7 @@ sub order_links { sub prepare_order { $lxdebug->enter_sub(); - $form->{format} = "html"; + $form->{format} = "pdf"; $form->{media} = "screen"; $form->{formname} = $form->{type}; -- 2.20.1