X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fam.pl;h=7e760c27e9012d2f9f31dd964a6dfbe20656b288;hb=fc4e61993d9234665db7391ed5aec7aa1b6d6ea9;hp=56c48f3a9fc117baf61804b65bffe3d063943030;hpb=cff0e9be7e6925c22dab7cb0b52ab9e23af0d56a;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 56c48f3a9..7e760c27e 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -45,6 +45,8 @@ use SL::TODO;
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";
@@ -87,10 +89,17 @@ sub edit_account {
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})) {
@@ -256,6 +265,20 @@ sub account_header {
}
+ my $select_er = q|\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|\n|;
+ } else {
+ $select_er .= qq|\n|;
+ }
+
+ }
+
my $select_bwa = q|\n|;
my %bwapos = (
@@ -358,6 +381,7 @@ sub account_header {
select_bwa => $select_bwa,
select_bilanz => $select_bilanz,
select_eur => $select_eur,
+ select_er => $select_er,
};
# Ausgabe des Templates
@@ -575,7 +599,7 @@ sub delete_account {
$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!'));
@@ -750,7 +774,7 @@ sub language_header {
$::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) ],
});
@@ -816,7 +840,7 @@ sub config {
_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}
@@ -1619,7 +1643,7 @@ sub delete_warehouse {
$form->header();
print $form->parse_html_template('am/confirm_delete_warehouse');
- ::end_of_request();
+ $::dispatcher->end_request;
}
if (AM->delete_warehouse(\%myconfig, $form)) {