]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/TimeRecording.pm
restart apache2 in postinst
[mfinanz.git] / SL / Controller / TimeRecording.pm
index 930f346d6fcb9960fdfb7a7705153f5dd7d05efa..32974e13fcf9ececb60ce78ca9a9a5ecf4fbefc4 100644 (file)
@@ -102,7 +102,7 @@ sub action_mark_as_booked {
 sub action_edit {
   my ($self) = @_;
 
-  $::request->{layout}->use_javascript("${_}.js") for qw(kivi.TimeRecording ckeditor/ckeditor ckeditor/adapters/jquery kivi.Validator);
+  $::request->{layout}->use_javascript("${_}.js") for qw(kivi.TimeRecording kivi.Validator);
 
   if ($self->use_duration) {
     flash('warning', t8('This entry is using start and end time. This information will be overwritten on saving.')) if !$self->time_recording->is_duration_used;
@@ -274,8 +274,8 @@ sub init_all_time_recording_articles {
 
 sub init_all_orders {
   my $orders = SL::DB::Manager::Order->get_all(query => [or             => [ closed    => 0, closed    => undef, id => $_[0]->time_recording->order_id ],
-                                                         or             => [ quotation => 0, quotation => undef ],
-                                                         '!customer_id' => undef]);
+                                                         record_type    => 'sales_order',
+                                                        ]);
   return [ map { [$_->id, sprintf("%s %s", $_->number, $_->customervendor->name) ] } sort { $a->number <=> $b->number } @{$orders||[]} ];
 }
 
@@ -322,7 +322,7 @@ sub prepare_report {
     order        => { text => t8('Sales Order'),  sub => sub { $_[0]->order && $_[0]->order->number } },
     customer     => { text => t8('Customer'),     sub => sub { $_[0]->customer->displayable_name } },
     part         => { text => t8('Article'),      sub => sub { $_[0]->part && $_[0]->part->displayable_name } },
-    project      => { text => t8('Project'),      sub => sub { $_[0]->project && $_[0]->project->full_description(sytle => 'both') } },
+    project      => { text => t8('Project'),      sub => sub { $_[0]->project && $_[0]->project->full_description(style => 'both') } },
     description  => { text => t8('Description'),  sub => sub { $_[0]->description_as_stripped_html },
                       raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?)
                       obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) }  },
@@ -373,7 +373,7 @@ sub make_filter_summary {
   my @filter_strings;
 
   my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name                         : '';
-  my $project      = $filter->{project_id}      ? SL::DB::Project->new (id => $filter->{project_id})     ->load->full_description(sytle => 'both') : '';
+  my $project      = $filter->{project_id}      ? SL::DB::Project->new (id => $filter->{project_id})     ->load->full_description(style => 'both') : '';
 
   my @filters = (
     [ $filter->{"date:date::ge"},                              t8('From Date')       ],