Revision f45b296f
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
195 | 195 |
for my $i (1 .. scalar @{ $form->{acc_trans}{$key} }) { |
196 | 196 |
$form->{"AR_paid_$i"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; |
197 | 197 |
|
198 |
$form->{"acc_trans_id_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{acc_trans_id}; |
|
198 | 199 |
# reverse paid |
199 | 200 |
$form->{"paid_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{amount} * -1; |
200 | 201 |
$form->{"datepaid_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{transdate}; |
202 |
$form->{"gldate_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{gldate}; |
|
201 | 203 |
$form->{"exchangerate_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{exchangerate}; |
202 | 204 |
$form->{"forex_$i"} = $form->{"exchangerate_$i"}; |
203 | 205 |
$form->{"source_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{source}; |
... | ... | |
427 | 429 |
my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form); |
428 | 430 |
|
429 | 431 |
for my $i (1 .. $form->{paidaccounts}) { |
432 |
$form->{"changeable_$i"} = 1; |
|
433 |
if ($::lx_office_conf{features}->{payments_changeable} == 0) { |
|
434 |
# never |
|
435 |
$form->{"changeable_$i"} = ($form->{"acc_trans_id_$i"})? 0 : 1; |
|
436 |
} elsif ($::lx_office_conf{features}->{payments_changeable} == 2) { |
|
437 |
# on the same day |
|
438 |
$form->{"changeable_$i"} = (($form->{"gldate_$i"} eq '') || |
|
439 |
($form->current_date(\%myconfig) eq $form->{"gldate_$i"})); |
|
440 |
} |
|
441 |
|
|
430 | 442 |
$form->{"selectAR_paid_$i"} = $form->{selectAR_paid}; |
431 | 443 |
if (!$form->{"AR_paid_$i"}) { |
432 | 444 |
$form->{"selectAR_paid_$i"} =~ s/option>$accno_arap--(.*?)</option selected>$accno_arap--$1</; |
... | ... | |
772 | 784 |
|
773 | 785 |
$main::auth->assert('invoice_edit'); |
774 | 786 |
|
775 |
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno); |
|
787 |
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
|
|
776 | 788 |
$form->{paidaccounts} = 1; |
777 | 789 |
$form->{rowcount}--; |
778 | 790 |
$form->{invdate} = $form->current_date(\%myconfig); |
... | ... | |
811 | 823 |
|
812 | 824 |
# Payments must not be recorded for the new storno invoice. |
813 | 825 |
$form->{paidaccounts} = 0; |
814 |
map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; |
|
826 |
map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ gldate_ acc_trans_id_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form };
|
|
815 | 827 |
|
816 | 828 |
$form->{storno_id} = $form->{id}; |
817 | 829 |
$form->{storno} = 1; |
... | ... | |
934 | 946 |
delete $form->{"source_$i"}; |
935 | 947 |
delete $form->{"memo_$i"}; |
936 | 948 |
delete $form->{"datepaid_$i"}; |
949 |
delete $form->{"gldate_$i"}; |
|
950 |
delete $form->{"acc_trans_id_$i"}; |
|
937 | 951 |
delete $form->{"AR_paid_$i"}; |
938 | 952 |
}; |
939 | 953 |
$form->{paidaccounts} = 1; |
Auch abrufbar als: Unified diff
Änderbarkeit bei Zahlungen f. Verkaufsrechnungen konfigurierbar.
Nie, immer oder am selben Tag, einstellbar in der lx_office.conf