Revision f49ad7f1
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
589 | 589 |
$obj->update_attributes(%{ $config }); |
590 | 590 |
} |
591 | 591 |
|
592 |
sub load_periodic_invoice_config { |
|
593 |
my $self = shift; |
|
594 |
my $form = shift; |
|
595 |
|
|
596 |
delete $form->{periodic_invoices_config}; |
|
597 |
|
|
598 |
if ($form->{id}) { |
|
599 |
my $config_obj = SL::DB::Manager::PeriodicInvoicesConfig->find_by(oe_id => $form->{id}); |
|
600 |
|
|
601 |
if ($config_obj) { |
|
602 |
my $config = { map { $_ => $config_obj->$_ } qw(active terminated periodicity start_date_as_date end_date_as_date extend_automatically_by ar_chart_id |
|
603 |
print printer_id copies) }; |
|
604 |
$form->{periodic_invoices_config} = YAML::Dump($config); |
|
605 |
} |
|
606 |
} |
|
607 |
} |
|
608 |
|
|
592 | 609 |
sub _close_quotations_rfqs { |
593 | 610 |
$main::lxdebug->enter_sub(); |
594 | 611 |
|
... | ... | |
965 | 982 |
} |
966 | 983 |
$sth->finish; |
967 | 984 |
|
968 |
delete $form->{periodic_invoices_config}; |
|
969 |
if ($form->{id} && ($form->{type} eq 'sales_order')) { |
|
970 |
$query = qq|SELECT periodicity, start_date, print, printer_id, copies, active, ar_chart_id FROM periodic_invoices_configs WHERE oe_id = ? LIMIT 1|; |
|
971 |
$ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{id})); |
|
972 |
|
|
973 |
$form->{periodic_invoices_config} = YAML::Dump($ref) if ($ref); |
|
974 |
} |
|
975 |
|
|
976 | 985 |
} else { |
977 | 986 |
|
978 | 987 |
# get last name used |
... | ... | |
985 | 994 |
|
986 | 995 |
Common::webdav_folder($form) if ($main::webdav); |
987 | 996 |
|
997 |
$self->load_periodic_invoice_config($form); |
|
998 |
|
|
988 | 999 |
my $rc = $dbh->commit; |
989 | 1000 |
|
990 | 1001 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Felder end_date, terminated, extend_automatically_by ergänzt