Revision 42ed89f3
Von Philip Reetz vor mehr als 16 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
230 | 230 |
$form->{id} = ""; |
231 | 231 |
} |
232 | 232 |
|
233 |
if (!$form->{id} || $form->{id} eq "") { |
|
234 |
$query = qq|SELECT nextval('id')|; |
|
235 |
($form->{"id"}) = selectrow_query($form, $dbh, $query); |
|
236 |
$query = qq|INSERT INTO chart (id, accno) VALUES (?, ?)|; |
|
237 |
do_query($form, $dbh, $query, $form->{"id"}, $form->{"accno"}); |
|
238 |
} |
|
239 |
|
|
233 | 240 |
my @values; |
234 | 241 |
|
235 | 242 |
if ($form->{id}) { |
... | ... | |
262 | 269 |
$form->{id}, |
263 | 270 |
); |
264 | 271 |
|
265 |
} |
|
266 |
elsif ($form->{id} && !$form->{new_chart_valid}) { |
|
267 |
|
|
268 |
$query = qq| |
|
269 |
UPDATE chart |
|
270 |
SET new_chart_id = ?, |
|
271 |
valid_from = ? |
|
272 |
WHERE id = ? |
|
273 |
|; |
|
274 |
|
|
275 |
@values = ( |
|
276 |
conv_i($form->{new_chart_id}), |
|
277 |
conv_date($form->{valid_from}), |
|
278 |
$form->{id} |
|
279 |
); |
|
280 |
} |
|
281 |
else { |
|
282 |
|
|
283 |
$query = qq| |
|
284 |
INSERT INTO chart ( |
|
285 |
accno, |
|
286 |
description, |
|
287 |
charttype, |
|
288 |
category, |
|
289 |
link, |
|
290 |
pos_bwa, |
|
291 |
pos_bilanz, |
|
292 |
pos_eur, |
|
293 |
new_chart_id, |
|
294 |
valid_from, |
|
295 |
datevautomatik ) |
|
296 |
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) |
|
297 |
|; |
|
298 |
|
|
299 |
@values = ( |
|
300 |
$form->{accno}, |
|
301 |
$form->{description}, |
|
302 |
$form->{charttype}, |
|
303 |
$form->{category}, $form->{link}, |
|
304 |
conv_i($form->{pos_bwa}), |
|
305 |
conv_i($form->{pos_bilanz}), conv_i($form->{pos_eur}), |
|
306 |
conv_i($form->{new_chart_id}), |
|
307 |
conv_date($form->{valid_from}), |
|
308 |
($form->{datevautomatik} eq 'T') ? 'true':'false', |
|
309 |
); |
|
310 |
|
|
311 | 272 |
} |
312 | 273 |
|
313 | 274 |
do_query($form, $dbh, $query, @values); |
... | ... | |
325 | 286 |
# Loop control |
326 | 287 |
|
327 | 288 |
# Check if the account already exists, else cancel |
289 |
|
|
290 |
print(STDERR "Keine Taxkeys weil ID =: $form->{id}\n"); |
|
291 |
|
|
328 | 292 |
last READTAXKEYS if ( $form->{'id'} == 0); |
329 | 293 |
|
330 | 294 |
# check if there is a startdate |
Auch abrufbar als: Unified diff
Beim Bearbeiten von Konten die Funktion "als neu speichern" hinzugefuegt, um ein Konto mit allen Einstelungen zu klonen