Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 34540341

Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt

  • ID 34540341e99827781065740f9dad625d17d42f07
  • Vorgänger fb722bcc
  • Nachfolger 0bfb9ec3

Auftrags-Controller: OpenDocument-Druck

Unterschiede anzeigen:

SL/Controller/Order.pm
216 216
  my $copies      = $::form->{print_options}->{copies};
217 217
  my $groupitems  = $::form->{print_options}->{groupitems};
218 218

  
219
  # only pdf by now
220
  if (none { $format eq $_ } qw(pdf)) {
219
  # only pdf and opendocument by now
220
  if (none { $format eq $_ } qw(pdf opendocument opendocument_pdf)) {
221 221
    return $self->js->flash('error', t8('Format \'#1\' is not supported yet/anymore.', $format))->render;
222 222
  }
223 223

  
......
1457 1457
                show_headers       => 1,
1458 1458
                no_queue           => 1,
1459 1459
                no_postscript      => 1,
1460
                no_opendocument    => 1,
1460
                no_opendocument    => 0,
1461 1461
                no_html            => 1},
1462 1462
  );
1463 1463

  
......
1591 1591
  $order->language($params->{language});
1592 1592
  $order->flatten_to_form($print_form, format_amounts => 1);
1593 1593

  
1594
  my $template_ext;
1595
  my $template_type;
1596
  if ($print_form->{format} =~ /(opendocument|oasis)/i) {
1597
    $template_ext  = 'odt';
1598
    $template_type = 'OpenDocument';
1599
  }
1600

  
1594 1601
  # search for the template
1595 1602
  my ($template_file, @template_files) = SL::Helper::CreatePDF->find_template(
1596 1603
    name        => $print_form->{formname},
1604
    extension   => $template_ext,
1597 1605
    email       => $print_form->{media} eq 'email',
1598 1606
    language    => $params->{language},
1599 1607
    printer_id  => $print_form->{printer_id},  # todo
......
1610 1618
      $print_form->prepare_for_printing;
1611 1619

  
1612 1620
      $$pdf_ref = SL::Helper::CreatePDF->create_pdf(
1613
        template  => $template_file,
1614
        variables => $print_form,
1621
        format        => $print_form->{format},
1622
        template_type => $template_type,
1623
        template      => $template_file,
1624
        variables     => $print_form,
1615 1625
        variable_content_types => {
1616 1626
          longdescription => 'html',
1617 1627
          partnotes       => 'html',

Auch abrufbar als: Unified diff