[Erp5-report] r38893 tatuya - /erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 5 14:42:56 CEST 2010
Author: tatuya
Date: Tue Oct 5 14:42:55 2010
New Revision: 38893
URL: http://svn.erp5.org?rev=38893&view=rev
Log:
When accounting, the debit price is expressed by a minus quantity.
Thus, we must take into account the both minus and plus quantity.
Modified:
erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py
Modified: erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py?rev=38893&r1=38892&r2=38893&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py [utf8] (original)
+++ erp5/trunk/products/ERP5/TargetSolver/SplitAndDefer.py [utf8] Tue Oct 5 14:42:55 2010
@@ -53,7 +53,10 @@ class SplitAndDefer(CopyToTarget):
applied_rule = simulation_movement.getParentValue()
rule = applied_rule.getSpecialiseValue()
- if movement_quantity > new_movement_quantity:
+ # When accounting, the debit price is expressed by a minus quantity.
+ # Thus, we must take into account the both minus and plus quantity.
+ if ((movement_quantity < new_movement_quantity <= 0) or
+ (movement_quantity > new_movement_quantity >= 0)):
split_index = 0
new_id = "%s_split_%s" % (simulation_movement.getId(), split_index)
while getattr(aq_base(applied_rule), new_id, None) is not None:
More information about the Erp5-report
mailing list