p.link_tag anstatt p.link in bank_transactions Templates
[kivitendo-erp.git] / SL / InstanceConfiguration.pm
index 13c4d1c..934cd77 100644 (file)
@@ -4,10 +4,11 @@ use strict;
 
 use Carp;
 use SL::DBUtils ();
+use SL::System::Process;
 
 use parent qw(Rose::Object);
 use Rose::Object::MakeMethods::Generic (
-  'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists) ],
+  'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists crm_installed) ],
 );
 
 sub init_data {
@@ -34,6 +35,10 @@ sub init_default_currency {
   return (SL::DBUtils::selectfirst_array_query($::form, $::form->get_standard_dbh, qq|SELECT name FROM currencies WHERE id = ?|, $self->data->{currency_id}))[0];
 }
 
+sub init_crm_installed {
+  return -f (SL::System::Process->exe_dir . '/crm/Changelog');
+}
+
 sub reload {
   my ($self) = @_;
 
@@ -93,9 +98,9 @@ C<$::instance_conf>.
 
 Creates a new instance. Does not read the configuration.
 
-=item C<init>
+=item C<crm_installed>
 
-Reads the configuration from the database. Returns C<$self>.
+Returns trueish if the CRM component is installed.
 
 =item C<get_currencies>
 
@@ -118,6 +123,13 @@ Returns the default inventory system, perpetual or periodic
 
 Returns the default profit determination method, balance or income
 
+=item C<get_balance_startdate_method>
+
+Returns the default method for determining the startdate for the balance
+report.
+
+Valid options:
+closed_to start_of_year all_transactions last_ob_or_all_transactions last_ob_or_start_of_year
 
 =item C<get_is_changeable>
 
@@ -222,6 +234,10 @@ Returns the configuration for storing documents in the corresponding WebDAV fold
 
 Returns the configuration for "vertreter"
 
+=item C<get_feature_experimental>
+
+Returns the configuration for experimental features
+
 =item C<get_parts_show_image>
 
 Returns the configuarion for show image in parts