]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/DeliveryOrder.pm
DeliveryOrder: calculate_stock_in_out liefert auch die Einheit mit
[mfinanz.git] / SL / Controller / DeliveryOrder.pm
index d7dd97f9deb39835808809cb25e81918edd9f287..c96bc42ac5b88e2e18655b295444596a9ff180d9 100644 (file)
@@ -933,7 +933,6 @@ sub action_update_stock_information {
     stock_info => $yaml,
     stock_qty => $stock_qty,
   };
-
   $self->render(\ SL::JSON::to_json($response), { layout => 0, type => 'json', process => 0 });
 }
 
@@ -1796,7 +1795,9 @@ sub setup_edit_action_bar {
         action => [
           t8('Save as new'),
           call      => [ 'kivi.DeliveryOrder.save', 'save_as_new', $::instance_conf->get_order_warn_duplicate_parts ],
-          disabled  => !$self->order->id ? t8('This object has not been saved yet.') : undef,
+          disabled  =>   $self->type eq 'supplier_delivery_order' ? t8('Need a workflow for Supplier Delivery Order')
+                       : !$self->order->id                        ? t8('This object has not been saved yet.')
+                       : undef,
         ],
       ], # end of combobox "Save"
 
@@ -2152,7 +2153,7 @@ sub calculate_stock_in_out_from_stock_info {
     $units_by_name{$_->{unit}}->convert_to($_->{qty}, $units_by_name{$unit})
   } @$stock_info;
 
-  my $content  = _format_number($sum, 2);
+  my $content  = _format_number($sum, 2) . ' ' . $unit;
 
   return $content;
 }