Commit b27c3048 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

builder: Supply builder Fix calculation of initial stock

parent ac00359f
......@@ -451,15 +451,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
return []
from_date = date
# Prepare period_list
limit_date = getPreviousValidDate(getPreviousValidDate(from_date) - 0.1)
# evaluate future inventory at date
future_inventory_to_date = portal.portal_simulation.getFutureInventory(
to_date=from_date,
to_date=limit_date,
resource_uid=resource_value.getUid(),
node_uid=supply.getDestinationUid(),
)
# Prepare period_list
limit_date = getPreviousValidDate(getPreviousValidDate(from_date) - 0.1)
limit_date_list = []
last_date = getPreviousValidDate(history_list[-1][0])
while limit_date <= last_date:
......
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