X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/2a0a1717444f8b0b71497c8b52275e0573db5136..ffac48200e07de28e9efcb20c668ba3f1e3ed12e:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index a7ed01b73..55ee46d4c 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -695,6 +695,8 @@ sub init_template { return $self->template if $self->template; + # Force scripts/locales.pl to pick up the exception handling template. + # parse_html_template('generic/exception') return $self->template(Template->new({ 'INTERPOLATE' => 0, 'EVAL_PERL' => 0, @@ -704,6 +706,7 @@ sub init_template { 'INCLUDE_PATH' => '.:templates/webpages', 'COMPILE_EXT' => '.tcc', 'COMPILE_DIR' => $::lx_office_conf{paths}->{userspath} . '/templates-cache', + 'ERROR' => 'templates/webpages/generic/exception.html', })) || die; } @@ -788,10 +791,8 @@ sub write_trigger { # default my %dateformats = ( "dd.mm.yy" => "%d.%m.%Y", - "dd-mm-yy" => "%d-%m-%Y", "dd/mm/yy" => "%d/%m/%Y", "mm/dd/yy" => "%m/%d/%Y", - "mm-dd-yy" => "%m-%d-%Y", "yyyy-mm-dd" => "%Y-%m-%d", ); @@ -871,6 +872,8 @@ sub format_amount { $amount = 0; } + $amount *= 1; + # Hey watch out! The amount can be an exponential term like 1.13686837721616e-13 my $neg = ($amount =~ s/^-//); @@ -2576,7 +2579,8 @@ sub all_vc { # setup sales contacts $query = qq|SELECT e.id, e.name FROM employee e - WHERE (e.sales = '1') AND (NOT e.id = ?)|; + WHERE (e.sales = '1') AND (NOT e.id = ?) + ORDER BY name|; $self->{all_employees} = selectall_hashref_query($self, $dbh, $query, $self->{employee_id}); # this is for self @@ -2584,11 +2588,6 @@ sub all_vc { { id => $self->{employee_id}, name => $self->{employee} }); - # sort the whole thing - @{ $self->{all_employees} } = - sort { $a->{name} cmp $b->{name} } @{ $self->{all_employees} }; - - # prepare query for departments $query = qq|SELECT id, description FROM department