]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/io.pl
Revert "JavaScript-Plugin: auch als Filter einsetzen können"
[mfinanz.git] / bin / mozilla / io.pl
index 4ad3cbf2fe66810cf2410c77ac1e24768fc0bf1a..742a7ffd1dc888f2e4586f123ac03cac0cf70220 100644 (file)
@@ -345,7 +345,7 @@ sub display_row {
     if ($form->{"id_${i}"} && !$is_delivery_order) {
       my $price_source  = SL::PriceSource->new(record_item => $record_item, record => $record);
       my $price         = $price_source->price_from_source($::form->{"active_price_source_$i"});
-      my $discount      = $price_source->price_from_source($::form->{"active_discount_source_$i"});
+      my $discount      = $price_source->discount_from_source($::form->{"active_discount_source_$i"});
       my $best_price    = $price_source->best_price;
       my $best_discount = $price_source->best_discount;
       $column_data{price_source} .= $cgi->button(-value => $price->source_description, -onClick => "kivi.io.price_chooser($i)");
@@ -507,7 +507,8 @@ sub select_item {
   $::form->header;
 
   my @item_list = map {
-    $_->{display_sellprice} /= $_->{price_factor} if ($_->{price_factor});
+    # maybe there is a better backend function or way to calc
+    $_->{display_sellprice} = ($_->{price_factor}) ? $_->{sellprice} / $_->{price_factor} : $_->{sellprice};
     $_;
   } @{ $::form->{item_list} };
 
@@ -1117,7 +1118,7 @@ sub print_options {
   $form->{PD}{ $form->{formname} } = "selected";
   $form->{DF}{ $form->{format} }   = "selected";
   $form->{OP}{ $form->{media} }    = "selected";
-  $form->{SM}{ $form->{formname} } = "selected";
+  $form->{SM}{ $form->{sendmode} } = "selected";
 
   push @FORMNAME, grep $_,
     ($form->{type} eq 'purchase_order') ? (