X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fcp.pl;h=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hb=02cb7e02771247f3106001076366d119277a7d30;hp=1f8f83aff7092eadd30db8fa31300ae1ec6319d2;hpb=1885c630e574acca0a1c2ce88971db1e8522ccaa;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 1f8f83aff..1f061ad8e 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -34,7 +34,9 @@ use SL::CP; use SL::IS; use SL::IR; -use strict ("vars", "subs"); +use SL::AR; +use SL::AP; +use strict; #use warnings; require "bin/mozilla/arap.pl"; @@ -64,27 +66,38 @@ sub payment { } else { CP->get_openvc(\%myconfig, \%$form); } - + # Auswahlliste für vc zusammenbauen + # Erweiterung für schliessende option und erweiterung um value + # für bugfix 1771 (doppelte Leerzeichen werden nicht 'gepostet') $form->{"select$form->{vc}"} = ""; if ($form->{"all_$form->{vc}"}) { # s.o. jb 12.10.2010 $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id}; - map { $form->{"select$form->{vc}"} .= "\n" } @{ $form->{"all_$form->{vc}"} }; } CP->paymentaccounts(\%myconfig, \%$form); + # Standard Konto für Umlaufvermögen + my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + # Entsprechend präventiv die Auswahlliste für Kontonummer + # auch mit value= zusammenbauen (s.a. oben bugfix 1771) + # Wichtig: Auch das Template anpassen, damit hidden input korrekt die " + # escaped. $form->{selectaccount} = ""; $form->{"select$form->{ARAP}"} = ""; - map { $form->{selectaccount} .= "\n"; + $form->{account} = "$_->{accno}--$_->{description}" if ($_->{accno} eq $accno_arap) } @{ $form->{PR}{"$form->{ARAP}_paid"} }; + + # Braucht man das hier überhaupt? Erstmal auskommentieren .. jan 18.12.2010 + # map { + # $form->{"select$form->{ARAP}"} .= + # "\n" } @curr; &form_header; @@ -110,55 +125,24 @@ sub payment { } sub form_header { - $lxdebug->enter_sub(); + $lxdebug->enter_sub; $auth->assert('cash'); - my ($vc, $vclabel, $allvc, $arap, $exchangerate); - my ($jsscript, $button1, $button2, $onload); - - $vclabel = ucfirst $form->{vc}; - $vclabel = $locale->text($vclabel); - - if ($form->{type} eq 'receipt') { - $form->{title} = $locale->text('Receipt'); - $form->{origtitle} = "Receipt"; - } - if ($form->{type} eq 'check') { - $form->{title} = $locale->text('Payment'); - $form->{origtitle} = "Payment"; - } - - # $locale->text('Customer') - # $locale->text('Vendor') + my ($vc, $arap, $exchangerate); + my ($onload); if ($form->{ $form->{vc} } eq "") { map { $form->{"addr$_"} = "" } (1 .. 4); } - - if ($form->{currency} ne $form->{defaultcurrency}) { - $form->{exchangerate} = - $form->format_amount(\%myconfig, $form->{exchangerate}); - if ($form->{forex}) { - $exchangerate = qq| -