Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3d99b4f5

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

  • ID 3d99b4f59f7595e8f0faa0a729c70d333edfed04
  • Vorgänger b122ba4c
  • Nachfolger 0213d50a

ar_transactions um Parameter want_binary_pdf erweitert

Unterschiede anzeigen:

bin/mozilla/ar.pl
1001 1001

  
1002 1002
  my ($callback, $href, @columns);
1003 1003

  
1004
  my %params   = @_;
1004 1005
  report_generator_set_default_sort('transdate', 1);
1005 1006

  
1006 1007
  AR->ar_transactions(\%myconfig, \%$form);
......
1027 1028
                                           employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed);
1028 1029
  push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
1029 1030

  
1030
  $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
1031
  $href =  $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
1031 1032

  
1032 1033
  my %column_defs = (
1033 1034
    'ids'                     => { raw_header_data => SL::Presenter::Tag::checkbox_tag("", id => "check_all", checkall => "[data-checkall=1]"), align => 'center' },
......
1207 1208
    }
1208 1209

  
1209 1210
    $row->{invnumber}->{link} = build_std_url("script=" . ($ar->{invoice} ? 'is.pl' : 'ar.pl'), 'action=edit')
1210
      . "&id=" . E($ar->{id}) . "&callback=${callback}";
1211
      . "&id=" . E($ar->{id}) . "&callback=${callback}" unless $params{want_binary_pdf};
1211 1212

  
1212 1213
    $row->{ids} = {
1213 1214
      raw_data =>  SL::Presenter::Tag::checkbox_tag("id[]", value => $ar->{id}, "data-checkall" => 1),
......
1231 1232
  $report->add_separator();
1232 1233
  $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
1233 1234

  
1235
  if ($params{want_binary_pdf}) {
1236
    $report->generate_with_headers();
1237
    return $report->generate_pdf_content(want_binary_pdf => 1);
1238
  }
1239

  
1234 1240
  $::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js');
1235 1241
  setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} }));
1236 1242

  

Auch abrufbar als: Unified diff