X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=6d4cb661efeb8f9310a782c2be8b314e8da12b3c;hb=264b38c7465f95066b47588c2fbe85f102bd022c;hp=e0a5811d24525ad81de0b84c2d53761593acfffe;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index e0a5811d2..6d4cb661e 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -34,8 +34,6 @@ use SL::GL; use SL::PE; -use Data::Dumper; - require "$form->{path}/arap.pl"; 1; @@ -92,7 +90,9 @@ sub add { . ($_->{rate} * 100) . qq| %| } @{ $form->{TAX} }; - $form->{chart} = $chart; + $form->{chart} = $chart; + $form->{chartinit} = $chart; + $form->{rowcount} = 2; $form->{debitchart} = $chart; $form->{creditchart} = $chart; @@ -102,9 +102,6 @@ sub add { $form->{credit} = 0; $form->{tax} = 0; - $form->{creditrowcount} = 2; - $form->{debitrowcount} = 2; - # departments $form->all_departments(\%myconfig); if (@{ $form->{all_departments} }) { @@ -116,77 +113,29 @@ sub add { } (@{ $form->{all_departments} }); } - &display_form; - + &display_form(1); $lxdebug->leave_sub(); + } sub edit { $lxdebug->enter_sub(); GL->transaction(\%myconfig, \%$form); - - map { - if ($form->{debitaccno} eq $_->{accno}) { - $form->{debitchart} .= - "" } @{ $form->{chart} }; - $form->{chart} = $chart; + map { $tax .= qq|"; - $form->{debitchart} = - ""; - } else { - $form->{creditchart} = $form->{chart}; - $form->{creditchart} =~ - s/value=\"$form->{creditchartselected}\"/value=\"$form->{creditchartselected}\" selected/; - - $form->{debitchart} = $form->{chart}; - $form->{debitchart} =~ - s/value=\"$form->{debitchartselected}\"/value=\"$form->{debitchartselected}\" selected/; + if ($form->{transdate} ne $form->{oldtransdate}) { + if ($form->{selectprojectnumber}) { + $form->all_projects(\%myconfig, undef, $form->{transdate}); + if (@{ $form->{all_project} }) { + $form->{selectprojectnumber} = "