+sub init_employees        { SL::DB::Manager::Employee->get_all_sorted   }
+sub init_may_edit_invoice_permissions { $::auth->assert('project_edit_view_invoices_permission', 1) }
+sub init_cvar_configs                 { SL::DB::Manager::CustomVariableConfig->get_all_sorted(where => [ module => 'Projects' ]) }
+sub init_includeable_cvar_configs     { [ grep { $_->includeable } @{ $_[0]->cvar_configs } ] };
+
+sub init_include_cvars {
+  my ($self) = @_;
+  return { map { ($_->name => $::form->{"include_cvars_" . $_->name}) }       @{ $self->cvar_configs } } if $::form->{_include_cvars_from_form};
+  return { map { ($_->name => ($_->includeable && $_->included_by_default)) } @{ $self->cvar_configs } };
+}
+
+sub init_linked_records {
+  my ($self) = @_;
+  return [
+    map  { @{ $_ } }
+    grep { $_      } (
+      SL::DB::Manager::Invoice->        get_all(where        => [ invoice => 1, or => [ globalproject_id => $self->project->id, 'invoiceitems.project_id' => $self->project->id ] ],
+                                                with_objects => [ 'invoiceitems', 'customer' ],
+                                                distinct     => [ 'customer' ],
+                                                sort_by       => 'transdate ASC'),
+      SL::DB::Manager::Invoice->        get_all(where        => [ invoice => 0, or => [ globalproject_id => $self->project->id, 'transactions.project_id' => $self->project->id ] ],
+                                                with_objects => [ 'transactions', 'customer' ],
+                                                distinct     => [ 'customer' ],
+                                                sort_by       => 'transdate ASC'),
+      SL::DB::Manager::PurchaseInvoice->get_all(where => [ invoice => 1,
+                                                           or => [ globalproject_id => $self->project->id, 'invoiceitems.project_id' => $self->project->id ]
+                                                         ],
+                                                with_objects => [ 'invoiceitems', 'vendor' ],
+                                                distinct     => [ 'customer' ],
+                                                sort_by => 'transdate ASC'),
+      SL::DB::Manager::PurchaseInvoice->get_all(where => [ invoice => 0,
+                                                           or => [ globalproject_id => $self->project->id, 'transactions.project_id' => $self->project->id ]
+                                                         ],
+                                                with_objects => [ 'transactions', 'vendor' ],
+                                                distinct     => [ 'customer' ],
+                                                sort_by => 'transdate ASC'),
+      SL::DB::Manager::GLTransaction->  get_all(where => [ 'transactions.project_id' => $self->project->id ],
+                                                with_objects => [ 'transactions' ],
+                                                distinct     => 1,
+                                                sort_by => 'transdate ASC'),
+      SL::DB::Manager::Order->          get_all(where => [ or => [ globalproject_id => $self->project->id, 'orderitems.project_id' => $self->project->id ] ],
+                                                with_objects => [ 'orderitems', 'customer', 'vendor' ],
+                                                distinct => [ 'customer', 'vendor' ],
+                                                sort_by => 'transdate ASC' ),
+      SL::DB::Manager::DeliveryOrder->  get_all(where => [ or => [ globalproject_id => $self->project->id, 'orderitems.project_id' => $self->project->id ] ],
+                                                with_objects => [ 'orderitems', 'customer', 'vendor' ],
+                                                distinct => [ 'customer', 'vendor' ],
+                                                sort_by => 'transdate ASC'),
+    )];
+}
+