Filterkriterien für Buchungsjournal-Erweiterung von gerade eindeutiger bezeichnet...
[kivitendo-erp.git] / bin / mozilla / is.pl
index 9f57eab..c5d5f89 100644 (file)
@@ -94,14 +94,6 @@ sub edit {
   $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
   #/show hhistory button
 
-  if ($form->{type} eq "credit_note") {
-    $form->{title} = $locale->text('Edit Credit Note');
-    $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
-  } else {
-    $form->{title} = $locale->text('Edit Sales Invoice');
-    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
-  }
-
   my ($language_id, $printer_id);
   if ($form->{print_and_post}) {
     $form->{action}   = "print";
@@ -109,7 +101,16 @@ sub edit {
     $language_id = $form->{language_id};
     $printer_id = $form->{printer_id};
   }
+
   &invoice_links;
+  if ($form->{type} eq "credit_note") {
+    $form->{title} = $locale->text('Edit Credit Note');
+    $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
+  } else {
+    $form->{title} = $locale->text('Edit Sales Invoice');
+    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
+  }
+
   &prepare_invoice;
   if ($form->{print_and_post}) {
     $form->{language_id} = $language_id;
@@ -133,7 +134,6 @@ sub invoice_links {
 
   # create links
   $form->{webdav}   = $::lx_office_conf{features}->{webdav};
-  $form->{lizenzen} = $::lx_office_conf{features}->{lizenzen};
 
   $form->create_links("AR", \%myconfig, "customer");
 
@@ -364,7 +364,7 @@ sub form_header {
     title creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id
     max_dunning_level dunning_amount
     shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax
-    shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus
+    shiptoemail shiptodepartment_1 shiptodepartment_2  shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus
     convert_from_do_ids convert_from_oe_ids
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
@@ -472,7 +472,7 @@ sub update {
 
   $main::auth->assert('invoice_edit');
 
-  my ($recursive_call) = shift;
+  my ($recursive_call) = @_;
 
   $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
 
@@ -522,7 +522,7 @@ sub update {
 
       if ($rows > 1) {
 
-        &select_item;
+        select_item(mode => 'IS');
         ::end_of_request();
 
       } else {
@@ -561,16 +561,6 @@ sub update {
 
         $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
 
-        if ($::lx_office_conf{features}->{lizenzen}) {
-          if ($form->{"inventory_accno_$i"} ne "") {
-            $form->{"lizenzen_$i"} = qq|<option></option>|;
-            foreach my $item (@{ $form->{LIZENZEN}{ $form->{"id_$i"} } }) {
-              $form->{"lizenzen_$i"} .= qq|<option value="$item->{"id"}">$item->{"licensenumber"}</option>|;
-            }
-            $form->{"lizenzen_$i"} .= qq|<option value=-1>Neue Lizenz</option>|;
-          }
-        }
-
         # get pricegroups for parts
         IS->get_pricegroups_for_parts(\%myconfig, \%$form);