fix(core): no broker totals for one investor side

With fd=F or fd=D, IPOT's footer covers only that side's buying: BBCA's
foreign/regular summary for 2026-10-16 gives T. Val 1.6 T while its top
seller alone sold 2.0 T. Passing it through as the range total gave
consumers a denominator smaller than one listed broker, so total_value,
total_lots and average_price are now null for an investor-filtered summary.
The page-to-summary step is a pure function, tested on both fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
hermes 2026-10-18 05:32:29 +00:00
commit 7c8151a3a6
3 changed files with 77 additions and 26 deletions

View file

@ -94,7 +94,9 @@ WIB as the fallback.
- Figures of a million and more arrive abbreviated (`1.6 M`); they are scaled
in decimal and the summary's `rounded` flag says so. `F. NVal` ignores the
investor and board filters, so `foreign_net_value` is null for a filtered
summary.
summary. With `fd=F` or `fd=D` the footer covers only that side's buying
(BBCA 2026-10-16 foreign: `T. Val` 1.6 T while seller CC alone sold
2.0 T), so totals are null for an investor-filtered summary.
- An unknown code is a 200 with `Invalid stock code!` (`SYMBOLNOTFOUND`). The
server also answers spurious nginx 404s for seconds at a time, so the client
retries 404 and 5xx with backoff. A range without trades is an empty summary.