- my @files = SL::File->get_all_versions(object_id => $ref->{id},
- object_type => 'dunning' . $ref->{dunning_level},
- file_type => 'document',);
+ # object_types dunning1-dunning3 are the dunnings for the according levels.
+ my @files = SL::File->get_all_versions(object_id => $ref->{id},
+ object_type => 'dunning' . $ref->{dunning_level},
+ file_type => 'document',);
+ # object_type dunning is the dunning invoice with the fees.
+ push @files, SL::File->get_all_versions(object_id => $ref->{id},
+ object_type => 'dunning',
+ file_type => 'document',);