35 |
35 |
use SL::PE;
|
36 |
36 |
|
37 |
37 |
require "$form->{path}/arap.pl";
|
|
38 |
require "bin/mozilla/common.pl";
|
38 |
39 |
|
39 |
40 |
1;
|
40 |
41 |
|
... | ... | |
154 |
155 |
my $tax = 0;
|
155 |
156 |
my $taxaccno = "";
|
156 |
157 |
foreach $ref (@{ $form->{GL} }) {
|
157 |
|
$form->{"projectnumber_$i"} = "$ref->{projectnumber}--$ref->{project_id}";
|
158 |
|
|
159 |
158 |
$j = $i - 1;
|
160 |
159 |
if ($tax && ($ref->{accno} eq $taxaccno)) {
|
161 |
160 |
$form->{"tax_$j"} = abs($ref->{amount});
|
... | ... | |
895 |
894 |
sub update {
|
896 |
895 |
$lxdebug->enter_sub();
|
897 |
896 |
|
898 |
|
if ($form->{transdate} ne $form->{oldtransdate}) {
|
899 |
|
if ($form->{selectprojectnumber}) {
|
900 |
|
$form->all_projects(\%myconfig, undef, $form->{transdate});
|
901 |
|
if (@{ $form->{all_project} }) {
|
902 |
|
$form->{selectprojectnumber} = "<option>\n";
|
903 |
|
for (@{ $form->{all_project} }) {
|
904 |
|
$form->{selectprojectnumber} .=
|
905 |
|
qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|;
|
906 |
|
}
|
907 |
|
$form->{selectprojectnumber} =
|
908 |
|
$form->escape($form->{selectprojectnumber}, 1);
|
909 |
|
}
|
910 |
|
}
|
911 |
|
$form->{oldtransdate} = $form->{transdate};
|
912 |
|
}
|
|
897 |
$form->{oldtransdate} = $form->{transdate};
|
913 |
898 |
|
914 |
899 |
my @a = ();
|
915 |
900 |
my $count = 0;
|
... | ... | |
1033 |
1018 |
my ($init) = @_;
|
1034 |
1019 |
$lxdebug->enter_sub();
|
1035 |
1020 |
|
1036 |
|
$form->{selectprojectnumber} = $form->unescape($form->{selectprojectnumber})
|
1037 |
|
if $form->{selectprojectnumber};
|
1038 |
|
|
1039 |
1021 |
$form->{totaldebit} = 0;
|
1040 |
1022 |
$form->{totalcredit} = 0;
|
1041 |
1023 |
my $chart = $form->{chart};
|
1042 |
1024 |
$chart = $form->unquote($chart);
|
1043 |
1025 |
$form->{taxchart} = $form->unquote($form->{taxchart});
|
1044 |
1026 |
$taxchart = $form->{taxchart};
|
|
1027 |
|
|
1028 |
my @old_project_ids = ();
|
|
1029 |
map({ push(@old_project_ids, $form->{"project_id_$_"})
|
|
1030 |
if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
|
|
1031 |
|
|
1032 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
|
1033 |
"all" => 0,
|
|
1034 |
"old_id" => \@old_project_ids });
|
|
1035 |
|
|
1036 |
my %project_labels = ();
|
|
1037 |
my @project_values = ("");
|
|
1038 |
foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
|
|
1039 |
push(@project_values, $item->{"id"});
|
|
1040 |
$project_labels{$item->{"id"}} = $item->{"projectnumber"};
|
|
1041 |
}
|
|
1042 |
|
1045 |
1043 |
for $i (1 .. $form->{rowcount}) {
|
1046 |
1044 |
|
1047 |
1045 |
$source = qq|
|
... | ... | |
1060 |
1058 |
. ($i + 10 + (($i - 1) * 8))
|
1061 |
1059 |
. qq|>$form->{taxchart}</select></td>|;
|
1062 |
1060 |
|
1063 |
|
# if ($form->{selectprojectnumber}) {
|
1064 |
|
# $project = qq|
|
1065 |
|
# <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
|
1066 |
|
# }
|
1067 |
1061 |
$korrektur =
|
1068 |
1062 |
qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
|
1069 |
1063 |
. ($i + 9 + (($i - 1) * 8))
|
... | ... | |
1112 |
1106 |
. ($i + 10 + (($i - 1) * 8))
|
1113 |
1107 |
. qq|>$tax</select></td>|;
|
1114 |
1108 |
|
1115 |
|
# if ($form->{selectprojectnumber}) {
|
1116 |
|
# $form->{"projectnumber_$i"} = ""
|
1117 |
|
# if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/;
|
1118 |
|
#
|
1119 |
|
# $project = $form->{"projectnumber_$i"};
|
1120 |
|
# $project =~ s/--.*//;
|
1121 |
|
# $project = qq|<td>$project</td>|;
|
1122 |
|
# }
|
1123 |
|
|
1124 |
1109 |
if ($form->{transfer}) {
|
1125 |
1110 |
$checked = ($form->{"fx_transaction_$i"}) ? "1" : "";
|
1126 |
1111 |
$x = ($checked) ? "x" : "";
|
... | ... | |
1144 |
1129 |
<td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
|
1145 |
1130 |
. ($i + 10 + (($i - 1) * 8)) . qq|>$taxchart</select></td>|;
|
1146 |
1131 |
|
1147 |
|
# if ($form->{selectprojectnumber}) {
|
1148 |
|
# $project = qq|
|
1149 |
|
# <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
|
1150 |
|
# }
|
1151 |
1132 |
$korrektur =
|
1152 |
1133 |
qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
|
1153 |
1134 |
. ($i + 9 + (($i - 1) * 8))
|
... | ... | |
1169 |
1150 |
}
|
1170 |
1151 |
}
|
1171 |
1152 |
|
|
1153 |
my $projectnumber =
|
|
1154 |
NTI($cgi->popup_menu('-name' => "project_id_$i",
|
|
1155 |
'-values' => \@project_values,
|
|
1156 |
'-labels' => \%project_labels,
|
|
1157 |
'-default' => $form->{"project_id_$i"} ));
|
|
1158 |
|
1172 |
1159 |
print qq|<tr valign=top>
|
1173 |
1160 |
$accno
|
1174 |
1161 |
$fx_transaction
|
... | ... | |
1182 |
1169 |
$tax
|
1183 |
1170 |
$source
|
1184 |
1171 |
$memo
|
|
1172 |
<td>$projectnumber</td>
|
1185 |
1173 |
</tr>
|
1186 |
1174 |
|
1187 |
1175 |
|;
|
... | ... | |
1189 |
1177 |
|
1190 |
1178 |
$form->hide_form(qw(rowcount selectaccno));
|
1191 |
1179 |
|
1192 |
|
# print qq|
|
1193 |
|
# <input type=hidden name=selectprojectnumber value="|
|
1194 |
|
# . $form->escape($form->{selectprojectnumber}, 1) . qq|">|;
|
1195 |
1180 |
$lxdebug->leave_sub();
|
1196 |
1181 |
|
1197 |
1182 |
}
|
... | ... | |
1391 |
1376 |
<th class=listheading style="width:20%">|
|
1392 |
1377 |
. $locale->text('Source') . qq|</th>
|
1393 |
1378 |
<th class=listheading style="width:20%">| . $locale->text('Memo') . qq|</th>
|
1394 |
|
$project
|
|
1379 |
<th class=listheading style="width:20%">|
|
|
1380 |
. $locale->text('Project Number') . qq|</th>
|
1395 |
1381 |
</tr>
|
1396 |
1382 |
|
1397 |
1383 |
$jsscript
|
... | ... | |
1417 |
1403 |
<td></td>
|
1418 |
1404 |
<th align=right class=listtotal> $form->{totaldebit}</th>
|
1419 |
1405 |
<th align=right class=listtotal> $form->{totalcredit}</th>
|
1420 |
|
<td colspan=5></td>
|
|
1406 |
<td colspan=6></td>
|
1421 |
1407 |
</tr>
|
1422 |
1408 |
</table>
|
1423 |
1409 |
</td>
|
... | ... | |
1529 |
1515 |
$transdate = $form->datetonum($form->{transdate}, \%myconfig);
|
1530 |
1516 |
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
|
1531 |
1517 |
|
1532 |
|
# check project
|
1533 |
|
&check_project;
|
1534 |
|
|
1535 |
1518 |
my @a = ();
|
1536 |
1519 |
my $count = 0;
|
1537 |
1520 |
my $debittax = 0;
|
Dialogbuchen: Anzeigen und Speichern von Projektnummern für jede Zeile.