X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInstanceConfiguration.pm;h=59ca8a0352920f51a08a9e5b2d9d4b630b535fa9;hb=e450ac3003c9abe0e769e99e9e71a3eabbc7ed14;hp=13c4d1c5e62733e417800501105a566faa526043;hpb=83fb0fe04ed0f7855c4d54f91a5fc508c47e058e;p=kivitendo-erp.git diff --git a/SL/InstanceConfiguration.pm b/SL/InstanceConfiguration.pm index 13c4d1c5e..59ca8a035 100644 --- a/SL/InstanceConfiguration.pm +++ b/SL/InstanceConfiguration.pm @@ -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 +=item C -Reads the configuration from the database. Returns C<$self>. +Returns trueish if the CRM component is installed. =item C @@ -118,6 +123,13 @@ Returns the default inventory system, perpetual or periodic Returns the default profit determination method, balance or income +=item C + +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 @@ -164,7 +176,7 @@ Returns the default behavior for showing best before date, true or false =item C -Returns the default behavior for showing the mark as paid button for the +Returns the default behavior for showing the "mark as paid" button for the corresponding record type (true or false). =item C @@ -193,11 +205,9 @@ current stock quantity =item C -Returns the default bin_id for transfers without checking the. +Returns the default bin_id for transfers without checking the current stock quantity - - =item C =item C @@ -222,6 +232,14 @@ Returns the configuration for storing documents in the corresponding WebDAV fold Returns the configuration for "vertreter" +=item C + +Returns the configuration for experimental feature "assortment" + +=item C + +Returns the configuration for the experimental feature "order" + =item C Returns the configuarion for show image in parts @@ -232,7 +250,7 @@ Returns the css format string for images shown in parts =item C -Returns the configuartion for showing the picture in the results when you search for parts +Returns the configuration for showing the picture in the results when you search for parts =back