$config ||= SL::DB::Manager::PeriodicInvoicesConfig->find_by(oe_id => $::form->{id}) if $::form->{id};
$config ||= SL::DB::PeriodicInvoicesConfig->new(periodicity => 'm',
order_value_periodicity => 'p', # = same as periodicity
- start_date_as_date => $::form->{transdate} || $::form->current_date,
+ start_date_as_date => $::form->{transdate_as_date} || $::form->current_date,
extend_automatically_by => 12,
active => 1,
email_subject => GenericTranslations->get(
};
ns.check_valid_reqdate = function() {
- if ($('#order_reqdate').val() === '') {
+ if ($('#order_reqdate_as_date').val() === '') {
alert(kivi.t8('Please select a delivery date.'));
return false;
} else {
kivi.popup_dialog({
url: 'controller.pl?action=Order/show_periodic_invoices_config_dialog',
- data: { type: $('#type').val(),
- id: $('#id').val(),
- config: $('#order_periodic_invoices_config').val(),
- customer_id: $('#order_customer_id').val(),
- transdate: $('#order_transdate').val(),
- language_id: $('#language_id').val()
+ data: { type: $('#type').val(),
+ id: $('#id').val(),
+ config: $('#order_periodic_invoices_config').val(),
+ customer_id: $('#order_customer_id').val(),
+ transdate_as_date: $('#order_transdate_as_date').val(),
+ language_id: $('#language_id').val()
},
id: 'jq_periodic_invoices_config_dialog',
load: kivi.reinit_widgets,