Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3ef69a72

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 3ef69a72577387de69e446352b780ae922550633
  • Vorgänger 32ee774f
  • Nachfolger f13e90e5

Unterscheidung Bankeinzug/Überweisung bei Export der Zahlungsliste als PDF

Unterschiede anzeigen:

bin/mozilla/sepa.pl
363 363
  $main::lxdebug->leave_sub();
364 364
}
365 365

  
366
# TODO
367 366
sub bank_transfer_payment_list_as_pdf {
368 367
  $main::lxdebug->enter_sub();
369 368

  
370 369
  my $form       = $main::form;
371 370
  my %myconfig   = %main::myconfig;
372 371
  my $locale     = $main::locale;
372
  my $vc         = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
373 373

  
374 374
  my @ids        = @{ $form->{items} || [] };
375 375
  my @export_ids = uniq map { $_->{export_id} } @ids;
376 376

  
377 377
  $form->show_generic_error($locale->text('Multi mode not supported.'), 'back_button' => 1) if 1 != scalar @export_ids;
378 378

  
379
  my $export = SL::SEPA->retrieve_export('id' => $export_ids[0], 'details' => 1);
379
  my $export = SL::SEPA->retrieve_export('id' => $export_ids[0], 'details' => 1, vc => $vc);
380 380
  my @items  = ();
381 381

  
382 382
  foreach my $id (@ids) {
......
389 389
  my $report         =  SL::ReportGenerator->new(\%main::myconfig, $form);
390 390

  
391 391
  my %column_defs    =  (
392
    'invnumber'      => { 'text' => $locale->text('Invoice'), },
393
    'vendor_name'    => { 'text' => $locale->text('Vendor'), },
394
    'our_iban'       => { 'text' => $locale->text('Source IBAN'), },
395
    'our_bic'        => { 'text' => $locale->text('Source BIC'), },
396
    'vendor_iban'    => { 'text' => $locale->text('Destination IBAN'), },
397
    'vendor_bic'     => { 'text' => $locale->text('Destination BIC'), },
398
    'amount'         => { 'text' => $locale->text('Amount'), },
399
    'reference'      => { 'text' => $locale->text('Reference'), },
400
    'execution_date' => { 'text' => $locale->text('Execution date'), },
392
    'invnumber'      => { 'text' => $locale->text('Invoice'),                                                                  },
393
    'vc_name'        => { 'text' => $vc eq 'customer' ? $locale->text('Customer')         : $locale->text('Vendor'),           },
394
    'our_iban'       => { 'text' => $vc eq 'customer' ? $locale->text('Destination IBAN') : $locale->text('Source IBAN'),      },
395
    'our_bic'        => { 'text' => $vc eq 'customer' ? $locale->text('Destination BIC')  : $locale->text('Source BIC'),       },
396
    'vc_iban'        => { 'text' => $vc eq 'customer' ? $locale->text('Source IBAN')      : $locale->text('Destination IBAN'), },
397
    'vc_bic'         => { 'text' => $vc eq 'customer' ? $locale->text('Source BIC')       : $locale->text('Destination BIC'),  },
398
    'amount'         => { 'text' => $locale->text('Amount'),                                                                   },
399
    'reference'      => { 'text' => $locale->text('Reference'),                                                                },
400
    'execution_date' => { 'text' => $locale->text('Execution date'),                                                           },
401 401
  );
402 402

  
403 403
  map { $column_defs{$_}->{align} = 'right' } qw(amount execution_date);
404 404

  
405
  my @columns        =  qw(invnumber vendor_name our_iban our_bic vendor_iban vendor_bic amount reference execution_date);
405
  my @columns        =  qw(invnumber vc_name our_iban our_bic vc_iban vc_bic amount reference execution_date);
406 406

  
407 407
  $report->set_options('std_column_visibility' => 1,
408 408
                       'output_format'         => 'PDF',
409
                       'title'                 => $locale->text('Bank transfer payment list for export #1', $export->{id}),
410
                       'attachment_basename'   => $locale->text('bank_transfer_payment_list_#1', $export->{id}) . strftime('_%Y%m%d', localtime time),
409
                       'title'                 =>  $vc eq 'customer' ? $locale->text('Bank collection payment list for export #1', $export->{id}) : $locale->text('Bank transfer payment list for export #1', $export->{id}),
410
                       'attachment_basename'   => ($vc eq 'customer' ? $locale->text('bank_collection_payment_list_#1', $export->{id}) : $locale->text('bank_transfer_payment_list_#1', $export->{id})) . strftime('_%Y%m%d', localtime time),
411 411
    );
412 412

  
413 413
  $report->set_columns(%column_defs);
......
526 526
  $main::lxdebug->leave_sub();
527 527
}
528 528

  
529
# TODO
530 529
sub bank_transfer_mark_as_closed_step2 {
531 530
  $main::lxdebug->enter_sub();
532 531

  

Auch abrufbar als: Unified diff