X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=ae476bd17ee77a78bc52bb50664f8adc1087b4e2;hb=1043d7f814fccf5864e677b1e38577d0a150026c;hp=185e2a5878dae3bb1ac58ed8ba54c552a0b41f64;hpb=e325dbd23c2a6321fbe838e8f67bb3e443297b64;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 185e2a587..ae476bd17 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -41,6 +41,7 @@ use SL::PE; use SL::ReportGenerator; require "bin/mozilla/common.pl"; +require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; 1; @@ -80,11 +81,14 @@ sub add { $auth->assert('general_ledger'); + return $lxdebug->leave_sub() if (load_draft_maybe()); + $form->{title} = "Add"; $form->{callback} = "gl.pl?action=add" unless $form->{callback}; # we use this only to set a default date + # yep. aber er holt hier auch schon ALL_CHARTS. Aufwand / Nutzen? jb GL->transaction(\%myconfig, \%$form); map { @@ -508,7 +512,8 @@ sub generate_report { my %column_alignment; map { $column_alignment{$_} = 'right' } qw(balance id debit credit debit_tax credit_tax balance); - map { $column_alignment{$_} = 'center' } qw(transdate reference description source notes debit_accno credit_accno debit_tax_accno credit_tax_accno); + map { $column_alignment{$_} = 'center' } qw(reference debit_accno credit_accno debit_tax_accno credit_tax_accno); + map { $column_alignment{$_} = 'left' } qw(description source notes); map { $column_defs{$_}->{align} = $column_alignment{$_} } keys %column_alignment; my $report = SL::ReportGenerator->new(\%myconfig, $form); @@ -792,6 +797,9 @@ sub display_rows { my %charts = (); my $taxchart_init; foreach my $item (@{ $form->{ALL_CHARTS} }) { + if ($item->{charttype} eq 'H'){ #falls überschrift + next; #überspringen (Bug 1150) + } my $key = $item->{accno} . "--" . $item->{tax_id}; $taxchart_init = $item->{tax_id} unless (@chart_values); push(@chart_values, $key); @@ -1292,9 +1300,20 @@ $follow_ups_block . qq|"> |; } else { + if ($form->{draft_id}) { + my $remove_draft_checked = 'checked' if ($form->{remove_draft}); + print qq|

\n| + . qq| | + . qq| \n| + . qq|

\n|; + } + print qq| - |; + | + . NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), '-class' => 'submit')) + . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) + . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]); } print " @@ -1519,6 +1538,8 @@ sub post { post_transaction(); + remove_draft() if $form->{remove_draft}; + $form->{callback} = build_std_url("action=add", "show_details"); $form->redirect($form->{callback});