Bug Fixes Performance improvements
v331
14 August 2026

New Features

"Post to ERP" button on the Invoicing screen — Manually trigger SAP Sales Order, Purchase Order, and Credit Note generation for invoicing sublegs directly from the Invoicing screen, instead of waiting on the automated Prismatic job. The button calls a new authenticated Vapor route that resolves the correct Prismatic flow per customer account (configured via the Rails admin console), so different accounts can route to different SAP flows without a deploy.

Confirmation dialog before bulk-setting invoicing sublegs to "Ready for ERP" — Since SAP Sales/Purchase Orders can't simply be deleted once created (reversal requires a credit note), moving sublegs to "Ready for ERP" on the Invoicing Combo Screen now shows a confirmation dialog with enough detail to verify the right rows are selected before the irreversible SAP hand-off fires.

New settlement rule: Friday before 2nd-last business day of month prior to contract month — Added to support contracts using this termination convention, with holiday roll-back of one business day.

Exposures added to Mirage Extracts — The Extracts page can now download Exposures data as CSV/JSON, alongside Valuations and YTD.

Bug Fixes

Multi-leg ICE trade capture used the wrong leg quantity — Future legs on multi-leg trades could be captured with another leg's quantity instead of their own LegQty from the source ICE message, producing an incorrect position.

POST /api/v2/asset_valuations 500s on an empty batch — An empty batch: [] array is truthy in Ruby, so the endpoint took the batch path with zero entries and crashed calling .count on nil. Empty batches now return a clear 422 instead.

FCM reconciliation breaks on settlement-day positions — Some FCMs drop positions on their settlement date while Molecule kept including them, producing spurious reconciliation breaks (especially common on daily products). A new per-reconciliation-account setting excludes positions whose settlement date equals the as-of date; existing accounts are unaffected by default.

Bulk "Set Workflow Status" incorrectly disabled — The bulk action was disabled any time a locked trade was selected, even when the account's unlock threshold would have allowed it — the frontend was second-guessing a check the backend already handles correctly.

Market Data screen color legend — Brought back in line with the legacy Ember coloring that existing customers were accustomed to.

VaR screen decimal places — Removed excess decimal places from the VaR panel (and its book/year components) for readability.

Mirage 404 and error pages — Unknown or mistyped URLs, and unhandled app errors, previously rendered a blank shell. Mirage now has a proper catch-all 404 page and an application-error page with a retry/home action, matching the legacy Ember behavior — important for cutover, since any legacy URL missed by the redirect map now lands on a real page instead of a white screen.

Gap in live CME trade capture — In an uncommon timing scenario, if the CME trade-capture service restarted at just the wrong moment, trade messages that were in the process of being saved would be lost, requiring a manual refresh to fully catch up. Trade messages are now durably recorded before the intake process moves on, closing that gap.

Internal / Infrastructure

Marks created from NRGStream now carry a data_source of nrgstream, so vendor market-data checks can rely on it consistently across sources.