734 |
734 |
$form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
|
735 |
735 |
}
|
736 |
736 |
|
|
737 |
print qq|<input type=hidden name="acc_trans_id_$i" value=$form->{"acc_trans_id_$i"}>\n|;
|
|
738 |
print qq|<input type=hidden name="gldate_$i" value=$form->{"gldate_$i"}>\n|;
|
|
739 |
my $changeable = 1;
|
|
740 |
if ($::lx_office_conf{features}->{payments_changeable} == 0) {
|
|
741 |
# never
|
|
742 |
$changeable = ($form->{"acc_trans_id_$i"})? 0 : 1;
|
|
743 |
}
|
|
744 |
if ($::lx_office_conf{features}->{payments_changeable} == 2) {
|
|
745 |
# on the same day
|
|
746 |
$changeable = (($form->{"gldate_$i"} eq '') || $form->current_date(\%myconfig) eq $form->{"gldate_$i"});
|
|
747 |
}
|
|
748 |
|
737 |
749 |
$exchangerate = qq| |;
|
738 |
750 |
if ($form->{defaultcurrency} && ($form->{currency} ne $form->{defaultcurrency})) {
|
739 |
751 |
if ($form->{"forex_$i"}) {
|
740 |
752 |
$exchangerate =
|
741 |
753 |
qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
|
742 |
754 |
} else {
|
743 |
|
$exchangerate =
|
744 |
|
qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
|
|
755 |
if ($changeable) {
|
|
756 |
$exchangerate =
|
|
757 |
qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
|
|
758 |
} else {
|
|
759 |
$exchangerate =
|
|
760 |
qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
|
|
761 |
}
|
745 |
762 |
}
|
746 |
763 |
}
|
747 |
764 |
|
... | ... | |
749 |
766 |
<input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
|
750 |
767 |
|;
|
751 |
768 |
|
752 |
|
$column_data{paid} =
|
753 |
|
qq|<td align=center><input name="paid_$i" size=11 value="$form->{"paid_$i"}" onBlur=\"check_right_number_format(this)\"></td>|;
|
754 |
|
$column_data{AR_paid} =
|
755 |
|
qq|<td align=center>${selectAR_paid}</td>|;
|
756 |
|
$column_data{exchangerate} = qq|<td align=center>$exchangerate</td>|;
|
757 |
|
$column_data{datepaid} =
|
758 |
|
qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\">
|
|
769 |
my $datepaid;
|
|
770 |
if ($changeable) {
|
|
771 |
$datepaid = qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\">
|
759 |
772 |
<input type="button" name="datepaid_$i" id="trigger_datepaid_$i" value="?"></td>|;
|
760 |
|
$column_data{source} =
|
761 |
|
qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|;
|
762 |
|
$column_data{memo} =
|
763 |
|
qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|;
|
|
773 |
} else {
|
|
774 |
$datepaid = qq|<td align=center>$form->{"datepaid_$i"}</td>|.
|
|
775 |
qq|<input type=hidden name="datepaid_$i" value=$form->{"datepaid_$i"}>|;
|
|
776 |
}
|
|
777 |
|
|
778 |
my $paid;
|
|
779 |
if ($changeable) {
|
|
780 |
$paid = qq|<td align=center><input name="paid_$i" size=11 value="$form->{"paid_$i"}" onBlur=\"check_right_number_format(this)\"></td>|;
|
|
781 |
} else {
|
|
782 |
$paid = qq|<td align=center>$form->{"paid_$i"}</td>|.
|
|
783 |
qq|<input type=hidden name="paid_$i" value=$form->{"paid_$i"}>|;
|
|
784 |
}
|
|
785 |
|
|
786 |
my $source;
|
|
787 |
if ($changeable) {
|
|
788 |
$source = qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|;
|
|
789 |
} else {
|
|
790 |
$source = qq|<td align=center>$form->{"source_$i"}</td>|.
|
|
791 |
qq|<input type=hidden name="source_$i" value=$form->{"source_$i"}>|;
|
|
792 |
}
|
|
793 |
|
|
794 |
my $memo;
|
|
795 |
if ($changeable) {
|
|
796 |
$memo = qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|;
|
|
797 |
} else {
|
|
798 |
$memo = qq|<td align=center>$form->{"memo_$i"}</td>|.
|
|
799 |
qq|<input type=hidden name="memo_$i" value=$form->{"memo_$i"}>|;
|
|
800 |
}
|
|
801 |
|
|
802 |
my $AR_paid;
|
|
803 |
if ($changeable) {
|
|
804 |
$AR_paid = qq|<td align=center>${selectAR_paid}</td>|;
|
|
805 |
} else {
|
|
806 |
$AR_paid = qq|<td align=center>$form->{"AR_paid_$i"}</td>|.
|
|
807 |
qq|<input type=hidden name="AR_paid_$i" value=$form->{"AR_paid_$i"}>|;
|
|
808 |
}
|
764 |
809 |
|
765 |
|
$column_data{paid_project_id} =
|
|
810 |
my $paid_project_id;
|
|
811 |
if ($changeable) {
|
|
812 |
$paid_project_id =
|
766 |
813 |
qq|<td>|
|
767 |
814 |
. NTI($cgi->popup_menu('-name' => "paid_project_id_$i",
|
768 |
815 |
'-values' => \@project_values,
|
769 |
816 |
'-labels' => \%project_labels,
|
770 |
817 |
'-default' => $form->{"paid_project_id_$i"} ))
|
771 |
818 |
. qq|</td>|;
|
|
819 |
} else {
|
|
820 |
my $projectnumber = $project_labels{$form->{"paid_project_id_$i"}};
|
|
821 |
$paid_project_id = qq|<td>$projectnumber</td>|.
|
|
822 |
qq|<input type=hidden name="paid_project_id_$i" value=$form->{"paid_project_id_$i"}>|;
|
|
823 |
}
|
|
824 |
|
|
825 |
$column_data{paid} = $paid;
|
|
826 |
$column_data{AR_paid} = $AR_paid;
|
|
827 |
$column_data{exchangerate} = qq|<td align=center>$exchangerate</td>|;
|
|
828 |
$column_data{datepaid} = $datepaid;
|
|
829 |
$column_data{source} = $source;
|
|
830 |
$column_data{memo} = $memo;
|
|
831 |
$column_data{paid_project_id} = $paid_project_id;
|
772 |
832 |
|
773 |
833 |
map { print qq|$column_data{$_}\n| } @column_index;
|
774 |
834 |
|
775 |
835 |
print "
|
776 |
836 |
</tr>
|
777 |
837 |
";
|
778 |
|
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
|
|
838 |
if ($changeable) {
|
|
839 |
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
|
|
840 |
}
|
779 |
841 |
}
|
780 |
842 |
|
781 |
843 |
my $paid_missing = $form->{invtotal_unformatted} - $form->{totalpaid};
|
... | ... | |
1185 |
1247 |
my $form = $main::form;
|
1186 |
1248 |
my %myconfig = %main::myconfig;
|
1187 |
1249 |
|
1188 |
|
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);
|
|
1250 |
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);
|
1189 |
1251 |
$form->{paidaccounts} = 1;
|
1190 |
1252 |
$form->{rowcount}--;
|
1191 |
1253 |
$form->{invdate} = $form->current_date(\%myconfig);
|
Änderbarkeit der Zahlungen bei Debitorenbuchungen konfigurierbar