Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b122ba4c

Von Jan Büren vor mehr als 3 Jahren hinzugefügt

  • ID b122ba4c2f6275c2db31a0388c94f10f3d33c30e
  • Vorgänger 078bf25d
  • Nachfolger 3d99b4f5

OE -> report_generator um want_binary_pdf Option ergänzt

Unterschiede anzeigen:

bin/mozilla/oe.pl
1006 1006
  my $locale   = $main::locale;
1007 1007
  my $cgi      = $::request->{cgi};
1008 1008

  
1009
  my %params   = @_;
1009 1010
  check_oe_access();
1010 1011

  
1011 1012
  my $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber";
1012 1013

  
1013 1014
  ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) = split(/--/, $form->{ $form->{vc} });
1014

  
1015 1015
  report_generator_set_default_sort('transdate', 1);
1016

  
1017 1016
  OE->transactions(\%myconfig, \%$form);
1018 1017

  
1019 1018
  $form->{rowcount} = scalar @{ $form->{OE} };
......
1090 1089
  my   @keys_for_url = grep { $form->{$_} } @hidden_variables;
1091 1090
  push @keys_for_url, 'taxzone_id' if $form->{taxzone_id} ne ''; # taxzone_id could be 0
1092 1091

  
1093
  my $href = build_std_url('action=orders', @keys_for_url);
1092
  my $href = $params{want_binary_pdf} ? '' : build_std_url('action=orders', @keys_for_url);
1094 1093

  
1095 1094
  my %column_defs = (
1096 1095
    'ids'                     => { 'text' => '', },
......
1238 1237

  
1239 1238
  my $idx = 1;
1240 1239

  
1241
  my $edit_url = ($::instance_conf->get_feature_experimental_order)
1240
  my $edit_url = $params{want_binary_pdf}
1241
               ? ''
1242
               : ($::instance_conf->get_feature_experimental)
1242 1243
               ? build_std_url('script=controller.pl', 'action=Order/edit', 'type')
1243 1244
               : build_std_url('action=edit', 'type', 'vc');
1244

  
1245 1245
  foreach my $oe (@{ $form->{OE} }) {
1246 1246
    map { $oe->{$_} *= $oe->{exchangerate} } @subtotal_columns;
1247 1247

  
......
1277 1277
      'align'    => 'center',
1278 1278
    };
1279 1279

  
1280
    $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
1280
    $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}" unless $params{want_binary_pdf};
1281 1281

  
1282 1282
    my $row_set = [ $row ];
1283 1283

  
......
1294 1294

  
1295 1295
  $report->add_separator();
1296 1296
  $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
1297

  
1297
  if ($params{want_binary_pdf}) {
1298
    $report->generate_with_headers();
1299
    return $report->generate_pdf_content(want_binary_pdf => 1);
1300
  }
1298 1301
  setup_oe_orders_action_bar();
1299 1302
  $report->generate_with_headers();
1300 1303

  

Auch abrufbar als: Unified diff