Flags sollten unabhängig funktionieren, ausserdem in das im admin
bereich der hass.
use Rose::Object::MakeMethods::Generic
(
'scalar --get_set_init' => [ qw(client user group printer db_cfg is_locked
use Rose::Object::MakeMethods::Generic
(
'scalar --get_set_init' => [ qw(client user group printer db_cfg is_locked
- all_dateformats all_numberformats all_countrycodes all_countrymodes all_stylesheets all_menustyles all_clients all_groups all_users all_rights all_printers
+ all_dateformats all_numberformats all_countrycodes all_stylesheets all_menustyles all_clients all_groups all_users all_rights all_printers
all_dbsources all_used_dbsources all_accounting_methods all_inventory_systems all_profit_determinations all_charts) ],
);
all_dbsources all_used_dbsources all_accounting_methods all_inventory_systems all_profit_determinations all_charts) ],
);
return [ map { id => $_, title => $cc{$_} }, sort { $cc{$a} cmp $cc{$b} } keys %cc ];
}
return [ map { id => $_, title => $cc{$_} }, sort { $cc{$a} cmp $cc{$b} } keys %cc ];
}
-sub init_all_countrymodes {
- my %cm = SL::DefaultManager->country_modes;
- return [ map { id => $_, title => "$_ ($cm{$_})" }, sort keys %cm ];
-}
-
my ($self, %params) = @_;
$::form->{use_templates} = $self->defaults->templates ? 'existing' : 'new';
my ($self, %params) = @_;
$::form->{use_templates} = $self->defaults->templates ? 'existing' : 'new';
- $::form->{country_mode} = $self->defaults->country_mode;
customer_hourly_rate => { type => 'numeric', precision => 8, scale => 2 },
customer_projects_only_in_sales => { type => 'boolean', default => 'false', not_null => 1 },
customernumber => { type => 'text' },
customer_hourly_rate => { type => 'numeric', precision => 8, scale => 2 },
customer_projects_only_in_sales => { type => 'boolean', default => 'false', not_null => 1 },
customernumber => { type => 'text' },
- country_mode => { type => 'text', default => 'DE', not_null => 1 },
datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
-sub country_modes {
- my ($self) = @_;
- return (
- 'CH' => 'Switzerland',
- 'DE' => 'Germany',
- )
-}
-
sub AUTOLOAD {
our $AUTOLOAD;
sub AUTOLOAD {
our $AUTOLOAD;
use SL::Iconv;
use SL::Inifile;
use SL::System::InstallationLock;
use SL::Iconv;
use SL::Inifile;
use SL::System::InstallationLock;
# create the tables
$dbupdater->process_query($dbh, "sql/lx-office.sql");
# create the tables
$dbupdater->process_query($dbh, "sql/lx-office.sql");
+ # process update-scripts needed before 1st user-login
+ $self->create_schema_info_table($form, $dbh);
+ $dbupdater->process_query($dbh, "sql/Pg-upgrade2/defaults_add_precision.sql");
+ $dbh->do("INSERT INTO schema_info (tag, login) VALUES ('defaults_add_precision', 'admin')");
+
# load chart of accounts
$dbupdater->process_query($dbh, "sql/$form->{chart}-chart.sql");
# load chart of accounts
$dbupdater->process_query($dbh, "sql/$form->{chart}-chart.sql");
- $query = qq|UPDATE defaults SET coa = ?, accounting_method = ?, profit_determination = ?, inventory_system = ?, curr = ?|;
- do_query($form, $dbh, $query, map { $form->{$_} } qw(chart accounting_method profit_determination inventory_system defaultcurrency));
+ $query = qq|UPDATE defaults SET coa = ?, accounting_method = ?, profit_determination = ?, inventory_system = ?, curr = ?, precision = ?|;
+ do_query($form, $dbh, $query, map { $form->{$_} } qw(chart accounting_method profit_determination inventory_system defaultcurrency precision countrymode));
sub get_default_myconfig {
my ($self_or_class, %user_config) = @_;
sub get_default_myconfig {
my ($self_or_class, %user_config) = @_;
+ my $defaults = SL::DefaultManager->new($::lx_office_conf{system}->{default_manager});
+ countrycode => $defaults->language('de'),
css_path => 'css', # Needed for menunew, see SL::Layout::Base::get_stylesheet_for_user
css_path => 'css', # Needed for menunew, see SL::Layout::Base::get_stylesheet_for_user
- dateformat => 'dd.mm.yy',
- numberformat => '1.000,00',
+ dateformat => $defaults->dateformat('dd.mm.yy'),
+ numberformat => $defaults->numberformat('1.000,00'),
stylesheet => 'kivitendo.css',
stylesheet => 'kivitendo.css',
+ timeformat => $defaults->timeformat('hh:mm'),
+++ /dev/null
--- @tag: defaults_add_country_mode
--- @description: adds new column 'country_mode' (ISO-3166) in table defaults used for erp.ini
--- @depends: release_3_2_0
-ALTER TABLE defaults ADD COLUMN country_mode TEXT NOT NULL DEFAULT('DE');
-
<td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
</tr>
<td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
</tr>
- <tr>
- <th valign="top" align="right" nowrap>[% LxERP.t8('Country') %]</th>
- <td>[% L.select_tag('countrymode', SELF.all_countrymodes, title_key="title", default=(FORM.countrymode), onchange='select_country_defaults(this.value)') %]</td>
- </tr>
-
<tr>
<td colspan="1"> </td>
<td><hr size="1" noshade></td>
<tr>
<td colspan="1"> </td>
<td><hr size="1" noshade></td>