Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8f3dc0b4

Von Stephan Köhler vor fast 19 Jahren hinzugefügt

  • ID 8f3dc0b4dfd14847df54366f0c146d058522d022
  • Vorgänger 6ff13e1d
  • Nachfolger ecbb5ab1

Merge von 781 aus unstable: Bufix Druckvorschau etc.
Druckvorschau, Drucken und Drucken+Buchen ueberarbeitet, Fehler bei der HTML-Vorschau beseitigt

Unterschiede anzeigen:

bin/mozilla/io.pl
771 771
    &{"$form->{display_form}"};
772 772
    exit;
773 773
  }
774
  if (   $form->{print_and_post}
775
      && $form->{second_run}
776
      && ($form->{action} eq "display_form")) {
777
    for (keys %$form) { $old_form->{$_} = $form->{$_} }
778
    $old_form->{rowcount}++;
779

  
780
    #$form->{rowcount}--;
781
    #$form->{rowcount}--;
782

  
783
    $form->{print_and_post} = 0;
784

  
785
    &print_form($old_form);
786
    exit;
787
  }
788

  
789
  $form->{action}   = "";
790
  $form->{resubmit} = 0;
791

  
792
  if ($form->{print_and_post} && !$form->{second_run}) {
793
    $form->{second_run} = 1;
794
    $form->{action}     = "display_form";
795
    $form->{rowcount}--;
796
    my $rowcount = $form->{rowcount};
797

  
798
    # get pricegroups for parts
799
    IS->get_pricegroups_for_parts(\%myconfig, \%$form);
800

  
801
    # build up html code for prices_$i
802
    set_pricegroup($rowcount);
803

  
804
    $form->{resubmit} = 1;
805

  
806
  }
774
#   if (   $form->{print_and_post}
775
#       && $form->{second_run}
776
#       && ($form->{action} eq "display_form")) {
777
#     for (keys %$form) { $old_form->{$_} = $form->{$_} }
778
#     $old_form->{rowcount}++;
779
# 
780
#     #$form->{rowcount}--;
781
#     #$form->{rowcount}--;
782
# 
783
#     $form->{print_and_post} = 0;
784
# 
785
#     &print_form($old_form);
786
#     exit;
787
#   }
788
# 
789
#   $form->{action}   = "";
790
#   $form->{resubmit} = 0;
791
# 
792
#   if ($form->{print_and_post} && !$form->{second_run}) {
793
#     $form->{second_run} = 1;
794
#     $form->{action}     = "display_form";
795
#     $form->{rowcount}--;
796
#     my $rowcount = $form->{rowcount};
797
# 
798
#     # get pricegroups for parts
799
#     IS->get_pricegroups_for_parts(\%myconfig, \%$form);
800
# 
801
#     # build up html code for prices_$i
802
#     set_pricegroup($rowcount);
803
# 
804
#     $form->{resubmit} = 1;
805
# 
806
#   }
807 807
  &form_header;
808 808

  
809 809
  $numrows    = ++$form->{rowcount};
......
1261 1261
  $form->{copies}   = 3 unless $form->{copies};
1262 1262

  
1263 1263
  $form->{PD}{ $form->{formname} } = "selected";
1264
  $form->{DF}{ $form->{format} }   = "";
1264
  $form->{DF}{ $form->{format} }   = "selected";
1265 1265
  $form->{OP}{ $form->{media} }    = "selected";
1266 1266
  $form->{SM}{ $form->{sendmode} } = "selected";
1267

  
1267
  print(STDERR $form->{format} , " Format\n");
1268 1268
  if ($form->{type} eq 'purchase_order') {
1269 1269
    $type = qq|<select name=formname>
1270 1270
	    <option value=purchase_order $form->{PD}{purchase_order}>|
......
1413 1413

  
1414 1414
sub print {
1415 1415
  $lxdebug->enter_sub();
1416
  if ($form->{second_run}) {
1417
    $form->{print_and_post} = 0;
1418
  }
1416

  
1419 1417

  
1420 1418
  # if this goes to the printer pass through
1421 1419
  if ($form->{media} eq 'printer' || $form->{media} eq 'queue') {
......
1724 1722
      ? $locale->text('sent to printer')
1725 1723
      : $locale->text('emailed to') . " $form->{email}";
1726 1724
    $form->redirect(qq|$form->{label} $form->{"${inv}number"} $msg|);
1727
  } else {
1728
    &{"$display_form"};
1729 1725
  }
1730 1726

  
1731 1727
  $lxdebug->leave_sub();
bin/mozilla/is.pl
57 57
  {
58 58
    $form->error("Access Denied");
59 59
  }
60

  
61 60
  &invoice_links;
62 61
  &prepare_invoice;
62
  $form->{format} ="pdf";
63

  
63 64
  &display_form;
64 65

  
65 66
  $lxdebug->leave_sub();
......
74 75
  {
75 76
    $form->error("Access Denied");
76 77
  }
77

  
78
  if ($form->{print_and_post}) {
79
    $form->{action}     = "print";
80
    $form->{resubmit} = 1;
81
  }
78 82
  &invoice_links;
79 83
  &prepare_invoice;
80 84
  &display_form;
......
187 191

  
188 192
  $form->{type}     = "invoice";
189 193
  $form->{formname} = "invoice";
190
  $form->{format}   = "html";
191 194
  $form->{media}    = "screen";
192 195

  
193 196
  if ($form->{id}) {
......
344 347
    $button2 =
345 348
      qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
346 349
  }
347
  if ($form->{resubmit}) {
348
    $onload = "document.invoice.submit()";
350
  if ($form->{resubmit} && ($form->{format} eq "html")) {
351
    $onload = qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
352
  } elsif($form->{resubmit}) {
353
    $onload = qq|document.invoice.submit()|;
349 354
  } else {
350 355
    $onload = "fokus()";
351 356
  }
......
763 768
<input type=hidden name=selectAR_paid value="$form->{selectAR_paid}">
764 769
<input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
765 770
<input type=hidden name=oldtotalpaid value=$totalpaid>
766
<input type=hidden name=print_and_post value=$form->{print_and_post}>
767
<input type=hidden name=second_run value=$form->{second_run}>
768 771
    </table>
769 772
    </td>
770 773
  </tr>
......
1092 1095
  $form->{print_and_post} = 1;
1093 1096
  &post();
1094 1097

  
1095
  &display_form();
1098
  &edit();
1096 1099
  $lxdebug->leave_sub();
1097 1100

  
1098 1101
}
bin/mozilla/oe.pl
217 217

  
218 218
sub prepare_order {
219 219
  $lxdebug->enter_sub();
220
  $form->{format}   = "html";
220
  $form->{format}   = "pdf";
221 221
  $form->{media}    = "screen";
222 222
  $form->{formname} = $form->{type};
223 223

  

Auch abrufbar als: Unified diff