$form->{callback} = "$form->{script}?action=add&type=$form->{type}" unless $form->{callback};
- $form->{jsscript} = "date";
-
&invoice_links;
&prepare_invoice;
&display_form;
$form->{vc} = 'customer';
# create links
- $form->{webdav} = $::lx_office_conf{features}->{webdav};
+ $form->{webdav} = $::instance_conf->get_webdav;
$form->create_links("AR", \%myconfig, "customer");
$TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
$TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
- $::request->{layout}->focus('#customer');
-
my $follow_up_vc = $form->{customer};
$follow_up_vc =~ s/--\d*\s*$//;
$TMPL_VAR{customer_name} = $follow_up_vc;
), @custom_hiddens,
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
- $form->{jsscript} = 1;
- $::request->layout->use_stylesheet('presenter/record/record_list.css');
$form->header();
print $form->parse_html_template("is/form_header", \%TMPL_VAR);
}
if ($rows) {
- $form->{"qty_$i"} = ($form->{"qty_$i"} * 1) ? $form->{"qty_$i"} : 1;
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+ if( !$form->{"qty_$i"} ) {
+ $form->{"qty_$i"} = 1;
+ }
if ($rows > 1) {
my $closedto = $form->datetonum($form->{closedto}, \%myconfig);
my $invdate = $form->datetonum($form->{invdate}, \%myconfig);
+ $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
+ if ($form->date_max_future($invdate, \%myconfig));
$form->error($locale->text('Cannot post invoice for a closed period!'))
if ($invdate <= $closedto);