]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/oe.pl
Funktion "Erzeugnis fertigen" sucht Bestandteile im falschen Lager.(4)
[mfinanz.git] / bin / mozilla / oe.pl
index 11e220a68f499be6bd2a7b4e206c01f5a7c52a77..4dbb79ba0eef216cdf320f94ef4dd8df42ddba13 100644 (file)
@@ -434,7 +434,7 @@ sub form_header {
   $TMPL_VAR{follow_up_trans_info} =  ($form->{type} =~ /_quotation$/ ? $form->{quonumber} : $form->{ordnumber}) . " ($follow_up_vc)";
 
   if ($form->{id}) {
-    my $follow_ups = FU->follow_ups('trans_id' => $form->{id});
+    my $follow_ups = FU->follow_ups('trans_id' => $form->{id}, 'not_done' => 1);
 
     if (scalar @{ $follow_ups }) {
       $TMPL_VAR{num_follow_ups}     = scalar                    @{ $follow_ups };
@@ -560,10 +560,12 @@ sub form_footer {
     }
   }
 
+  my $grossamount = $form->{invtotal};
+  $form->{invtotal} = $form->round_amount( $form->{invtotal}, 2, 1);
   $form->{rounding} = $form->round_amount(
-    $form->round_amount($form->{invtotal}, 2, 1) - $form->round_amount($form->{invtotal}, 2)
+    $form->{invtotal} - $form->round_amount($grossamount, 2),
+    2
   );
-  $form->{invtotal} = $form->round_amount( $form->{invtotal}, 2, 1);
   $form->{oldinvtotal} = $form->{invtotal};
 
   $TMPL_VAR{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
@@ -907,7 +909,7 @@ sub orders {
                                                         reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
                                                         business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto
                                                         order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to
-                                                        parts_partnumber parts_description);
+                                                        parts_partnumber parts_description all);
   push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
 
   my   @keys_for_url = grep { $form->{$_} } @hidden_variables;