Revision 890e057f
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
249 | 249 |
|
250 | 250 |
# add paid transactions |
251 | 251 |
for my $i (1 .. $form->{paidaccounts}) { |
252 |
|
|
253 |
if ($form->{"acc_trans_id_$i"} && $payments_only && ($::lx_office_conf{features}->{payments_changeable} == 0)) { |
|
254 |
next; |
|
255 |
} |
|
256 |
|
|
252 | 257 |
if ($form->{"paid_$i"} != 0) { |
253 | 258 |
my $project_id = conv_i($form->{"paid_project_id_$i"}); |
254 | 259 |
|
... | ... | |
566 | 571 |
$old_form = save_form(); |
567 | 572 |
|
568 | 573 |
# Delete all entries in acc_trans from prior payments. |
569 |
$self->_delete_payments($form, $dbh); |
|
574 |
if ($::lx_office_conf{features}->{payments_changeable} != 0) { |
|
575 |
$self->_delete_payments($form, $dbh); |
|
576 |
} |
|
570 | 577 |
|
571 | 578 |
# Save the new payments the user made before cleaning up $form. |
572 |
my $payments_re = '^datepaid_\d+$|^gldate_\d+$|^memo_\d+$|^source_\d+$|^exchangerate_\d+$|^paid_\d+$|^paid_project_id_\d+$|^AP_paid_\d+$|^paidaccounts$'; |
|
579 |
my $payments_re = '^datepaid_\d+$|^gldate_\d+$|^acc_trans_id_\d+$|^memo_\d+$|^source_\d+$|^exchangerate_\d+$|^paid_\d+$|^paid_project_id_\d+$|^AP_paid_\d+$|^paidaccounts$';
|
|
573 | 580 |
map { $payments{$_} = $form->{$_} } grep m/$payments_re/, keys %{ $form }; |
574 | 581 |
|
575 | 582 |
# Clean up $form so that old content won't tamper the results. |
... | ... | |
648 | 655 |
if ($key eq "AP_paid") { |
649 | 656 |
$j++; |
650 | 657 |
$form->{"AP_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; |
658 |
$form->{"acc_trans_id_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{acc_trans_id}; |
|
651 | 659 |
$form->{"paid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{amount}; |
652 | 660 |
$form->{"datepaid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{transdate}; |
653 | 661 |
$form->{"gldate_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{gldate}; |
Auch abrufbar als: Unified diff
Änderbarkeit bei Zahlungen f. Kreditorenbuchungen konfigurierbar machen.
Nie, immer oder am selben Tag, einstellbar in der lx_office.conf