Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ce498a74

Von Jan Büren vor etwa 14 Jahren hinzugefügt

  • ID ce498a747292baeaf103118b5073061196d981e4
  • Vorgänger 6354fe29
  • Nachfolger 5769da0e

Die Überbleibsel für die Druckfunktion aus dem HTML-Kode entfernt und ferner die gesamte Druckfunktion gelöscht

Unterschiede anzeigen:

bin/mozilla/cp.pl
103 103
  $form->{selectcurrency} = "";
104 104
  map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
105 105

  
106
  $form->{media} = "screen";
107 106

  
108 107
  &form_header;
109 108
  &form_footer;
......
451 450

  
452 451
  $auth->assert('cash');
453 452

  
454
  my ($media, $format, $latex_templates);
455

  
456
  $form->{DF}{ $form->{format} } = "selected";
457
  $form->{OP}{ $form->{media} }  = "selected";
458

  
459
  $media = qq|
460
          <option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
461

  
462
  if ($myconfig{printer} && $latex_templates) {
463
    $media .= qq|
464
          <option value=printer $form->{OP}{printer}>|
465
      . $locale->text('Printer');
466
  }
467
  if ($latex_templates) {
468
    $media .= qq|
469
          <option value=queue $form->{OP}{queue}>| . $locale->text('Queue');
470
    $format .= qq|
471
            <option value=postscript $form->{DF}{postscript}>|
472
      . $locale->text('Postscript') . qq|
473
            <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
474
  }
475

  
476 453
  print qq|
477 454
  <tr>
478 455
    <td><hr size=3 noshade></td>
......
484 461
<input class=submit type=submit name=action value="|
485 462
    . $locale->text('Update') . qq|">
486 463
<input class=submit type=submit name=action value="|
487
    . $locale->text('Post') . qq|">|;
488

  
489
  if ($latex_templates) {
490
    print qq|
491
<input class=submit type=submit name=action value="|
492
      . $locale->text('Print') . qq|">|;
493
  }
494

  
495
  print qq|
496
<select name=format>$format</select>
497
<select name=media>$media</select>
498

  
499
  </form>
464
    . $locale->text('Post') . qq|">
465
 </form>
500 466

  
501 467
</body>
502 468
</html>
......
678 644
  $lxdebug->leave_sub();
679 645
}
680 646

  
681
sub print {
682
  $lxdebug->enter_sub();
683
  exit; # Niemand braucht mich mehr! LöschMich endlich! jb 8.10.2010
684
  $auth->assert('cash');
685

  
686
  my ($whole, $check, %queued, $spool, $filename, $userspath);
687

  
688
  &check_form;
689

  
690
  ($whole, $form->{decimal}) = split(/\./, $form->{amount});
691

  
692
  $form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
693

  
694
  #$form->{decimal} .= "00";
695
  $form->{decimal} = substr($form->{decimal}, 0, 2);
696

  
697
  $check = new CP $myconfig{countrycode};
698
  $check->init;
699
  $form->{text_amount} = $check->num2text($whole);
700

  
701
  if ($form->{vc} eq 'customer') {
702
    IS->customer_details(\%myconfig, $form);
703
  } else {
704
    IR->vendor_details(\%myconfig, $form);
705
  }
706

  
707
  $form->{callback} = "";
708

  
709
  $form->{templates} = "$myconfig{templates}";
710
  $form->{IN}        = "$form->{formname}.tex";
711

  
712
  if ($form->{format} eq 'postscript') {
713
    $form->{postscript} = 1;
714
  }
715
  if ($form->{format} eq 'pdf') {
716
    $form->{pdf} = 1;
717
  }
718

  
719
  delete $form->{OUT};
720

  
721
  if ($form->{media} eq 'printer') {
722
    $form->{OUT} = "| $myconfig{printer}";
723
  }
724
  if ($form->{media} eq 'queue') {
725
    %queued = map { s|.*/|| } split / /, $form->{queued};
726

  
727
    if ($filename = $queued{ $form->{formname} }) {
728
      unlink "$spool/$filename";
729
      $filename =~ s/\..*$//g;
730
    } else {
731
      $filename = time;
732
      $filename .= $$;
733
    }
734
    $filename .= ($form->{postscript}) ? '.ps' : '.pdf';
735
    $form->{queued} = "$form->{formname} $filename";
736
    $form->{OUT}    = ">$spool/$filename";
737

  
738
    $form->update_status(\%myconfig);
739

  
740
  }
741

  
742
  $form->{company} = $myconfig{company};
743
  $form->{address} = $myconfig{address};
744

  
745
  $form->parse_template(\%myconfig, $userspath);
746

  
747
  if ($form->{media} ne 'screen') {
748
    $form->{callback} = "cp.pl?action=payment&vc=$form->{vc}&all_vc=$form->{all_vc}";
749

  
750
    $form->redirect if (CP->process_payment(\%myconfig, \%$form));
751
    $form->error($locale->text('Cannot post payment!'));
752
  }
753

  
754
  $lxdebug->leave_sub();
755
}
756

  
757 647
sub check_form {
758 648
  $lxdebug->enter_sub();
759 649

  

Auch abrufbar als: Unified diff