...
other supply types are not resolved on that join ("extend when confirmed").
Call chain:
BrightInvoicesController.GetInvoices
-> BrightInvoiceService.GetByCustomerAsync (validate + query + map)
- commonValidator.ValidateCustomer(customerId) (account lookup; throws on miss)
- InvoicesValidator.ValidateGetInvoicesInput(...) (input range checks; throws)
- repository.GetByCustomerAsync(...) (resolve filters + run SQL)
- BchecCache.EnsureLoaded(db) (lazy one-time BCHED load)
- resolve InvoiceListFilters (local config ?? BCHEC)
- InvoiceSql.GetByCustomer(filters) (assemble fragment SQL)
- map each DbInvoice row -> BrightInvoice (+ Info list)
(SQL lives in SonWinCommonAPI/Sql/InvoiceSql.cs; source is Sonlinc.AKOND a,
LEFT JOIN Sonlinc.AUDEBFORS ads (El only), OUTER APPLY PBSI payment sum from
Sonlinc.AKOND, plus EXISTS over Sonlinc.AKONDDOC -> Sonlinc.BDOC for HasPdf.)
--------------------------------------------------------------------------------
...