X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0e68056cbc17b531266c16454f3a74ae1e57dea6..a809ab0a8e5c2f991ebbad1ccda9f31f1c009c7c:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index a61a6c8bb..0aad56ef5 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -467,7 +467,7 @@ sub header { # standard css for all # this should gradually move to the layouts that need it $layout->use_stylesheet("$_.css") for qw( - main menu list_accounts jquery.autocomplete + main menu common list_accounts jquery.autocomplete jquery.multiselect2side ui-lightness/jquery-ui jquery-ui.custom @@ -476,7 +476,7 @@ sub header { $layout->use_javascript("$_.js") for (qw( jquery jquery-ui jquery.cookie jquery.checkall jquery.download jquery/jquery.form jquery/fixes client_js - common part_selection switchmenuframe autocomplete_part + common part_selection switchmenuframe ), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}"); $self->{favicon} ||= "favicon.ico"; @@ -1137,7 +1137,7 @@ sub parse_template { $full_signature =~ s/\n/
\n/g; $mail->{message} .= $full_signature; - open(IN, "<", $self->{tmpfile}) + open(IN, "<:encoding(UTF-8)", $self->{tmpfile}) or $self->error($self->cleanup . "$self->{tmpfile} : $!"); $mail->{message} .= $_ while ; close(IN); @@ -1235,6 +1235,7 @@ sub get_formname_translation { sales_delivery_order => $main::locale->text('Delivery Order'), purchase_delivery_order => $main::locale->text('Delivery Order'), dunning => $main::locale->text('Dunning'), + letter => $main::locale->text('Letter') ); $main::lxdebug->leave_sub(); @@ -1249,8 +1250,13 @@ sub get_number_prefix_for_type { (first { $self->{type} eq $_ } qw(invoice credit_note)) ? 'inv' : ($self->{type} =~ /_quotation$/) ? 'quo' : ($self->{type} =~ /_delivery_order$/) ? 'do' + : ($self->{type} =~ /letter/) ? 'letter' : 'ord'; + # better default like this? + # : ($self->{type} =~ /(sales|purcharse)_order/ : 'ord'; + # : 'prefix_undefined'; + $main::lxdebug->leave_sub(); return $prefix; } @@ -1326,7 +1332,7 @@ sub cleanup { push @err, $::locale->text('The application "#1" was not found on the system.', $application || 'pdflatex') . ' ' . $::locale->text('Please contact your administrator.'); } elsif (-f "$self->{tmpfile}.err") { - open(FH, "$self->{tmpfile}.err"); + open(FH, "<:encoding(UTF-8)", "$self->{tmpfile}.err"); @err = ; close(FH); } @@ -2387,7 +2393,7 @@ sub get_lists { if ($params{contacts} || $params{shipto}) { $vc = 'customer' if $self->{"vc"} eq "customer"; $vc = 'vendor' if $self->{"vc"} eq "vendor"; - die "invalid use of get_lists, need 'vc'"; + die "invalid use of get_lists, need 'vc'" unless $vc; $vc_id = $self->{"${vc}_id"}; } @@ -2430,7 +2436,7 @@ sub get_lists { } if ($params{"salesmen"}) { - $self->_get_employees($dbh, "all_salesmen", $params{"salesmen"}); + $self->_get_employees($dbh, $params{"salesmen"}); } if ($params{"business_types"}) {