Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0631649c

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

  • ID 0631649c2c4115f5820829f866af7e2bc2c6623f
  • Vorgänger 754ef842
  • Nachfolger a40c356e

Files: Druckvariante beim Drucken speichern und bei E-Mail darauf prüfen, …

… um festzustellen, welcher letzte Belegausdruck für die Variante relrevant
ist.

Unterschiede anzeigen:

SL/File.pm
48 48
    object_id   => $params{object_id},
49 49
    object_type => $params{object_type}
50 50
  );
51
  push @query, (file_name => $params{file_name}) if $params{file_name};
52
  push @query, (file_type => $params{file_type}) if $params{file_type};
53
  push @query, (mime_type => $params{mime_type}) if $params{mime_type};
54
  push @query, (source    => $params{source})    if $params{source};
51
  push @query, (file_name     => $params{file_name})     if $params{file_name};
52
  push @query, (file_type     => $params{file_type})     if $params{file_type};
53
  push @query, (mime_type     => $params{mime_type})     if $params{mime_type};
54
  push @query, (source        => $params{source})        if $params{source};
55
  push @query, (print_variant => $params{print_variant}) if $params{print_variant};
55 56

  
56 57
  my $sortby = $params{sort_by} || 'itime DESC,file_name ASC';
57 58

  
......
218 219
        mime_type      => $params{mime_type},
219 220
        title          => $params{title},
220 221
        description    => $params{description},
222
        print_variant  => $params{print_variant},
221 223
      );
222 224
      $file->itime($params{mtime})    if $params{mtime};
223 225
      $params{itime} = $params{mtime} if $params{mtime};
SL/Form.pm
975 975
    $attachment_name     =~ s{\.(.+?)$}{.${ext_for_format}} if ($ext_for_format);
976 976

  
977 977
    if (($self->{attachment_policy} // '') eq 'old_file') {
978
      my ( $attfile ) = SL::File->get_all(object_id   => $self->{id},
979
                                          object_type => $self->{formname},
980
                                          file_type   => 'document');
978
      my ( $attfile ) = SL::File->get_all(object_id     => $self->{id},
979
                                          object_type   => $self->{type},
980
                                          file_type     => 'document',
981
                                          print_variant => $self->{formname},);
981 982

  
982 983
      if ($attfile) {
983 984
        $attfile->{override_file_name} = $attachment_name if $attachment_name;
SL/Helper/File.pm
25 25
  return if !$id || !$type;
26 26

  
27 27
  SL::File->save(
28
    object_id   => $id,
29
    object_type => $type,
30
    mime_type   => 'application/pdf',
31
    source      => 'created',
32
    file_type   => 'document',
33
    file_name   => $form->{attachment_filename},
34
    file_path   => $form->{tmpfile},
28
    object_id     => $id,
29
    object_type   => $type,
30
    mime_type     => 'application/pdf',
31
    source        => 'created',
32
    file_type     => 'document',
33
    file_name     => $form->{attachment_filename},
34
    file_path     => $form->{tmpfile},
35
    print_variant => $form->{formname},
35 36
  );
36 37
}
37 38

  
bin/mozilla/io.pl
2161 2161
  # Is an old file version available?
2162 2162
  my $attfile;
2163 2163
  if ($::form->{attachment_policy} eq 'old_file') {
2164
    $attfile = SL::File->get_all(object_id   => $id,
2165
                                 object_type => $::form->{formname},
2166
                                 file_type   => 'document');
2164
    $attfile = SL::File->get_all(object_id     => $id,
2165
                                 object_type   => $type,
2166
                                 file_type     => 'document',
2167
                                 print_variant => $::form->{formname},);
2167 2168
  }
2168 2169

  
2169 2170
  if ($::form->{attachment_policy} eq 'no_file' || ($::form->{attachment_policy} eq 'old_file' && $attfile)) {

Auch abrufbar als: Unified diff