Commit Graph

618 Commits

Author SHA1 Message Date
David Bomba 0d4aa5db0f Updates for gocardless requisition updates 2025-08-07 10:59:29 +10:00
David Bomba 49e044f871 Fixes for starting tasks 2025-08-07 07:20:53 +10:00
David Bomba 11f1c1ac6a Working on office upgrades 2025-08-04 12:01:26 +10:00
David Bomba c5cdf2c7d8 Refactors for yodlee - relinking accounts 2025-06-19 09:44:18 +10:00
David Bomba b13258be0e Additional tests 2025-06-05 10:49:38 +10:00
David Bomba be2cfb3064 Updated lang files 2025-05-13 08:03:41 +10:00
David Bomba 7506bb790e enforce authorize with cache key for oauth routes 2025-05-04 12:33:35 +10:00
David Bomba 7fd7c0b24d Fixes for encoding 2025-05-03 08:32:51 +10:00
David Bomba 5338ee13a8 Static analysis cleanup 2025-05-01 10:26:02 +10:00
David Bomba 4d219c474c Fixes for gmail transport for utf8 characters in subject 2025-04-30 09:49:07 +10:00
David Bomba 0d96e989f5 Refactor for document / file validation 2025-04-26 10:15:23 +10:00
David Bomba dfbbceafe5 Updates for new company creation permissions 2025-04-23 12:55:21 +10:00
David Bomba 57d68f04f2 Prevent duplicate requisitions 2025-04-11 11:27:05 +10:00
David Bomba 0a98b75b26 Fixes for EPC 2025-04-11 10:20:42 +10:00
David Bomba 5c0b0dbcf1 Updates for tax summary reports 2025-04-10 11:18:42 +10:00
David Bomba 8aa9c118fe Minor fixes for sending user 2025-04-07 06:40:19 +10:00
David Bomba 75d3721daa fixes for checks on currency id 2025-03-24 16:41:38 +11:00
David Bomba 503f180094 Updates for nordigen 429 errors 2025-03-22 11:23:54 +11:00
David Bomba 707471b374 Fixes for Yodlee reconnects 2025-03-05 16:10:33 +11:00
David Bomba 780dda4957 Updated copyright doc blocks 2025-02-17 11:11:38 +11:00
David Bomba aa5e2eff68 Fixes for returning from start() in task repo 2025-01-27 11:03:58 +11:00
David Bomba 36089a1cb4 Static analysis 2025-01-21 11:38:39 +11:00
David Bomba 4c6f4d0552 Working on zugferd calculations - with surcharges 2025-01-20 22:09:12 +11:00
David Bomba 2db1542029 Static analysis 2025-01-20 10:02:32 +11:00
David Bomba 72c35b9031
Merge pull request #10526 from dshoreman/ds/nordigen-tx-days
Nordigen custom agreements
2025-01-20 09:44:20 +11:00
David Bomba ea3f6f149d minor fixes 2025-01-15 20:03:19 +11:00
David Bomba 587b4e102a Add getters for line item discounts 2025-01-15 15:33:30 +11: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 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 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 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
Dave Shoreman e825bb0895
Nordigen: Use institution max for bank integration
While we set the days in the agreement, how many we fetch when
processing transactions depends on the `from_date` of the bank
integration. We could call `getInstitution($id)` on the API, but
consistency would dictate adding a wrapper in the Nordigen class and
it's already being called within `$nordigen->getAccount()` so it makes
more sense to extract the data in the account transformer instead.

App\Jobs\Bank\ProcessBankTransactionsNordigen also sets a from date, but
that's only used when not set on the bank integration so it can be left
at the Nordigen default of 90 days worth of transaction history.
2025-01-13 18:45:24 +00:00
Dave Shoreman d51e1527e6
Nordigen: Pass custom agreement with max history
In order to change the total days of transactions we can request, a
custom end user agreement is needed. There *are* methods to find
existing agreements, but assuming nothing else breaks it's probably
fairly safe to just go ahead and create one.

If it works, it only runs once... as far as I can tell.
2025-01-13 18:44:40 +00:00
David Bomba 0295d38500 Additional checks when using gmail/o365 mailer 2025-01-13 23:49:26 +11:00
David Bomba 406cc52279 Adjustments for design and dom elements / attributes 2025-01-13 14:16:55 +11:00
David Bomba 8916457879 Fixes for xinvoice attachments 2025-01-12 12:17:30 +11:00
David Bomba e79eab340b Minor Fixes 2025-01-11 23:24:34 +11:00
David Bomba bfab145345 Fixes for division by zero 2025-01-11 23:19:16 +11:00
David Bomba 399091cb5f Fixes for QR codes in PDFs 2025-01-11 19:19:32 +11:00
David Bomba 5c60a3efed Revert latest nordigen commit 2025-01-11 18:25:54 +11:00
David Bomba 0f1d96ef34 Fixes for static analysis 2025-01-10 15:49:21 +11:00
David Bomba b01c210253 additional props for invoice items 2025-01-09 19:46:33 +11:00
David Bomba d2d22ae268 Updates for composer dependencies 2025-01-09 18:02:40 +11:00
David Bomba 006f3aac37
Merge pull request #10425 from dshoreman/ds/nordigen-tx-days
Nordigen Transaction history UI
2025-01-08 18:32:31 +11:00
Dave Shoreman 64d78fa12b
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-06 17:33:26 +00:00
David Bomba c454ff1296 Fixes for calculate taxes 2025-01-06 17:43:55 +11:00
David Bomba 6e3ea0043b Change PDF engine for tests 2025-01-06 16:29:24 +11:00
David Bomba 6fdd4944f8 Logging in gh actions 2025-01-06 12:55:40 +11:00