X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=SL%2FController%2FClientConfig.pm;h=c0c3593bbbb81c26fa58b65fe6ae0945935a27ce;hb=b4fc493375b77b6e27414fe3f7773f8b1add00fd;hp=ea5c1b0ed3a5881eb933acec1c6f7fdcb3b73a1f;hpb=744418aefbf02bc30b5dcc83fb8c2d1fd524964b;p=kivitendo-erp.git diff --git a/SL/Controller/ClientConfig.pm b/SL/Controller/ClientConfig.pm index ea5c1b0ed..c0c3593bb 100644 --- a/SL/Controller/ClientConfig.pm +++ b/SL/Controller/ClientConfig.pm @@ -18,7 +18,7 @@ use SL::Template; __PACKAGE__->run_before('check_auth'); use Rose::Object::MakeMethods::Generic ( - 'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates posting_options payment_options accounting_options inventory_options profit_options accounts) ], + 'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates posting_options payment_options accounting_options inventory_options profit_options accounts balance_startdate_method_options) ], ); sub action_edit { @@ -137,7 +137,7 @@ sub init_defaults { SL::DB::Default->get sub init_all_warehouses { SL::DB::Manager::Warehouse->get_all_sorted } sub init_all_languages { SL::DB::Manager::Language->get_all_sorted } sub init_all_currencies { SL::DB::Manager::Currency->get_all_sorted } -sub init_all_weightunits { my $unit = SL::DB::Manager::Unit->find_by(name => 'g'); $unit ? $unit->convertible_units : [] } +sub init_all_weightunits { my $unit = SL::DB::Manager::Unit->find_by(name => 'kg'); $unit ? $unit->convertible_units : [] } sub init_all_templates { +{ SL::Template->available_templates } } sub init_posting_options { @@ -167,6 +167,14 @@ sub init_profit_options { { title => t8("income"), value => "income" }, ] } +sub init_balance_startdate_method_options { + [ { title => t8("After closed period"), value => "closed_to" }, + { title => t8("Start of year"), value => "start_of_year" }, + { title => t8("All transactions"), value => "all_transactions" }, + { title => t8("Last opening balance or all transactions"), value => "last_ob_or_all_transactions" }, + { title => t8("Last opening balance or start of year"), value => "last_ob_or_start_of_year" }, ] +} + sub init_accounts { my %accounts;