projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DeliveryOrder: nur umlagern erlauben wenn bereits gespeichert wurde
[kivitendo-erp.git]
/
SL
/
Common.pm
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
193476c
..
36635fd
100644
(file)
--- a/
SL/Common.pm
+++ b/
SL/Common.pm
@@
-25,6
+25,7
@@
use Encode qw(decode);
use SL::DBUtils;
use SL::DB;
use SL::DBUtils;
use SL::DB;
+use SL::HTML::Util;
sub unique_id {
my ($a, $b) = gettimeofday();
sub unique_id {
my ($a, $b) = gettimeofday();
@@
-342,6
+343,11
@@
sub get_vc_details {
$query = qq|SELECT * FROM shipto WHERE (trans_id = ?)|;
$form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $vc_id);
$query = qq|SELECT * FROM shipto WHERE (trans_id = ?)|;
$form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $vc_id);
+ if ($vc eq 'customer') {
+ $query = qq|SELECT * FROM additional_billing_addresses WHERE (customer_id = ?)|;
+ $form->{ADDITIONAL_BILLING_ADDRESSES} = selectall_hashref_query($form, $dbh, $query, $vc_id);
+ }
+
$query = qq|SELECT * FROM contacts WHERE (cp_cv_id = ?)|;
$form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $vc_id);
$query = qq|SELECT * FROM contacts WHERE (cp_cv_id = ?)|;
$form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $vc_id);
@@
-418,7
+424,7
@@
sub save_email_status {
. $main::locale->text('To (email)') . ": $form->{email}\n"
. "${cc}${bcc}"
. $main::locale->text('Subject') . ": $form->{subject}\n\n"
. $main::locale->text('To (email)') . ": $form->{email}\n"
. "${cc}${bcc}"
. $main::locale->text('Subject') . ": $form->{subject}\n\n"
- . $main::locale->text('Message') . ":
$form->{message}"
;
+ . $main::locale->text('Message') . ":
" . SL::HTML::Util->strip($form->{message})
;
$intnotes =~ s|\r||g;
$intnotes =~ s|\r||g;
@@
-588,8
+594,10
@@
sub copy_file_to_webdav_folder {
return;
}
return;
}
+ $form->{attachment_filename} ||= $form->generate_attachment_filename;
+
my $timestamp = get_current_formatted_time();
my $timestamp = get_current_formatted_time();
- my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->
generate_attachment_filename()
);
+ my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->
{attachment_filename}
);
$new_file =~ s{(.*)\.}{$1$timestamp\.};
if (!File::Copy::copy($current_file, $new_file)) {
$new_file =~ s{(.*)\.}{$1$timestamp\.};
if (!File::Copy::copy($current_file, $new_file)) {
@@
-598,6
+606,7
@@
sub copy_file_to_webdav_folder {
return $::locale->text("Copy file from #1 to #2 failed: #3", $current_file, $new_file, $ERRNO);
}
return $::locale->text("Copy file from #1 to #2 failed: #3", $current_file, $new_file, $ERRNO);
}
+ return;
$::lxdebug->leave_sub();
}
$::lxdebug->leave_sub();
}