fokus in Rechnung erstellen gefixt.
[kivitendo-erp.git] / bin / mozilla / is.pl
index 56162d5..d5bd229 100644 (file)
@@ -350,7 +350,7 @@ sub form_header {
   $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
   $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
 
-  $form->{fokus} = "invoice.customer";
+  $::request->{layout}->focus('#customer');
 
   my $follow_up_vc         =  $form->{customer};
   $follow_up_vc            =~ s/--\d*\s*$//;
@@ -407,7 +407,9 @@ sub form_footer {
   my ($tax, $subtotal);
   $form->{taxaccounts_array} = [ split / /, $form->{taxaccounts} ];
 
+  my $paymet_id = $::form->{payment_id};
   IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/;
+  $::form->{payment_id} = $paymet_id;
 
   if ( $form->{vc} eq 'customer' && !$form->{taxincluded_changed_by_user} ) {
     $form->{taxincluded} = defined($form->{taxincluded_checked}) ? $form->{taxincluded_checked} : $myconfig{taxincluded_checked};
@@ -519,7 +521,7 @@ sub update {
     map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);
     if (!$form->{"forex_$i"}) {   #read exchangerate from input field (not hidden)
       $form->{exchangerate} = $form->{"exchangerate_$i"};
-    } 
+    }
     $form->{"forex_$i"}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy');
     $form->{"exchangerate_$i"} = $form->{"forex_$i"} if $form->{"forex_$i"};
   }
@@ -833,7 +835,7 @@ sub storno {
     $form->error($locale->text("Invoice has already been storno'd!"));
   }
 
-  map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password stylesheet type))); } keys(%{ $form }));
+  map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form }));
 
   invoice_links();
   prepare_invoice();
@@ -883,8 +885,6 @@ sub delete {
   $form->header;
 
   print qq|
-<body>
-
 <form method="post" action="$form->{script}">
 |;