X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=7cc8c016278d4e30c1f527363f3da3f3d203722f;hb=786b3862388eb8d4cdcc5dfc663a37fe0e9a82a1;hp=0a2ab4c7ac62885b304ff28efde8851a0ed8cabb;hpb=7a7f33b5c1b3531ab761adba1cf19d4ad68cffcd;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 0a2ab4c7a..7cc8c0162 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -451,36 +451,22 @@ sub generate_report { my @hidden_variables = qw(accno source reference department description notes project_id datefrom dateto category l_subtotal); push @hidden_variables, map { "l_${_}" } @columns; - my (@options, $date_option); - if ($form->{accno}) { - push @options, $locale->text('Account') . " : $form->{accno} $form->{account_description}"; - } - if ($form->{source}) { - push @options, $locale->text('Source') . " : $form->{source}"; - } - if ($form->{reference}) { - push @options, $locale->text('Reference') . " : $form->{reference}"; - } + my (@options, @date_options); + push @options, $locale->text('Account') . " : $form->{accno} $form->{account_description}" if ($form->{accno}); + push @options, $locale->text('Source') . " : $form->{source}" if ($form->{source}); + push @options, $locale->text('Reference') . " : $form->{reference}" if ($form->{reference}); + push @options, $locale->text('Description') . " : $form->{description}" if ($form->{description}); + push @options, $locale->text('Notes') . " : $form->{notes}" if ($form->{notes}); + + push @date_options, $locale->text('From'), $locale->date(\%myconfig, $form->{datefrom}, 1) if ($form->{datefrom}); + push @date_options, $locale->text('Bis'), $locale->date(\%myconfig, $form->{dateto}, 1) if ($form->{dateto}); + push @options, join(' ', @date_options) if (scalar @date_options); + if ($form->{department}) { my ($department) = split /--/, $form->{department}; push @options, $locale->text('Department') . " : $department"; } - if ($form->{description}) { - push @options, $locale->text('Description') . " : $form->{description}"; - } - if ($form->{notes}) { - push @options, $locale->text('Notes') . " : $form->{notes}"; - } - if ($form->{datefrom}) { - $date_option = $locale->text('From') . " " . $locale->date(\%myconfig, $form->{datefrom}, 1); - } - if ($form->{dateto}) { - if ($form->{datefrom}) { - $date_option .= " "; - } - $date_option .= $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{dateto}, 1); - } - push @options, $date_option if $date_option; + my $callback = build_std_url('action=generate_report', @hidden_variables); @@ -827,6 +813,10 @@ sub display_rows { |; $memo = qq| |; + $source_hidden = qq| + |; + $memo_hidden = qq| + |; my $selected_accno_full; my ($accno_row) = split(/--/, $form->{"accno_$i"}); @@ -954,6 +944,8 @@ sub display_rows { |; } print qq| + $source_hidden + $memo_hidden |; } @@ -976,6 +968,9 @@ sub form_header { $show_details_checked = "checked" if $form->{show_details}; + $ob_transaction_checked = "checked" if $form->{ob_transaction}; + $cb_transaction_checked = "checked" if $form->{cb_transaction}; + # $locale->text('Add General Ledger Transaction') # $locale->text('Edit General Ledger Transaction') @@ -1169,7 +1164,17 @@ sub form_header { |; } - print qq| + print qq| + + + + +
+ | . $locale->text('OB Transaction') . qq| + + | . $locale->text('CB Transaction') . qq| +
+ | . $locale->text('Show details') . qq| |; @@ -1268,17 +1273,16 @@ $follow_ups_block |; } - print qq| + print qq| + |; } else { - if ($transdate > $closedto) { print qq| |; - } } print " @@ -1471,7 +1475,7 @@ sub post_transaction { # this is just for the wise guys $form->error($locale->text('Cannot post transaction for a closed period!')) - if ($transdate <= $closedto); + if ($form->date_closed($form->{"transdate"}, \%myconfig)); if ($form->round_amount($debit, 2) != $form->round_amount($credit, 2)) { $form->error($locale->text('Out of balance transaction!')); }