X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/117dd89a326583c6eeeba58a99d43ff325909119..e1cb00366d40cc3a1b07e065b51ad39c84baf7e6:/bin/mozilla/do.pl diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 3884b683c..ebaffc640 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -121,7 +121,8 @@ sub edit { } if ($form->{print_and_save}) { - $form->{action} = "print"; + $form->{action} = "dispatcher"; + $form->{action_print} = "1"; $form->{resubmit} = 1; $language_id = $form->{language_id}; $printer_id = $form->{printer_id}; @@ -272,6 +273,8 @@ sub form_header { if ($form->{format} eq "html") { $form->{onload} = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; } + # emulate click for resubmitting actions + $form->{onload} .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; $form->{onload} .= "document.do.submit();" } @@ -765,6 +768,7 @@ sub invoice_multi { $form->{rowcount} = 0; foreach my $ref (@{ $form->{form_details} }) { $form->{rowcount}++; + $ref->{reqdate} ||= $ref->{dord_transdate}; # copy transdates into each invoice row map { $form->{"${_}_$form->{rowcount}"} = $ref->{$_} } keys %{ $ref }; map { $form->{"${_}_$form->{rowcount}"} = $form->format_amount(\%myconfig, $ref->{$_}) } qw(qty sellprice discount lastcost); }