Revision 79b83b02
Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
692 | 692 |
$form->{"exchangerate_$i"} = ""; |
693 | 693 |
} |
694 | 694 |
|
695 |
print qq|<input type=hidden name="gldate_$i" value=$form->{"gldate_$i"}>\n|; |
|
696 |
my $changeable = (($form->{"gldate_$i"} eq '') || $form->current_date(\%myconfig) eq $form->{"gldate_$i"}); |
|
697 |
$form->{"payment_readonly_$i"} = ($changeable)? 0 : 1; |
|
698 |
print qq|<input type=hidden name="payment_readonly_$i" value=$form->{"payment_readonly_$i"}>\n|; |
|
699 |
|
|
695 | 700 |
$exchangerate = qq| |; |
696 | 701 |
if ($form->{defaultcurrency} && ($form->{currency} ne $form->{defaultcurrency})) { |
697 | 702 |
if ($form->{"forex_$i"}) { |
698 | 703 |
$exchangerate = |
699 | 704 |
qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|; |
700 | 705 |
} else { |
701 |
$exchangerate = |
|
702 |
qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|; |
|
706 |
if ($changeable) { |
|
707 |
$exchangerate = |
|
708 |
qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|; |
|
709 |
} else { |
|
710 |
$exchangerate = qq|$form->{"exchangerate_$i"}|. |
|
711 |
qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|; |
|
712 |
} |
|
703 | 713 |
} |
704 | 714 |
} |
705 | 715 |
|
... | ... | |
707 | 717 |
<input type=hidden name="forex_$i" value=$form->{"forex_$i"}> |
708 | 718 |
|; |
709 | 719 |
|
710 |
$column_data{"paid_$i"} = |
|
711 |
qq|<td align=center><input name="paid_$i" size=11 value="$form->{"paid_$i"}" onBlur=\"check_right_number_format(this)\"></td>|; |
|
712 |
$column_data{"AP_paid_$i"} = |
|
713 |
qq|<td align=center>${selectAP_paid}</td>|; |
|
714 |
$column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|; |
|
715 |
$column_data{"datepaid_$i"} = |
|
716 |
qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 title="($myconfig{'dateformat'})" value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\"> |
|
720 |
my $datepaid; |
|
721 |
if ($changeable) { |
|
722 |
$datepaid = qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 title="($myconfig{'dateformat'})" value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\"> |
|
717 | 723 |
<input type="button" name="datepaid_$i" id="trigger_datepaid_$i" value="| . $locale->text('Details (one letter abbreviation)') . qq|"></td>|; |
718 |
$column_data{"source_$i"} = |
|
719 |
qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|; |
|
720 |
$column_data{"memo_$i"} = |
|
721 |
qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|; |
|
722 |
$column_data{"paid_project_id_$i"} = |
|
724 |
} else { |
|
725 |
$datepaid = qq|<td align=center>$form->{"datepaid_$i"}</td>|. |
|
726 |
qq|<input type=hidden name="datepaid_$i" value=$form->{"datepaid_$i"}>|; |
|
727 |
} |
|
728 |
|
|
729 |
my $paid; |
|
730 |
if ($changeable) { |
|
731 |
$paid = qq|<td align=center><input name="paid_$i" size=11 value="$form->{"paid_$i"}" onBlur=\"check_right_number_format(this)\"></td>|; |
|
732 |
} else { |
|
733 |
$paid = qq|<td align=center>$form->{"paid_$i"}</td>|. |
|
734 |
qq|<input type=hidden name="paid_$i" value=$form->{"paid_$i"}>|; |
|
735 |
} |
|
736 |
|
|
737 |
my $source; |
|
738 |
if ($changeable) { |
|
739 |
$source = qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|; |
|
740 |
} else { |
|
741 |
$source = qq|<td align=center>$form->{"source_$i"}</td>|. |
|
742 |
qq|<input type=hidden name="source_$i" value=$form->{"source_$i"}>|; |
|
743 |
} |
|
744 |
|
|
745 |
my $memo; |
|
746 |
if ($changeable) { |
|
747 |
$memo = qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|; |
|
748 |
} else { |
|
749 |
$memo = qq|<td align=center>$form->{"memo_$i"}</td>|. |
|
750 |
qq|<input type=hidden name="memo_$i" value=$form->{"memo_$i"}>|; |
|
751 |
} |
|
752 |
|
|
753 |
my $AP_paid; |
|
754 |
if ($changeable) { |
|
755 |
$AP_paid = qq|<td align=center>${selectAP_paid}</td>|; |
|
756 |
} else { |
|
757 |
$AP_paid = qq|<td align=center>$form->{"AP_paid_$i"}</td>|. |
|
758 |
qq|<input type=hidden name="AP_paid_$i" value=$form->{"AP_paid_$i"}>|; |
|
759 |
} |
|
760 |
|
|
761 |
my $paid_project_id; |
|
762 |
if ($changeable) { |
|
763 |
$paid_project_id = |
|
723 | 764 |
qq|<td>| |
724 | 765 |
. NTI($cgi->popup_menu('-name' => "paid_project_id_$i", |
725 | 766 |
'-values' => \@project_values, |
726 | 767 |
'-labels' => \%project_labels, |
727 | 768 |
'-default' => $form->{"paid_project_id_$i"} )) |
728 | 769 |
. qq|</td>|; |
770 |
} else { |
|
771 |
my $projectnumber = $project_labels{$form->{"paid_project_id_$i"}}; |
|
772 |
$paid_project_id = qq|<td>$projectnumber</td>|. |
|
773 |
qq|<input type=hidden name="paid_project_id_$i" value=$form->{"paid_project_id_$i"}>|; |
|
774 |
} |
|
775 |
|
|
776 |
$column_data{"paid_$i"} = $paid; |
|
777 |
$column_data{"AP_paid_$i"} = $AP_paid; |
|
778 |
$column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|; |
|
779 |
$column_data{"datepaid_$i"} = $datepaid; |
|
780 |
$column_data{"source_$i"} = $source; |
|
781 |
$column_data{"memo_$i"} = $memo; |
|
782 |
$column_data{"paid_project_id_$i"} = $paid_project_id; |
|
729 | 783 |
|
730 | 784 |
map { print qq|$column_data{"${_}_$i"}\n| } @column_index; |
731 | 785 |
|
732 | 786 |
print " |
733 | 787 |
</tr> |
734 | 788 |
"; |
735 |
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); |
|
789 |
if ($changeable) { |
|
790 |
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); |
|
791 |
} |
|
736 | 792 |
} |
737 | 793 |
|
738 | 794 |
my $paid_missing = $form->{invtotal_unformatted} - $form->{totalpaid}; |
... | ... | |
1126 | 1182 |
|
1127 | 1183 |
$main::auth->assert('general_ledger'); |
1128 | 1184 |
|
1129 |
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); |
|
1185 |
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 gldate_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
|
|
1130 | 1186 |
$form->{paidaccounts} = 1; |
1131 | 1187 |
$form->{rowcount}--; |
1132 | 1188 |
$form->{invdate} = $form->current_date(\%myconfig); |
Auch abrufbar als: Unified diff
Zahlungen bei Kreditorenbuchungen nur am selben Tag löschbar machen.
Siehe auch Bug 1640. Ändert zwar nichts am Bug, steht da aber als
Anregung drin.