]> wagnertech.de Git - kivitendo-erp.git/blobdiff - bin/mozilla/oe.pl
PriceSource: Mehr Informationen an Preise übergeben
[kivitendo-erp.git] / bin / mozilla / oe.pl
index e3de085858fda03bd87edf629c6ba2c9422a934d..8424f9c641ff1d8fcdc38d0f44bb5ffe88b117c1 100644 (file)
@@ -692,12 +692,6 @@ sub update {
         $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
         $form->{"lastcost_$i"}  = $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, $decimalplaces);
         $form->{"qty_$i"}       = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
-
-        # get pricegroups for parts
-        IS->get_pricegroups_for_parts(\%myconfig, \%$form);
-
-        # build up html code for prices_$i
-        &set_pricegroup($i);
       }
 
       display_form();
@@ -1510,10 +1504,6 @@ sub invoice {
       $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
   }
 
-  #  show pricegroup in newly loaded invoice when creating invoice from quotation/order
-  IS->get_pricegroups_for_parts(\%myconfig, \%$form);
-  set_pricegroup($_) for 1 .. $form->{rowcount};
-
   &display_form;
 
   $main::lxdebug->leave_sub();
@@ -1816,6 +1806,7 @@ sub poso {
 
   # reset
   map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued customer vendor creditlimit creditremaining discount tradediscount oldinvtotal delivered ordnumber);
+  delete $form->{"orderitems_id_$_"} for 1 .. $form->{"rowcount"};  # always reset orderitems_id
 
   # if purchase_order was generated from sales_order, use  lastcost_$i as sellprice_$i
   # also reset discounts
@@ -1823,7 +1814,6 @@ sub poso {
     for my $i (1 .. $form->{rowcount}) {
       $form->{"sellprice_${i}"} = $form->{"lastcost_${i}"};
       $form->{"discount_${i}"}  = 0;
-      delete $form->{"orderitems_id_$_"};
     };
   };
 
@@ -2118,3 +2108,4 @@ sub dispatcher {
 
   $::form->error($::locale->text('No action defined.'));
 }
+