pdonumber = ?,
curr = ?,
businessnumber = ?,
- weightunit = ?|;
+ weightunit = ?,
+ language_id = ?|;
my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno},
$accnos{fxgain_accno}, $accnos{fxloss_accno}, $accnos{ar_paid_accno},
$form->{invnumber}, $form->{cnnumber},
$form->{articlenumber}, $form->{servicenumber},
$form->{sdonumber}, $form->{pdonumber},
$currency,
- $form->{businessnumber}, $form->{weightunit});
+ $form->{businessnumber}, $form->{weightunit},
+ $form->{language_id});
do_query($form, $dbh, $query, @values);
$dbh->commit();
accounting_method => { type => 'text' },
inventory_system => { type => 'text' },
profit_determination => { type => 'text' },
+ language_id => { type => 'integer' },
],
primary_key_columns => [ 'id' ],
map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
+ # default language
+ my @ALL_LANGUAGES = SL::DB::Manager::Language->get_all;
+
# EÜR = cash, Bilanzierung = accrual
foreach my $key (keys %{ $form->{IC} }) {
$form->{title} = $locale->text('Ranges of numbers and default accounts');
$form->header();
- print $form->parse_html_template('am/edit_defaults');
+ print $form->parse_html_template('am/edit_defaults',
+ { ALL_LANGUAGES => @ALL_LANGUAGES, });
$main::lxdebug->leave_sub();
}
use SL::CT;
use SL::CVar;
use SL::DB::Business;
+use SL::DB::Default;
use SL::ReportGenerator;
require "bin/mozilla/common.pl";
$form->{NOTES} ||= [ ];
+ if (!$form->{'language_id'}) {
+ my $l_id = SL::DB::Default->get->{'language_id'};
+ if ($l_id) {
+ $form->{'default_language_id'} = $l_id;
+ }
+ }
+
$form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'CT', 'trans_id' => $form->{id});
CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} });
--- /dev/null
+-- @tag: defaults_add_language_id
+-- @description: Id der Standardsprache in defaults speichern
+-- @depends: release_2_6_2
+-- @charset: utf-8
+ALTER TABLE defaults ADD COLUMN language_id integer;
</td>
</tr>
+ <tr>
+ <th align="right">[% 'Language' | $T8 %]</th>
+ <td>
+ [%- INCLUDE 'generic/multibox.html'
+ name = 'language_id',
+ default = defaults_language_id,
+ style = 'size:20; maxength:5',
+ DATA = ALL_LANGUAGES,
+ id_key = 'id',
+ label_key = 'description',
+ -%]
+ </td>
+ </tr>
+
<tr class="listheading">
<th colspan="4">[% 'Configuration' | $T8 %]</th>
</tr>
<td>
[%- INCLUDE generic/multibox.html
name = 'language_id',
+ default = default_language_id,
DATA = languages,
show_empty = 1,
id_key = 'id',