# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
#======================================================================
#
# administration
use SL::DB::Printer;
use SL::DB::Tax;
use SL::DB::Language;
+use SL::DB::Default;
+use SL::DBUtils qw(selectall_array_query);
use CGI;
require "bin/mozilla/common.pl";
my $form = $main::form;
my %myconfig = %main::myconfig;
+ my $defaults = SL::DB::Default->get;
$main::auth->assert('config');
$form->{title} = "Edit";
+ $form->{feature_balance} = $defaults->feature_balance;
+ $form->{feature_datev} = $defaults->feature_datev;
+ $form->{feature_erfolgsrechnung} = $defaults->feature_erfolgsrechnung;
+ $form->{feature_eurechnung} = $defaults->feature_eurechnung;
+ $form->{feature_ustva} = $defaults->feature_ustva;
+
AM->get_account(\%myconfig, \%$form);
foreach my $item (split(/:/, $form->{link})) {
}
+ my $select_er = q|<option value=""> |. $locale->text('None') .q|</option>\n|;
+ my %er = (
+ 1 => "Ertrag",
+ 6 => "Aufwand");
+ foreach my $item (sort({ $a <=> $b } keys(%er))) {
+ my $text = H($::locale->{iconv_utf8}->convert($er{$item}));
+ if ($item == $form->{pos_er}) {
+ $select_er .= qq|<option value=$item selected>|. sprintf("%.2d", $item) .qq|. $text</option>\n|;
+ } else {
+ $select_er .= qq|<option value=$item>|. sprintf("%.2d", $item) .qq|. $text</option>\n|;
+ }
+
+ }
+
my $select_bwa = q|<option value=""> |. $locale->text('None') .q|</option>\n|;
my %bwapos = (
select_bwa => $select_bwa,
select_bilanz => $select_bilanz,
select_eur => $select_eur,
+ select_er => $select_er,
};
# Ausgabe des Templates
$form->{title} = $locale->text('Delete Account');
foreach my $id (
- qw(inventory_accno_id income_accno_id expense_accno_id fxgain_accno_id fxloss_accno_id)
+ qw(inventory_accno_id income_accno_id expense_accno_id fxgain_accno_id fxloss_accno_id rndgain_accno_id rndloss_accno_id)
) {
if ($form->{id} == $form->{$id}) {
$form->error($locale->text('Cannot delete default account!'));
$::form->header;
print $::form->parse_html_template('am/language_header', {
- numberformats => [ '1,000.00', '1000.00', '1.000,00', '1000,00' ],
+ numberformats => [ '1,000.00', '1000.00', '1.000,00', '1000,00', "1'000.00" ],
dateformats => [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ],
});
_build_cfg_options('dateformat', qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd));
_build_cfg_options('timeformat', qw(hh:mm hh:mm:ss));
- _build_cfg_options('numberformat', ('1,000.00', '1000.00', '1.000,00', '1000,00'));
+ _build_cfg_options('numberformat', ('1,000.00', '1000.00', '1.000,00', '1000,00', "1'000.00"));
my @formats = ();
if ($::lx_office_conf{print_templates}->{opendocument}
$myconfig{show_form_details} = 1 unless (defined($myconfig{show_form_details}));
$form->{CAN_CHANGE_PASSWORD} = $main::auth->can_change_password();
- $form->{todo_cfg} = { TODO->get_user_config('login' => $form->{login}) };
+ $form->{todo_cfg} = { TODO->get_user_config('login' => $::myconfig{login}) };
- $form->{title} = $locale->text('Edit Preferences for #1', $form->{login});
+ $form->{title} = $locale->text('Edit Preferences for #1', $::myconfig{login});
$form->header();
$form->{stylesheet} = $form->{usestylesheet};
- TODO->save_user_config('login' => $form->{login}, %{ $form->{todo_cfg} || { } });
+ TODO->save_user_config('login' => $::myconfig{login}, %{ $form->{todo_cfg} || { } });
if (AM->save_preferences($form)) {
if ($::auth->can_change_password()
$form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result)));
}
- $::auth->change_password($form->{login}, $form->{new_password});
+ $::auth->change_password($::myconfig{login}, $form->{new_password});
}
$form->redirect($locale->text('Preferences saved!'));
$form->header();
print $form->parse_html_template('am/confirm_delete_warehouse');
- ::end_of_request();
+ $::dispatcher->end_request;
}
if (AM->delete_warehouse(\%myconfig, $form)) {