X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=4637f6ba3011b3b9dcf18d115abc63850fd344c2;hb=5b47ed3efe5f4ef0810096b0f4849047cee54690;hp=857e60409accc070033e4d355f27564cd453e1d7;hpb=9e117fbd2bb27c58831580608cd63f85c82487ac;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 857e60409..4637f6ba3 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -69,8 +69,6 @@ sub add { } &invoice_links; &prepare_invoice; - $form->{format} = "pdf"; - &display_form; $lxdebug->leave_sub(); @@ -246,11 +244,9 @@ sub prepare_invoice { if ($form->{type} eq "credit_note") { $form->{type} = "credit_note"; $form->{formname} = "credit_note"; - $form->{media} = "screen"; } else { $form->{type} = "invoice"; $form->{formname} = "invoice"; - $form->{media} = "screen"; } if ($form->{id}) { @@ -261,10 +257,11 @@ sub prepare_invoice { # # get pricegroups for parts # IS->get_pricegroups_for_parts(\%myconfig, \%$form); + my $i = 0; + foreach $ref (@{ $form->{invoice_details} }) { $i++; - map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100); @@ -323,16 +320,22 @@ sub form_header { } } + my $set_duedate_url = + "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=set_duedate"; + + my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url ); + push(@ { $form->{AJAX} }, $pjx); if (@{ $form->{TAXZONE} }) { $form->{selecttaxzone} = ""; foreach $item (@{ $form->{TAXZONE} }) { if ($item->{id} == $form->{taxzone_id}) { $form->{selecttaxzone} .= - ""; + ""; } else { $form->{selecttaxzone} .= - ""; + ""; } } @@ -342,11 +345,6 @@ sub form_header { $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/; } } - if ($form->{rowcount} >0) { - $form->{selecttaxzone} =~ /