projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo in GuV Gruppenüberschrift
[kivitendo-erp.git]
/
SL
/
Common.pm
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
5342583
..
82cadbf
100644
(file)
--- a/
SL/Common.pm
+++ b/
SL/Common.pm
@@
-21,6
+21,7
@@
use File::Slurp;
use File::Spec;
use List::MoreUtils qw(apply);
use POSIX ();
use File::Spec;
use List::MoreUtils qw(apply);
use POSIX ();
+use Encode qw(decode);
use SL::DBUtils;
use SL::DBUtils;
@@
-355,7
+356,7
@@
sub webdav_folder {
my $base_path = $ENV{'SCRIPT_NAME'};
$base_path =~ s|[^/]+$||;
if (opendir my $dir, $path) {
my $base_path = $ENV{'SCRIPT_NAME'};
$base_path =~ s|[^/]+$||;
if (opendir my $dir, $path) {
- foreach my $file (sort { lc $a cmp lc $b } readdir $dir) {
+ foreach my $file (sort { lc $a cmp lc $b }
map { decode("UTF-8", $_) }
readdir $dir) {
next if (($file eq '.') || ($file eq '..'));
my $fname = $file;
next if (($file eq '.') || ($file eq '..'));
my $fname = $file;
@@
-396,11
+397,13
@@
sub get_vc_details {
vc.*,
pt.description AS payment_terms,
b.description AS business,
vc.*,
pt.description AS payment_terms,
b.description AS business,
- l.description AS language
+ l.description AS language,
+ dt.description AS delivery_terms
FROM ${vc} vc
LEFT JOIN payment_terms pt ON (vc.payment_id = pt.id)
LEFT JOIN business b ON (vc.business_id = b.id)
LEFT JOIN language l ON (vc.language_id = l.id)
FROM ${vc} vc
LEFT JOIN payment_terms pt ON (vc.payment_id = pt.id)
LEFT JOIN business b ON (vc.business_id = b.id)
LEFT JOIN language l ON (vc.language_id = l.id)
+ LEFT JOIN delivery_terms dt ON (vc.delivery_term_id = dt.id)
WHERE vc.id = ?|;
my $ref = selectfirst_hashref_query($form, $dbh, $query, $vc_id);
WHERE vc.id = ?|;
my $ref = selectfirst_hashref_query($form, $dbh, $query, $vc_id);
@@
-608,14
+611,14
@@
sub copy_file_to_webdav_folder {
foreach my $item (qw(tmpdir tmpfile type)){
next if $form->{$item};
$::lxdebug->message(LXDebug::WARN(), 'Missing parameter');
foreach my $item (qw(tmpdir tmpfile type)){
next if $form->{$item};
$::lxdebug->message(LXDebug::WARN(), 'Missing parameter');
- $::form->error($::locale->text("Missing parameter for
webdav
file copy"));
+ $::form->error($::locale->text("Missing parameter for
WebDAV
file copy"));
}
my ($webdav_folder, $document_name) = get_webdav_folder($form);
if (! $webdav_folder){
$::lxdebug->leave_sub();
}
my ($webdav_folder, $document_name) = get_webdav_folder($form);
if (! $webdav_folder){
$::lxdebug->leave_sub();
- $::form->error($::locale->text("Cannot check correct
webdav
folder"));
+ $::form->error($::locale->text("Cannot check correct
WebDAV
folder"));
return undef;
}
return undef;
}
@@
-644,7
+647,7
@@
sub copy_file_to_webdav_folder {
my $timestamp = get_current_formatted_time();
my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->generate_attachment_filename());
my $timestamp = get_current_formatted_time();
my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->generate_attachment_filename());
- $new_file
=~ s/\./$timestamp\./
;
+ $new_file
=~ s{(.*)\.}{$1$timestamp\.}
;
if (!File::Copy::copy($current_file, $new_file)) {
$::lxdebug->message(LXDebug::WARN(), "Copy file from $current_file to $new_file failed: $ERRNO");
if (!File::Copy::copy($current_file, $new_file)) {
$::lxdebug->message(LXDebug::WARN(), "Copy file from $current_file to $new_file failed: $ERRNO");