From: Philip Reetz Date: Mon, 16 Jan 2006 13:48:01 +0000 (+0000) Subject: Druckvorschau, Drucken und Drucken+Buchen ueberarbeitet, Fehler bei der HTML-Vorschau... X-Git-Tag: release-2.4.0^2~383 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cc63261c996079334c6a129d9b53d8f4a6a1e8cb;p=kivitendo-erp.git Druckvorschau, Drucken und Drucken+Buchen ueberarbeitet, Fehler bei der HTML-Vorschau beseitigt --- 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};