[Erp5-report] r28025 - /erp5/trunk/products/ERP5/Document/TradeModelLine.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 8 15:37:53 CEST 2009
Author: fabien
Date: Wed Jul 8 15:37:50 2009
New Revision: 28025
URL: http://svn.erp5.org?rev=28025&view=rev
Log:
if base_application is not in the slice range, quantity is 0
Modified:
erp5/trunk/products/ERP5/Document/TradeModelLine.py
Modified: erp5/trunk/products/ERP5/Document/TradeModelLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelLine.py?rev=28025&r1=28024&r2=28025&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] Wed Jul 8 15:37:50 2009
@@ -265,7 +265,10 @@
model_slice_min = cell.getQuantityRangeMin()
model_slice_max = cell.getQuantityRangeMax()
base_application = tmp_movement.getQuantity(0.0)
- if base_application-model_slice_min>0:
+ if base_application < model_slice_min:
+ # if base_application is not in the slice range, quantity is 0
+ tmp_movement.setQuantity(0)
+ elif base_application-model_slice_min > 0:
if base_application <= model_slice_max:
tmp_movement.setQuantity(base_application-model_slice_min)
elif model_slice_max:
More information about the Erp5-report
mailing list