X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=0334843f9ddd7cbcbf26b0642b4705dff1bc88c9;hb=a1e47d425a58b8342992daab4907591506949f07;hp=110beee65a6a085478bcc22108c57b4bce7be978;hpb=1f2c95729c5b2752ecc33eb5d5ddb4b395fe51be;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 110beee65..0334843f9 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); @@ -311,6 +308,9 @@ sub form_header { } } + $form->{radier} = + ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; + $payment = qq||; foreach $item (@{ $form->{payment_terms} }) { if ($form->{payment_id} eq $item->{id}) { @@ -320,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} .= - ""; + ""; } } @@ -339,11 +345,6 @@ sub form_header { $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/; } } - if ($form->{rowcount} >0) { - $form->{selecttaxzone} =~ /