X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fca.pl;h=b45c36d6401834e45f214e600fa55c988214b76e;hb=81d7a3d732eac0e68a4edc8306e48532e9deb637;hp=497ee6157483da95df7ec11567853eef6be8bd73;hpb=ec022a581e19d03e34ae31e7ba53ee4dde66ea73;p=kivitendo-erp.git
diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl
index 497ee6157..b45c36d64 100644
--- a/bin/mozilla/ca.pl
+++ b/bin/mozilla/ca.pl
@@ -37,7 +37,7 @@ use POSIX qw(strftime);
use SL::CA;
use SL::ReportGenerator;
-require "bin/mozilla/report_generator.pl";
+require "bin/mozilla/reportgenerator.pl";
1;
@@ -74,6 +74,8 @@ require "bin/mozilla/report_generator.pl";
sub chart_of_accounts {
$lxdebug->enter_sub();
+ $auth->assert('report');
+
$form->{title} = $locale->text('Chart of Accounts');
CA->all_accounts(\%myconfig, \%$form);
@@ -105,6 +107,7 @@ sub chart_of_accounts {
my %totals = ('debit' => 0, 'credit' => 0);
foreach my $ca (@{ $form->{CA} }) {
+ next unless defined $ca->{amount};
my $row = { };
foreach (qw(debit credit)) {
@@ -136,8 +139,11 @@ sub chart_of_accounts {
sub list {
$lxdebug->enter_sub();
+ $auth->assert('report');
+
$form->{title} = $locale->text('List Transactions');
$form->{title} .= " - " . $locale->text('Account') . " $form->{accno}";
+ $year = (localtime)[5] + 1900;
# get departments
$form->all_departments(\%myconfig);
@@ -156,13 +162,76 @@ sub list {
|
| if $form->{selectdepartment};
+ $accrual = ($eur) ? "" : "checked";
+ $cash = ($eur) ? "checked" : "";
+
+ $name_1 = "fromdate";
+ $id_1 = "fromdate";
+ $value_1 = "$form->{fromdate}";
+ $trigger_1 = "trigger1";
+ $name_2 = "todate";
+ $id_2 = "todate";
+ $value_2 = "";
+ $trigger_2 = "trigger2";
+
+
+ # with JavaScript Calendar
+ if ($form->{jsscript}) {
+ if ($name_1 eq "") {
+
+ $button1 = qq|
+ |;
+ $button1_2 = qq|
+ text('button') . qq|>|;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "$name_2", "BR", "$trigger_2");
+ } else {
+ $button1 = qq|
+ |;
+ $button1_2 = qq|
+ text('button') . qq|>|;
+ $button2 = qq|
+ |;
+ $button2_2 = qq|
+ text('button') . qq|>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "$name_1", "BR", "$trigger_1",
+ "$name_2", "BL", "$trigger_2");
+ }
+ } else {
+
+ # without JavaScript Calendar
+ if ($name_1 eq "") {
+ $button1 =
+ qq||;
+ } else {
+ $button1 =
+ qq||;
+ $button2 =
+ qq||;
+ }
+ }
+ $form->{javascript} .= qq||;
+ $form->header;
+ $onload = qq|focus()|;
+ $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
+ $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
+
$form->header;
$form->{description} =~ s/\"/"/g;
print qq|
-
+