Compare commits

...

10 Commits

Author SHA1 Message Date
James Cole
4d7909e23d Merge branch 'release/v6.0.30' 2023-10-28 18:21:13 +02:00
James Cole
6f13600fb5 Add missing method. 2023-10-28 18:18:12 +02:00
James Cole
c9fefcd8f4 Add missing method. 2023-10-28 18:08:43 +02:00
James Cole
fa31483b02 Merge branch 'main' into develop 2023-10-28 17:38:50 +02:00
James Cole
e7be0eae8a Add workflow dispatch 2023-10-28 17:38:42 +02:00
James Cole
86c70cf232 Merge tag 'v6.0.29' into develop
v6.0.29
2023-10-28 17:32:00 +02:00
James Cole
a3490e97c0 Merge branch 'release/v6.0.29' 2023-10-28 17:31:59 +02:00
James Cole
85b1768908 Fix issue in release. 2023-10-28 17:31:42 +02:00
James Cole
6ab462a795 Fix issue in bill transformer. 2023-10-28 17:28:54 +02:00
James Cole
70f46338db Merge tag 'v6.0.28' into develop
v6.0.28
2023-10-28 17:18:51 +02:00
9 changed files with 34 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
name: 'Code - Run Sonarcloud'
on:
pull_request:
workflow_dispatch:
push:
branches:
- main

View File

@@ -104,7 +104,7 @@ class NewUserController extends Controller
// if is null, set to EUR:
if (null === $currency) {
$currency = $currencyRepository->findByCodeNull('EUR');
$currency = $currencyRepository->findByCode('EUR');
}
$currencyRepository->enable($currency);

View File

@@ -435,7 +435,7 @@ class BudgetRepository implements BudgetRepositoryInterface
$currencyCode = (string)($data['currency_code'] ?? '');
$currency = $repos->find($currencyId);
if (null === $currency) {
$currency = $repos->findByCodeNull($currencyCode);
$currency = $repos->findByCode($currencyCode);
}
if (null !== $currency) {
$autoBudget->transaction_currency_id = $currency->id;

View File

@@ -239,6 +239,14 @@ class CurrencyRepository implements CurrencyRepositoryInterface
$currency->save();
}
/**
* @inheritDoc
*/
public function findByName(string $name): ?TransactionCurrency
{
return TransactionCurrency::where('name', $name)->first();
}
/**
* Find by object, ID or code. Returns user default or system default.
*

View File

@@ -84,6 +84,13 @@ interface CurrencyRepositoryInterface
*/
public function findByCode(string $currencyCode): ?TransactionCurrency;
/**
* @param string $name
*
* @return TransactionCurrency|null
*/
public function findByName(string $name): ?TransactionCurrency;
/**
* Find by object, ID or code. Returns user default or system default.
*

View File

@@ -1536,9 +1536,9 @@ class OperatorQuerySearch implements SearchInterface
$parts = explode(' ', $value);
$value = trim($parts[count($parts) - 1], "() \t\n\r\0\x0B");
}
$result = $this->currencyRepository->findByCodeNull($value);
$result = $this->currencyRepository->findByCode($value);
if (null === $result) {
$result = $this->currencyRepository->findByNameNull($value);
$result = $this->currencyRepository->findByName($value);
}
return $result;

View File

@@ -86,7 +86,7 @@ class BillTransformer extends AbstractTransformer
foreach ($payDates as $string) {
$payDatesFormatted[] = Carbon::createFromFormat('!Y-m-d', $string, config('app.timezone'))->toAtomString();
}
$nextExpectedMatch = null;
$nextExpectedMatch = '';
if (null !== ($payDates[0] ?? null)) {
$nextExpectedMatch = Carbon::createFromFormat('!Y-m-d', $payDates[0], config('app.timezone'))->toAtomString();
}

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 6.0.30 - 2023-10-29
### Fixed
- Missing method after refactoring.
## 6.0.29 - 2023-10-29
### Fixed
- Null pointer in bill overview
## 6.0.28 - 2023-10-29
### Added

View File

@@ -112,7 +112,7 @@ return [
'handle_debts' => true,
// see cer.php for exchange rates feature flag.
],
'version' => '6.0.28',
'version' => '6.0.30',
'api_version' => '2.0.11',
'db_version' => 21,