Commit Graph

23551 Commits

Author SHA1 Message Date
David Bomba 8ffda839a9
Merge pull request #10538 from beganovich/INV2-1776-2
Update translations
2025-01-17 08:30:38 +11:00
Benjamin Beganović ea1c4d0949 Update translations 2025-01-16 17:43:56 +01:00
David Bomba 83afd96ef4
Merge pull request #10536 from turbo124/v5-develop
v5.11.25
2025-01-16 15:28:40 +11:00
David Bomba be7fb9eb10
Merge branch 'v5-develop' into v5-develop
Signed-off-by: David Bomba <turbo124@gmail.com>
2025-01-16 15:28:34 +11:00
David Bomba 597362aa1d Rate limiter 2025-01-16 13:52:41 +11:00
David Bomba e2ff4709da Expose cg settings 2025-01-16 12:49:59 +11:00
David Bomba d079113871 Fixes for namespace 2025-01-16 09:33:53 +11:00
David Bomba dd176de3b8 Update zimbabwe gold 2025-01-16 09:25:52 +11:00
David Bomba 850a6ee01f v5.11.25 2025-01-16 08:35:33 +11:00
David Bomba 7a0bd06cbe Changes for encode/decode of custom templates 2025-01-16 08:32:56 +11:00
David Bomba b705fb4919 Minor fixes for <br> tags in templates 2025-01-16 08:13:56 +11:00
David Bomba a2e9a9e8c9 Fixes for plan features 2025-01-15 20:55:11 +11:00
David Bomba 20f4d64aca Updates for bulk emails 2025-01-15 20:32:52 +11:00
David Bomba f3a9e2fa00 Updated dependencies 2025-01-15 20:09:29 +11:00
David Bomba a04894eab0 Type 2025-01-15 20:08:42 +11:00
David Bomba 19b0ff601a Updated dependencies 2025-01-15 20:07:10 +11:00
David Bomba ea3f6f149d minor fixes 2025-01-15 20:03:19 +11:00
David Bomba dc033ae7e9 Fixes for mailable logging 2025-01-15 18:15:34 +11:00
David Bomba cd7866ed8a Fixes for removing reactivate email 2025-01-15 15:51:34 +11:00
David Bomba 587b4e102a Add getters for line item discounts 2025-01-15 15:33:30 +11:00
David Bomba 8bd2213fc5 Refactor for invoice deleted 2025-01-15 15:08:34 +11:00
David Bomba c1f480695c
Merge pull request #10531 from benbrummer/v5-develop
fix syntax error preload.php
2025-01-15 12:31:49 +11:00
David Bomba 132f053b02 Always update designs post self update 2025-01-15 12:11:49 +11:00
David Bomba bd6540992a Minor cleanup for session state 2025-01-15 11:47:40 +11:00
David Bomba ba24bb78f6 Change filtering of scalars prior to validation 2025-01-15 08:52:17 +11:00
benbrummer 441666f80c
fix syntax error preload.php
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-01-14 15:15:11 +01:00
David Bomba 7574af6c3a
Merge pull request #10525 from beganovich/INV2-1776
E-invoicing: Healthchecks & regenerating tokens
2025-01-14 18:40:21 +11:00
David Bomba 4ff745de82
Merge pull request #10527 from turbo124/v5-develop
v5.11.24
2025-01-14 18:36:31 +11:00
David Bomba 5c9506a3a3 v5.11.24 2025-01-14 18:35:33 +11:00
David Bomba 6a020feb4b v5.11.24 2025-01-14 18:35:19 +11:00
David Bomba 94081a7191 Add payments to templates 2025-01-14 18:35:02 +11:00
David Bomba da9170ec62 Fixes for designs 2025-01-14 17:51:53 +11:00
David Bomba 43fa30540f Fixes for designs 2025-01-14 17:41:35 +11:00
David Bomba 5f553b6d08 Fixes for designs that use markdown 2025-01-14 17:15:35 +11:00
David Bomba d35545b366 Fixes for designs 2025-01-14 16:07:39 +11:00
David Bomba b56fcee86e Fixes for auth.net solution id 2025-01-14 07:16:08 +11:00
Dave Shoreman 00d9c61651
Fix rebase/refactor typos
Fixes the bank buttons which weren't getting their handlers registered
thanks to the `null` making it go down the wrong path, and makes sure to
use the institution id from the object passed in, not the institution_id
variable from the global scope which is only defined for renewals.

Resolves #10501
2025-01-13 19:49:32 +00:00
Dave Shoreman 7a538af7b3
Remove redundant `$expiresAt`
Leftover from a version that could use accepted EUAs.

If this functionality is ever restored, the `$eua['accepted'] === null`
should become `!$eua['accepted'] || $expiresAt > new DateTime('now')`.`
2025-01-13 19:47:48 +00:00
Dave Shoreman 03d5502d0a
Add EUA error texts 2025-01-13 19:41:16 +00:00
Dave Shoreman 684ba39f65
Show history selection screen instead of guessing
Removes all the guesswork for requisition renewals, instead opting for
the manual approach of simply redirecting to the form and updating its
handling such that it jumps straight to history selection when needed.

When the institution is preloaded (so we skip country/bank selection)
the cloned element is a country and not the bank so we need to replace
athe flag with its logo, but otherwise the code was all moved as-is.
2025-01-13 19:40:39 +00:00
Dave Shoreman 51760ef563
Support setting custom Nordigen access duration
If agreements are already available and no custom `access_days` is
passed, it will simply take the first match regardless of duration.

When a new agreement is needed, it defaults to the max supported.
2025-01-13 19:11:53 +00:00
Dave Shoreman f6a7c0ddda
Attempt to reuse existing agreements
Implements changes from #10410 but using `Arr::first()` rather than a
foreach loop to fix bugs returning invalid or expired agreements.

If an agreement exists with at least the requested `$txDays` then that
is used, otherwise a new one is created with the given parameters. If it
fails, we error out because `createRequisition()` would fail regardless.

Skips accepting EUAs: seems it's done automatically during requisition.
2025-01-13 19:10:33 +00:00
Dave Shoreman 3204163e70
Cleanup, add return types, normalise quotes 2025-01-13 19:09:02 +00:00
Dave Shoreman 66f197b857
Fix error on token-invalid failure when expired
The cache data is set to expire after an hour, at which point the call
to `$request->getCompany()` will fail because it depends internally on
the `company_key` in the response of `getTokenContent()` which is null.

By moving the company *after* the context check, we avoid the exception
but need to manually set lang as there's no context for company data.
2025-01-13 19:06:40 +00:00
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
Dave Shoreman d87d4580be
Fix back/close button display in Nordigen modal
When the country filtering mode is enabled, it adds a "Go back" button
but the close button is right on top of it. This moves the close button
to the right to avoid any click conflicts.

To fix an annoying display bug with the top offset, an observer is used
to override the default `display: none` of the back button to keep its
flex mode but with a hidden visibility so the UI doesn't move around.
2025-01-13 19:05:02 +00:00
Dave Shoreman 029f547dcc
Fine-tune transaction history options
Replaces 360 days with 365, skips the last auto-generated option to
avoid getting e.g. 720 and 730 as options when it's close to max, and
gradually increases the accumulator so options aren't so overwhelming.

Since the loop will no longer generate the final option (0 < 15), this
commit also removes the `% 30` check so the real max is always used.
2025-01-13 19:04:28 +00:00
Dave Shoreman f501f250f4
Improve Nordigen error-handling code
All failures boil down to about 3 variations - one with reason/lang, one
that has context defined but no company data, and a full variant that
also fills the company and account keys in the view.

The only other difference is redirect url coming from config when it's
not available in the context, so to simplify things this commit merges
all the failure view responses into one unified `failed` method.
2025-01-13 19:01:04 +00:00
Dave Shoreman fb53d340f9
Add selection screen for transaction history
Instead of directing the user straight to GoCardless, when a bank is
selected this will replace the institution list with a list of options
from 30 days—up to the bank's transaction limit—in 30 day increments.
2025-01-13 18:50:12 +00:00
Dave Shoreman 2501ca17c9
Allow setting number of days of transactions
If e.g. `&tx_days=365` is added to the URL, this will use it to set the
amount of history that's fetched from Nordigen on sync, with basic
safeguards to prevent it being set too low or above the bank's max.
2025-01-13 18:49:10 +00:00