fix(stock-pool): reconcile completed entry quantities before repricing
This commit is contained in:
@@ -1856,8 +1856,10 @@ pub fn build_stock_pool_target_plan_with_fee_model(
|
||||
if max_quantity < row.delta_quantity {
|
||||
row.delta_quantity = max_quantity;
|
||||
row.target_quantity = row.current_quantity + max_quantity;
|
||||
row.status = "REDUCE_TO_ALLOWED_QUANTITY".to_string();
|
||||
row.reason = "按当前可用资金缩量;卖出资金确认后需重新预览".to_string();
|
||||
if max_quantity < allocation_quantity {
|
||||
row.status = "REDUCE_TO_ALLOWED_QUANTITY".to_string();
|
||||
row.reason = "按当前可用资金缩量;卖出资金确认后需重新预览".to_string();
|
||||
}
|
||||
}
|
||||
remaining_cash -= cost(row.delta_quantity)?;
|
||||
position_budget -= cost(row.delta_quantity)?;
|
||||
|
||||
Reference in New Issue
Block a user