Revision d333f237
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
bin/mozilla/ca.pl | ||
---|---|---|
71 | 71 |
|
72 | 72 |
CA->all_accounts(\%myconfig, \%$form); |
73 | 73 |
|
74 |
@column_index = qw(accno gifi_accno description debit credit);
|
|
74 |
@column_index = qw(accno description debit credit); |
|
75 | 75 |
|
76 | 76 |
$column_header{accno} = |
77 | 77 |
qq|<th class=listheading>| . $locale->text('Account') . qq|</th>\n|; |
78 |
$column_header{gifi_accno} = |
|
79 |
qq|<th class=listheading>| . $locale->text('GIFI') . qq|</th>\n|; |
|
80 | 78 |
$column_header{description} = |
81 | 79 |
qq|<th class=listheading>| . $locale->text('Description') . qq|</th>\n|; |
82 | 80 |
$column_header{debit} = |
... | ... | |
107 | 105 |
foreach $ca (@{ $form->{CA} }) { |
108 | 106 |
|
109 | 107 |
$description = $form->escape($ca->{description}); |
110 |
$gifi_description = $form->escape($ca->{gifi_description}); |
|
111 | 108 |
|
112 | 109 |
$href = |
113 |
qq|$form->{script}?path=$form->{path}&action=list&accno=$ca->{accno}&login=$form->{login}&password=$form->{password}&description=$description&gifi_accno=$ca->{gifi_accno}&gifi_description=$gifi_description|;
|
|
110 |
qq|$form->{script}?path=$form->{path}&action=list&accno=$ca->{accno}&login=$form->{login}&password=$form->{password}&description=$description|; |
|
114 | 111 |
|
115 | 112 |
if ($ca->{charttype} eq "H") { |
116 | 113 |
print qq|<tr class=listheading>|; |
117 | 114 |
map { $column_data{$_} = "<th>$ca->{$_}</th>"; } qw(accno description); |
118 |
$column_data{gifi_accno} = "<th>$ca->{gifi_accno} </th>"; |
|
119 | 115 |
} else { |
120 | 116 |
$i++; |
121 | 117 |
$i %= 2; |
122 | 118 |
print qq|<tr class=listrow$i>|; |
123 | 119 |
$column_data{accno} = "<td><a href=$href>$ca->{accno}</a></td>"; |
124 |
$column_data{gifi_accno} = |
|
125 |
"<td><a href=$href&accounttype=gifi>$ca->{gifi_accno}</a> </td>"; |
|
126 | 120 |
$column_data{description} = "<td>$ca->{description}</td>"; |
127 | 121 |
} |
128 | 122 |
my $debit = ""; |
... | ... | |
153 | 147 |
} |
154 | 148 |
|
155 | 149 |
map { $column_data{$_} = "<td> </td>"; } |
156 |
qw(accno gifi_accno description);
|
|
150 |
qw(accno description); |
|
157 | 151 |
|
158 | 152 |
$column_data{debit} = |
159 | 153 |
"<th align=right class=listtotal>" |
... | ... | |
184 | 178 |
$lxdebug->enter_sub(); |
185 | 179 |
|
186 | 180 |
$form->{title} = $locale->text('List Transactions'); |
187 |
if ($form->{accounttype} eq 'gifi') { |
|
188 |
$form->{title} .= " - " . $locale->text('GIFI') . " $form->{gifi_accno}"; |
|
189 |
} else { |
|
190 |
$form->{title} .= " - " . $locale->text('Account') . " $form->{accno}"; |
|
191 |
} |
|
181 |
$form->{title} .= " - " . $locale->text('Account') . " $form->{accno}"; |
|
192 | 182 |
|
193 | 183 |
# get departments |
194 | 184 |
$form->all_departments(\%myconfig); |
... | ... | |
210 | 200 |
|
211 | 201 |
$form->header; |
212 | 202 |
|
213 |
map { $form->{$_} =~ s/\"/"/g; } qw(description gifi_description);
|
|
203 |
$form->{description} =~ s/\"/"/g;
|
|
214 | 204 |
|
215 | 205 |
print qq| |
216 | 206 |
<body> |
... | ... | |
222 | 212 |
<input type=hidden name=sort value=transdate> |
223 | 213 |
<input type=hidden name=eur value=$eur> |
224 | 214 |
<input type=hidden name=accounttype value=$form->{accounttype}> |
225 |
<input type=hidden name=gifi_accno value=$form->{gifi_accno}> |
|
226 |
<input type=hidden name=gifi_description value="$form->{gifi_description}"> |
|
227 | 215 |
|
228 | 216 |
<table border=0 width=100%> |
229 | 217 |
<tr><th class=listtop>$form->{title}</th></tr> |
... | ... | |
271 | 259 |
CA->all_transactions(\%myconfig, \%$form); |
272 | 260 |
|
273 | 261 |
$description = $form->escape($form->{description}); |
274 |
$gifi_description = $form->escape($form->{gifi_description}); |
|
275 | 262 |
$department = $form->escape($form->{department}); |
276 | 263 |
$projectnumber = $form->escape($form->{projectnumber}); |
277 | 264 |
$title = $form->escape($form->{title}); |
278 | 265 |
|
279 | 266 |
# construct href |
280 | 267 |
$href = |
281 |
"$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
|
|
268 |
"$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title"; |
|
282 | 269 |
|
283 | 270 |
$description = $form->escape($form->{description}, 1); |
284 |
$gifi_description = $form->escape($form->{gifi_description}, 1); |
|
285 | 271 |
$department = $form->escape($form->{department}, 1); |
286 | 272 |
$projectnumber = $form->escape($form->{projectnumber}, 1); |
287 | 273 |
$title = $form->escape($form->{title}, 1); |
288 | 274 |
|
289 | 275 |
# construct callback |
290 | 276 |
$callback = |
291 |
"$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
|
|
277 |
"$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title"; |
|
292 | 278 |
|
293 | 279 |
# figure out which column comes first |
294 | 280 |
$column_header{transdate} = |
... | ... | |
310 | 296 |
@column_index = |
311 | 297 |
$form->sort_columns(qw(transdate reference description debit credit)); |
312 | 298 |
|
313 |
if ($form->{accounttype} eq 'gifi') { |
|
314 |
map { $form->{$_} = $form->{"gifi_$_"} } qw(accno description); |
|
315 |
} |
|
316 | 299 |
if ($form->{accno}) { |
317 | 300 |
push @column_index, "balance"; |
318 | 301 |
} |
319 | 302 |
|
320 |
$form->{title} = |
|
321 |
($form->{accounttype} eq 'gifi') |
|
322 |
? $locale->text('GIFI') |
|
323 |
: $locale->text('Account'); |
|
324 |
|
|
325 |
$form->{title} .= " $form->{accno} - $form->{description}"; |
|
303 |
$form->{title} = $locale->text('Account') . |
|
304 |
" $form->{accno} - $form->{description}"; |
|
326 | 305 |
|
327 | 306 |
if ($form->{department}) { |
328 | 307 |
($department) = split /--/, $form->{department}; |
Auch abrufbar als: Unified diff
Weitere Vorkommen von GIFI entfernt. GIFI müsste bis auf Spalte chart.gifi_accno und Tabelle chart komplett entfernt sein.