Revision d557935a
Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
369 | 369 |
|
370 | 370 |
next if $payments_only; |
371 | 371 |
|
372 |
my $cvars; |
|
372 | 373 |
if (!$form->{"invoice_id_$i"}) { |
373 | 374 |
# there is no persistent id, therefore create one with all necessary constraints |
374 | 375 |
my $q_invoice_id = qq|SELECT nextval('invoiceid')|; |
... | ... | |
379 | 380 |
do_query($form, $dbh, $q_create_invoice_id, conv_i($form->{"invoice_id_$i"}), |
380 | 381 |
conv_i($form->{id}), conv_i($position), conv_i($form->{"id_$i"})); |
381 | 382 |
$h_invoice_id->finish(); |
383 |
|
|
384 |
# get values for CVars from master data for new items |
|
385 |
$cvars = CVar->get_custom_variables(dbh => $dbh, |
|
386 |
module => 'IC', |
|
387 |
trans_id => $form->{"id_$i"}, |
|
388 |
); |
|
389 |
} else { |
|
390 |
# get values for CVars from custom_variables for existing items |
|
391 |
$cvars = CVar->get_custom_variables(dbh => $dbh, |
|
392 |
module => 'IC', |
|
393 |
sub_module => 'invoice', |
|
394 |
trans_id => $form->{"invoice_id_$i"}, |
|
395 |
); |
|
382 | 396 |
} |
397 |
# map only non-editable CVars to form (editable ones are already there) |
|
398 |
map { $form->{"ic_cvar_$_->{name}_$i"} = $_->{value} unless $_->{flag_editable} } @{ $cvars }; |
|
383 | 399 |
|
384 | 400 |
# save detail record in invoice table |
385 | 401 |
$query = <<SQL; |
Auch abrufbar als: Unified diff
Rechnungen: Nicht editierbare CVars nicht rendern, aber richtig speichern bzw. drucken.
Die Änderung für Rechnungen (u. Gutschriften) fehlte noch im commit
6b4a71ff376e8337b708127f9f6c63c1d70d0af3
(Nicht editierbare CVars nicht rendern, aber richtig speichern und drucken.)