Lieferschein: direktes, erstmaliges Drucken gefixt
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 9 Mar 2021 10:18:08 +0000 (11:18 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 9 Mar 2021 10:18:08 +0000 (11:18 +0100)
Behebt #469 (redmine)

bin/mozilla/do.pl

index 5de2959..fc38c52 100644 (file)
@@ -460,9 +460,9 @@ sub form_header {
   if ($form->{resubmit} && ($form->{format} eq "html")) {
     $dispatch_to_popup  = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
     $dispatch_to_popup .= "document.do.submit();";
-  } elsif ($form->{resubmit}) {
+  } elsif ($form->{resubmit} && $form->{action_print}) {
     # emulate click for resubmitting actions
-    $dispatch_to_popup  = "document.do.${_}.click(); " for grep { /^action_/ } keys %$form;
+    $dispatch_to_popup  = "kivi.SalesPurchase.show_print_dialog(); kivi.SalesPurchase.print_record();";
   }
   $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup});");