Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0bfbcce6

Von Martin Helmling martin.helmling@octosoft.eu vor etwa 8 Jahren hinzugefügt

  • ID 0bfbcce6e77e0f9d83e4f54f3fe9da7edcc866f3
  • Vorgänger 1ce68041
  • Nachfolger 54ce5144

Dateimanagement: Controller zum Laden und Generierung der Dateien

sowie die dazugehörenden Templates

Unterschiede anzeigen:

SL/Form.pm
use List::Util qw(first max min sum);
use List::MoreUtils qw(all any apply);
use SL::DB::Tax;
use SL::Helper::File qw(:all);
use SL::Helper::CreatePDF qw(merge_pdfs);
use strict;
......
# therefore copy to webdav, even if we do not have the webdav feature enabled (just archive)
my $copy_to_webdav = $::instance_conf->get_webdav_documents && !$self->{preview} && $self->{tmpdir} && $self->{tmpfile} && $self->{type};
if ( $ext_for_format eq 'pdf' && $::instance_conf->get_doc_storage ) {
$self->append_general_pdf_attachments(filepath => $self->{tmpdir}."/".$self->{tmpfile},
type => $self->{type});
}
if ($self->{media} eq 'file') {
copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;
Common::copy_file_to_webdav_folder($self) if $copy_to_webdav;
if (!$self->{preview} && $::instance_conf->get_doc_storage)
{
$self->{attachment_filename} ||= $self->generate_attachment_filename;
$self->store_pdf($self);
}
$self->cleanup;
chdir("$self->{cwd}");
......
Common::copy_file_to_webdav_folder($self) if $copy_to_webdav;
if ( !$self->{preview} && $ext_for_format eq 'pdf' && $::instance_conf->get_doc_storage) {
$self->{attachment_filename} ||= $self->generate_attachment_filename;
$self->store_pdf($self);
}
if ($self->{media} eq 'email') {
my $mail = Mailer->new;
......
}
sub new_lastmtime {
$main::lxdebug->enter_sub();
my ($self, $table, $provided_dbh) = @_;
......
my $ref = selectfirst_hashref_query($self, $dbh, $query, $self->{id});
$ref->{mtime} ||= $ref->{itime};
$self->{lastmtime} = $ref->{mtime};
$main::lxdebug->message(LXDebug->DEBUG2(),"new lastmtime=".$self->{lastmtime});
$main::lxdebug->leave_sub();
}
sub mtime_ischanged {
......
#--- 4 locale ---#
# $main::locale->text('SAVED')
# $main::locale->text('SCREENED')
# $main::locale->text('DELETED')
# $main::locale->text('ADDED')
# $main::locale->text('PAYMENT POSTED')
......
# $main::locale->text('MAILED')
# $main::locale->text('SCREENED')
# $main::locale->text('CANCELED')
# $main::locale->text('IMPORT')
# $main::locale->text('UNIMPORT')
# $main::locale->text('invoice')
# $main::locale->text('proforma')
# $main::locale->text('sales_order')

Auch abrufbar als: Unified diff