X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=0c7f7350c5fe98e1e741d104ebfe140ee83e1402;hb=62b026b8af03542b3d1c83519939588f7c8f7276;hp=a34572fbfe07978f6dc3db206a6e2de1d1bee8ce;hpb=d319704a66e9be64da837ccea10af6774c2b0838;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index a34572fbf..0c7f7350c 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} = "