Revision b63cc1ed
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
591 | 591 |
|
592 | 592 |
# Set up the content of $form in the way that AR::post_transaction() expects. |
593 | 593 |
|
594 |
$self->setup_form($form); |
|
594 |
$self->setup_form($form, 1);
|
|
595 | 595 |
|
596 | 596 |
$form->{exchangerate} = $form->format_amount($myconfig, $form->{exchangerate}); |
597 | 597 |
$form->{defaultcurrency} = $form->get_default_currency($myconfig); |
... | ... | |
625 | 625 |
sub setup_form { |
626 | 626 |
$main::lxdebug->enter_sub(); |
627 | 627 |
|
628 |
my ($self, $form) = @_; |
|
628 |
my ($self, $form, $for_post_payments) = @_;
|
|
629 | 629 |
|
630 | 630 |
my ($exchangerate, $i, $j, $k, $key, $akey, $ref, $index, $taxamount, $totalamount, $totaltax, $totalwithholding, $withholdingrate, |
631 | 631 |
$taxincluded, $tax, $diff); |
... | ... | |
645 | 645 |
|
646 | 646 |
$form->{$key} = $form->{"select$key"}; |
647 | 647 |
|
648 |
# if there is a value we have an old entry |
|
649 | 648 |
$j = 0; |
650 | 649 |
$k = 0; |
651 | 650 |
|
651 |
# if there is a value we have an old entry |
|
652 | 652 |
next unless $form->{acc_trans}{$key}; |
653 |
|
|
654 |
# do not use old entries for payments. They come from the form |
|
655 |
# even if they are not changeable (then they are in hiddens) |
|
656 |
next if $for_post_payments && $key eq "AP_paid"; |
|
657 |
|
|
653 | 658 |
for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) { |
654 | 659 |
|
655 | 660 |
if ($key eq "AP_paid") { |
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.