Revision b63cc1ed
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
354 | 354 |
|
355 | 355 |
# Set up the content of $form in the way that AR::post_transaction() expects. |
356 | 356 |
|
357 |
$self->setup_form($form); |
|
357 |
$self->setup_form($form, 1);
|
|
358 | 358 |
|
359 | 359 |
$form->{exchangerate} = $form->format_amount($myconfig, $form->{exchangerate}); |
360 | 360 |
$form->{defaultcurrency} = $form->get_default_currency($myconfig); |
... | ... | |
560 | 560 |
sub setup_form { |
561 | 561 |
$main::lxdebug->enter_sub(); |
562 | 562 |
|
563 |
my ($self, $form) = @_; |
|
563 |
my ($self, $form, $for_post_payments) = @_;
|
|
564 | 564 |
|
565 | 565 |
my ($exchangerate, $akey, $j, $k, $index, $taxamount, $totaltax, $taxrate, $diff, $totalwithholding, $withholdingrate, |
566 | 566 |
$totalamount, $taxincluded, $tax); |
... | ... | |
570 | 570 |
$exchangerate = $form->{exchangerate} ? $form->{exchangerate} : 1; |
571 | 571 |
|
572 | 572 |
foreach my $key (keys %{ $form->{AR_links} }) { |
573 |
# if there is a value we have an old entry |
|
574 | 573 |
$j = 0; |
575 | 574 |
$k = 0; |
576 | 575 |
|
576 |
# if there is a value we have an old entry |
|
577 | 577 |
next unless $form->{acc_trans}{$key}; |
578 | 578 |
|
579 |
# do not use old entries for payments. They come from the form |
|
580 |
# even if they are not changeable (then they are in hiddens) |
|
581 |
next if $for_post_payments && $key eq "AR_paid"; |
|
582 |
|
|
579 | 583 |
for my $i (1 .. scalar @{ $form->{acc_trans}{$key} }) { |
580 | 584 |
if ($key eq "AR_paid") { |
581 | 585 |
$j++; |
Auch abrufbar als: Unified diff
Bug bei 'Änderbarkeit der Zahlungen bei K./D.-Buchungen' behoben.
Die nicht geänderten Zahlungen wurden aus der Datenbank und nicht
aus der Form (hiddens) genommen. Damit lag ein falsches Zahlenformat
vor.