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;
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||[]} ];
}
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) } },
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') ],