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") { |
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.