$files{versions} = [ SL::File->get_all_versions(object_id => $self->order->id, object_type => $self->order->type, file_type => 'document') ];
$files{files} = [ SL::File->get_all( object_id => $self->order->id, object_type => $self->order->type, file_type => 'attachment') ];
$files{vc_files} = [ SL::File->get_all( object_id => $self->order->{$self->cv}->id, object_type => $self->cv, file_type => 'attachment') ];
+ $files{project_files} = [ SL::File->get_all( object_id => $self->order->globalproject_id, object_type => 'project', file_type => 'attachment') ];
}
my @parts =
}
sub _get_files_for_email_dialog {
- my %files = map { ($_ => []) } qw(versions files vc_files part_files);
+ my %files = map { ($_ => []) } qw(versions files vc_files part_files project_files);
return %files if !$::instance_conf->get_doc_storage;
$files{files} = [ SL::File->get_all( object_id => $::form->{id}, object_type => $::form->{type}, file_type => 'attachment') ];
$files{vc_files} = [ SL::File->get_all( object_id => $::form->{vc_id}, object_type => $::form->{vc}, file_type => 'attachment') ]
if $::form->{vc} && $::form->{"vc_id"};
+ $files{project_files} = [ SL::File->get_all(object_id => $::form->{project_id}, object_type => 'project',file_type => 'attachment') ]
+ if $::form->{project_id};
}
my @parts =
type: $('#type').val(),
vc: vc,
vc_id: $('#' + vc + '_id').val(),
+ project_id: $('#globalproject_id').val(),
};
$('[name^=id_],[name^=partnumber_]').each(function(idx, elt) {
files = FILES.part_files
checked = INSTANCE_CONF.get_email_attachment_part_files_checked
label = LxERP.t8("Files from parts") %]
+
+ [% PROCESS attach_file_list
+ files = FILES.project_files
+ label = LxERP.t8("Files from projects") %]
[% END %]
</tbody>
</table>