X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fcp.pl;h=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hb=67079598f8f98a12e12a8acddc3afbf12bb58c5d;hp=b3efdec57d25e0cac2dcd1763300ddb455a32f17;hpb=526095511932c413bb012aac5d6092bdb1d14c3c;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index b3efdec57..1f061ad8e 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -36,7 +36,7 @@ use SL::IS; use SL::IR; use SL::AR; use SL::AP; -use strict ("vars", "subs"); +use strict; #use warnings; require "bin/mozilla/arap.pl"; @@ -66,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; @@ -112,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| -