invoiceninja/app/Http/Controllers/Bank
Dave Shoreman fb47c29c91
Find old EUA to get tx_days for new agreement
The end user agreement ID isn't stored with the bank integration, but it
*is* returned as part of the error for an expired account which works
perfectly for the case of renewing an expired requisition.

When `tx_days` isn't set in the request (i.e. it's a renewal) we instead
extract the EUA ID from the account error after getting the integration,
then once we have the EUA we're able to restore the old tx_days setting.

Since the BankIntegration query is used in both endpoints, this moves it
to a method with `firstOrFail()` rather than `first()` which also allows
for a cleanup of the integration saving code with try/catch/finally to
make it a little clearer which values apply to both new+existing cases.
2025-01-13 19:06:01 +00:00
..
NordigenController.php Find old EUA to get tx_days for new agreement 2025-01-13 19:06:01 +00:00
YodleeController.php Static analysis 2024-07-14 21:28:54 +10:00