Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5d8dbe98

Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt

Fix für Bug 1673

bei "Erneuern" und "Als neu speichern" nicht mehr immer drucken.

Unterschiede anzeigen:

bin/mozilla/oe.pl
181 181

  
182 182
  my ($language_id, $printer_id);
183 183
  if ($form->{print_and_save}) {
184
    $form->{action}   = "print";
184
    $form->{action}   = "dispatcher";
185
    $form->{action_print}   = "1";
185 186
    $form->{resubmit} = 1;
186 187
    $language_id = $form->{language_id};
187 188
    $printer_id = $form->{printer_id};
......
388 389
    }
389 390
  }
390 391

  
391
  my $onload = ($form->{resubmit} && ($form->{format} eq "html")) ? "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';document.oe.submit()"
392
          : ($form->{resubmit})                                ? "document.oe.submit()"
393
          : ($creditwarning)                                   ? "alert('$credittext')"
394
          :                                                      "";
392
  my $onload = "";
393
  if ($form->{resubmit} && ($form->{format} eq "html")) {
394
      $onload  = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';";
395
      $onload .= "document.do.submit();";
396
  } elsif ($form->{resubmit}) {
397
    # emulate click for resubmitting actions
398
    $onload  = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form;
399
    $onload .= "document.oe.submit();";
400
  } elsif ($creditwarning) {
401
    $onload = "alert('$credittext')";
402
  }
395 403

  
396 404
  $TMPL_VAR{onload} = $onload;
397 405
  $TMPL_VAR{dateformat}          = $myconfig{dateformat};
......
523 531

  
524 532
  check_oe_access();
525 533

  
526
#  $main::lxdebug->message(0, Dumper($form));
527

  
528 534
  set_headings($form->{"id"} ? "edit" : "add");
529 535

  
530 536
  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
......
2026 2032
  foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation
2027 2033
                         request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) {
2028 2034
    if ($::form->{"action_${action}"}) {
2029
      $::form->{dispatched_action} = $action;
2030 2035
      call_sub($action);
2031 2036
      return;
2032 2037
    }
templates/webpages/oe/form_header.html
26 26
    <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
27 27
    <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
28 28
    <input type="hidden" name="follow_up_rowcount" value="1">
29
[%- IF resubmit %]
30
[%# in case of resubmits, restore enough information for dispatcher to work %]
31
    [% L.hidden_tag('action_' _ dispatched_action, 1) %]
32
[%- END %]
33 29

  
34 30
    <div class="listtop">[% title %]</div>
35 31

  

Auch abrufbar als: Unified diff