projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Anpassung an check_right_number_format und check_right_date_format aus der common.js
[kivitendo-erp.git]
/
bin
/
mozilla
/
cp.pl
diff --git
a/bin/mozilla/cp.pl
b/bin/mozilla/cp.pl
index
a80e8e1
..
2e58c8f
100644
(file)
--- a/
bin/mozilla/cp.pl
+++ b/
bin/mozilla/cp.pl
@@
-87,7
+87,7
@@
sub payment {
} @{ $form->{PR}{ $form->{ARAP} } };
# currencies
} @{ $form->{PR}{ $form->{ARAP} } };
# currencies
- @curr = split
/:/, $form->{currencies}
;
+ @curr = split
(/:/, $form->{currencies})
;
chomp $curr[0];
$form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
$curr[0];
chomp $curr[0];
$form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
$curr[0];
@@
-483,14
+483,7
@@
sub form_footer {
print qq|
<select name=format>$format</select>
<select name=media>$media</select>
print qq|
<select name=format>$format</select>
<select name=media>$media</select>
-|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
- print qq|
</form>
</body>
</form>
</body>
@@
-603,7
+596,10
@@
sub update {
}
# recalculate
}
# recalculate
- $amount = $form->{amount};
+
+ # Modified from $amount = $form->{amount} by J.Zach to update amount to total
+ # payment amount in Zahlungsausgang
+ $amount = 0;
for $i (1 .. $form->{rowcount}) {
map {
for $i (1 .. $form->{rowcount}) {
map {
@@
-618,7
+614,9
@@
sub update {
$form->{"paid_$i"} = $form->{"due_$i"};
}
$form->{"paid_$i"} = $form->{"due_$i"};
}
- $amount -= $form->{"paid_$i"};
+ # Modified by J.Zach, see abovev
+ $amount += $form->{"paid_$i"};
+
} else {
$form->{"paid_$i"} = "";
}
} else {
$form->{"paid_$i"} = "";
}
@@
-630,6
+628,9
@@
sub update {
}
}
+ # Line added by J.Zach, see above
+ $form->{amount}=$amount;
+
&form_header;
&list_invoices;
&form_footer;
&form_header;
&list_invoices;
&form_footer;
@@
-667,7
+668,7
@@
sub print {
&check_form;
&check_form;
- ($whole, $form->{decimal}) = split
/\./, $form->{amount}
;
+ ($whole, $form->{decimal}) = split
(/\./, $form->{amount})
;
$form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
$form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
@@
-754,7
+755,7
@@
sub check_form {
$form->{amount} = $amount;
for $i (1 .. $form->{rowcount}) {
$form->{amount} = $amount;
for $i (1 .. $form->{rowcount}) {
- if ($form->
{"paid_$i"}
) {
+ if ($form->
parse_amount(\%myconfig, $form->{"paid_$i"})
) {
$amount -= $form->parse_amount($myconfig, $form->{"paid_$i"});
push(@{ $form->{paid} }, $form->{"paid_$i"});
$amount -= $form->parse_amount($myconfig, $form->{"paid_$i"});
push(@{ $form->{paid} }, $form->{"paid_$i"});