Backdated Funds in BOS balances

We need to report the backdated funds into the BOS balances (interface) accordingly to the rest of the system (TMS and statements).

Problem Description

Thanks to the past RFC, Backdated funds for TMS, already implemented in production, we are sending the proper value date to our TMS service, aka Quantum-FIS. As part of the full-picture project about our Backdated Funds in the system, we need to fix the BOS interface to show the value dates of the entries in the balances to match the reported value date to TMS.

Background

Common background

A backdated fund usually happens when we receive funds to be matched against a client balance and for any reason, like the AML or any other screening reason, the fund is held for some days. After all checks are OK, the fund is fully authorised and the entry is created in the client balance, but with the original value date of the physical entry (Bank Account Entry).

At this moment, we have in BOS two database fields for the Currency Account Entries:
- date: Mostly used along BOS and it stores the original value date of the related entry (the Bank Account Entry or the original balance entry if we are doing a reversal).
- value_datetime: Newer field added -that actually has the logic we are looking for in this epic- but only exposed in the BOS API (get_client_transaction and get_client_transactions endpoints).

Specific background

In the BOS interface we have four different pages where we show the value date of an entry:

Client balance page (the view of the Currency Account which holds the entries) Client balance page
The endpoint is: /operations/accounts/currency/view/

ReconMatch page
ReconMatch page
The endpoint is: /reconciliation/recon_match/view/

Asset page
ReconMatch page
The endpoint is: /reconciliation/asset/view/

Currency Account Entry page
ReconMatch page
The endpoint is: /operations/view/currency/entry/

Solution

All the templates use CurrencyAccountEntry.date field to show the value date in the red-highlighted boxes in the above screenshots. The solution would be replacing them by CurrencyAccountEntry.value_datetime.

On the other hand, the Client balance page calculates the balance and sort the entries by CurrencyAccountEntry.date, this needs to be fixed also.

Alternatives

Just for the record, but we don't encourage going with this alternative in this RFC.
Change the creation of Currency Account Entries to store the proper value in the date field.

Caveats

Not found for the proposed solution.

Operation

N/A

Security Impact

N/A

Performance Impact

N/A

Developer Impact

Do not use CurrencyAccountEntry.date for any new view.

Data Consumer Impact

N/A

Deployment

Current BOS releases process.

Dependencies

None.

References