+ if ( $::form->{note_id} ) {
+ $self->{note} = SL::DB::Note->new(id => $::form->{note_id})->load();
+
+ $self->{note_followup_link} = SL::DB::Manager::FollowUpLink->get_all(
+ query => [
+ 'follow_up.note_id' => $self->{note}->id,
+ trans_id => $self->{cv}->id,
+ trans_type => ($self->is_vendor() ? 'vendor' : 'customer'),
+ ],
+ with_objects => ['follow_up'],
+ )->[0];
+
+ $self->{note_followup} = $self->{note_followup_link}->follow_up;
+ } else {
+ $self->{note} = SL::DB::Note->new();
+ $self->{note_followup} = SL::DB::FollowUp->new();
+ $self->{note_followup_link} = SL::DB::FollowUpLink->new();
+ }