]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/WH.pm
SL::DB::Buchungsgruppen: Verknüpfungen und Hilfsmethoden
[kivitendo-erp.git] / SL / WH.pm
index 9a0635603af2a34e21b1d476d2083f8d96fb81ca..28e836e485cd22b3a7018b93182b004025c2678f 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -111,8 +111,7 @@ sub transfer {
       );
 
       if ($unit) {
-        $qty *= $unit->factor           || 1;
-        $qty /= $part->unit_obj->factor || 1 if $part->unit;
+        $qty = $unit->convert_to($qty, $part->unit_obj);
       }
 
       $params{chargenumber} ||= '';