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 {
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) = @_;
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>
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>
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