Commit 1b351b31 authored by Jean-Paul Smets's avatar Jean-Paul Smets

cast to float


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d4c1fe90
......@@ -40,8 +40,8 @@ class Distribute(DeliverySolver):
Solve a delivery by reducing / increasing each simulation movement
it relates to
"""
delivery_line_quantity = movement.getQuantity()
delivery_line_target_quantity = movement.getTargetQuantity()
delivery_line_quantity = float(movement.getQuantity())
delivery_line_target_quantity = float(movement.getTargetQuantity())
if delivery_line_quantity != delivery_line_target_quantity and delivery_line_quantity != 0 :
# XXXXXXXXXXXXXXXXXXXXXXXXX something special should be done if delivery_line_quantity == 0 !
distribute_ratio = delivery_line_target_quantity / delivery_line_quantity
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment