Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a422e87f

Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt

  • ID a422e87f5acc0cb9ecbc76f46b416c6d99f27a38
  • Vorgänger 2b6b46fe
  • Nachfolger 262811c8

Mahnungsbericht: Erzeugte Dokumente anzeigen

Unterschiede anzeigen:

SL/DN.pm
783 783
  my $query =
784 784
    qq|SELECT a.id, a.ordnumber, a.invoice, a.transdate, a.invnumber, a.amount, a.language_id,
785 785
         ct.name AS customername, ct.id AS customer_id, a.duedate, da.fee,
786
         da.interest, dn.dunning_description, da.transdate AS dunning_date,
786
         da.interest, dn.dunning_description, dn.dunning_level, da.transdate AS dunning_date,
787 787
         da.duedate AS dunning_duedate, da.dunning_id, da.dunning_config_id,
788 788
         e2.name AS salesman
789 789
       FROM ar a
bin/mozilla/dn.pl
38 38
use SL::DN;
39 39
use SL::DB::Department;
40 40
use SL::DB::Dunning;
41
use SL::File;
41 42
use SL::Helper::Flash qw(flash);
42 43
use SL::Locale::String qw(t8);
44
use SL::Presenter::FileObject;
43 45
use SL::ReportGenerator;
44 46

  
45 47
require "bin/mozilla/common.pl";
......
378 380
    'fee'                 => { 'text' => $locale->text('Total Fees') },
379 381
    'interest'            => { 'text' => $locale->text('Interest') },
380 382
    'salesman'            => { 'text' => $locale->text('Salesperson'), 'visible' => $form->{l_salesman} ? 1 : 0 },
383
    'documents'           => { 'text' => $locale->text('Documents')  , 'visible' => $::instance_conf->get_doc_storage ? 1 : 0 },
381 384
  );
382 385

  
383 386
  $report->set_columns(%column_defs);
......
444 447
      $row->{language} = { };
445 448
    }
446 449

  
450
    if ($::instance_conf->get_doc_storage) {
451
      my @files = SL::File->get_all_versions(object_id   => $ref->{id},
452
                                             object_type => 'dunning' . $ref->{dunning_level},
453
                                             file_type   => 'document',);
454
      if (scalar @files) {
455
        my $html          = join '<br>', map { SL::Presenter::FileObject::file_object($_) } @files;
456
        my $text          = join "\n",   map { $_->file_name                              } @files;
457
        $row->{documents} = { 'raw_data' => $html, data => $text };
458
      } else {
459
        $row->{documents} = { };
460
      }
461
    }
462

  
447 463
    push @{ $current_dunning_rows }, $row;
448 464

  
449 465
    $previous_dunning_id   = $ref->{dunning_id};

Auch abrufbar als: Unified diff