修复迟到成交跨公司行为的经济账本校正

This commit is contained in:
boris
2026-09-14 21:14:20 +08:00
parent ef9cc39882
commit 05f1cbbe00
11 changed files with 1447 additions and 154 deletions
+9
View File
@@ -2766,6 +2766,15 @@ where
if execution.side == OrderSide::Sell {
let date = execution.executed_at.with_timezone(&chrono::FixedOffset::east_opt(8 * 3600).unwrap()).date_naive();
self.mark_same_day_sold(date, &execution.symbol);
if let Some(adjustment) = &execution.corporate_adjustment {
for successor in adjustment
.actions
.iter()
.filter_map(|action| action.successor_symbol.as_deref())
{
self.mark_same_day_sold(date, successor);
}
}
}
}