X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fcp.pl;h=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hb=540030ff9826439d94f3f4292ab79b9be8795acc;hp=f4a9efb20eeb337b2185ee27672a372d3a5c7770;hpb=26456e6e241a4487e5b52c70e36d275eb073db5b;p=kivitendo-erp.git
diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl
index f4a9efb20..1f061ad8e 100644
--- a/bin/mozilla/cp.pl
+++ b/bin/mozilla/cp.pl
@@ -34,8 +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";
@@ -59,52 +60,63 @@ sub payment {
# setup customer/vendor selection for open invoices
if ($form->{all_vc}) {
+ # Dieser Zweig funktioniert derzeit NIE. Ggf. ganz raus oder
+ # alle offenen Zahlungen wieder korrekt anzeigen. jb 12.10.2010
$form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP});
} 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}"} };
}
- # departments
- if (@{ $form->{all_departments} || [] }) {
- $form->{selectdepartment} = "\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->{media} = "screen";
&form_header;
&form_footer;
@@ -113,56 +125,24 @@ sub payment {
}
sub form_header {
- $lxdebug->enter_sub();
+ $lxdebug->enter_sub;
$auth->assert('cash');
- my ($vc, $vclabel, $allvc, $arap, $department, $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|
-
- | . $locale->text('Exchangerate') . qq| |
- {exchangerate}>$form->{exchangerate} |
-
-|;
- } else {
- $exchangerate = qq|
-
- | . $locale->text('Exchangerate') . qq| |
- {exchangerate}> |
-
-|;
- }
- }
-
- foreach my $item ($form->{vc}, "account", "currency", $form->{ARAP}, "department") {
+ # bugfix 1771
+ # geändert von
+ # offen: $form->{ARAP} kann raus?
+ for my $item ($form->{vc}, "account", "currency", $form->{ARAP}) {
$form->{"select$item"} =~ s/ selected//;
- $form->{"select$item"} =~
- s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ $form->{"select$item"} =~ s/option value="\Q$form->{$item}\E">\Q$form->{$item}\E/option selected value="$form->{$item}">$form->{$item}/;
}
$vc =
@@ -170,347 +150,55 @@ sub form_header {
? qq||
: qq|{vc} size=35 value="$form->{$form->{vc}}">|;
- if ($form->{all_vc}) {
- $allvc = "checked";
- $form->{openinvoices} = "";
- } else {
- $allvc = "";
- $form->{openinvoices} = 1;
- }
+ $form->{openinvoices} = $form->{all_vc} ? "" : 1;
# $locale->text('AR')
# $locale->text('AP')
- $form->{jsscript} = 1;
- $jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
-
- text('button') . qq|> |
- |;
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "1", "datepaid", "BL", "trigger1");
- } else {
-
- # without JavaScript Calendar
- $button1 = qq|
- | |;
- }
- $form->{javascript} .= qq||;
$form->header;
$arap = lc $form->{ARAP};
$onload = qq|focus()|;
$onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
$onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
- print qq|
-
-
-
-
-
-