mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix detection of transaction type.
This commit is contained in:
parent
2564470197
commit
d9fba39d80
@ -1095,6 +1095,10 @@ class GroupCollector implements GroupCollectorInterface
|
|||||||
#[\Override]
|
#[\Override]
|
||||||
public function sortCollection(Collection $collection): Collection
|
public function sortCollection(Collection $collection): Collection
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string $field
|
||||||
|
* @var string $direction
|
||||||
|
*/
|
||||||
foreach ($this->sorting as $field => $direction) {
|
foreach ($this->sorting as $field => $direction) {
|
||||||
$func = 'ASC' === $direction ? 'sortBy' : 'sortByDesc';
|
$func = 'ASC' === $direction ? 'sortBy' : 'sortByDesc';
|
||||||
$collection = $collection->{$func}(function (array $product, int $key) use ($field) {
|
$collection = $collection->{$func}(function (array $product, int $key) use ($field) {
|
||||||
|
File diff suppressed because one or more lines are too long
1
public/build/assets/create-8ee99efb.js
Normal file
1
public/build/assets/create-8ee99efb.js
Normal file
File diff suppressed because one or more lines are too long
@ -121,7 +121,7 @@
|
|||||||
"integrity": "sha384-ptHLIPXakGRWe8dWim7Qxgub4wolfi5rktBj2EjNw5tyt8hLq+8p+lTsBKZe5Vay"
|
"integrity": "sha384-ptHLIPXakGRWe8dWim7Qxgub4wolfi5rktBj2EjNw5tyt8hLq+8p+lTsBKZe5Vay"
|
||||||
},
|
},
|
||||||
"resources/assets/v2/pages/transactions/create.js": {
|
"resources/assets/v2/pages/transactions/create.js": {
|
||||||
"file": "assets/create-0e590bfb.js",
|
"file": "assets/create-8ee99efb.js",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_format-money-2cbd3c32.js",
|
"_format-money-2cbd3c32.js",
|
||||||
"_create-empty-split-c1e678fd.js",
|
"_create-empty-split-c1e678fd.js",
|
||||||
@ -131,7 +131,7 @@
|
|||||||
],
|
],
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"src": "resources/assets/v2/pages/transactions/create.js",
|
"src": "resources/assets/v2/pages/transactions/create.js",
|
||||||
"integrity": "sha384-E0yymaxo99O2vsNgsuJ2KZD4tBnB+ly/ZlpuS9gJakCJIWWHGxK5z7G1wayhnrK3"
|
"integrity": "sha384-YAYq+i4TsXKcDsNl7dwP0Jp55HDqvQvucPeSbBt8iqWp+0SdedS90++Q7qMKBadb"
|
||||||
},
|
},
|
||||||
"resources/assets/v2/pages/transactions/edit.js": {
|
"resources/assets/v2/pages/transactions/edit.js": {
|
||||||
"file": "assets/edit-0910e359.js",
|
"file": "assets/edit-0910e359.js",
|
||||||
|
@ -183,7 +183,7 @@ let transactions = function () {
|
|||||||
if ('Expense account' === sourceType && ['Asset account', 'Debt', 'Loan', 'Mortgage'].includes(destType)) {
|
if ('Expense account' === sourceType && ['Asset account', 'Debt', 'Loan', 'Mortgage'].includes(destType)) {
|
||||||
this.groupProperties.transactionType = 'deposit';
|
this.groupProperties.transactionType = 'deposit';
|
||||||
console.warn('FORCE transaction type to be "' + this.groupProperties.transactionType + '".');
|
console.warn('FORCE transaction type to be "' + this.groupProperties.transactionType + '".');
|
||||||
this.entries[0].source_account.id = null;
|
this.entries[0].source_account.id = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (['Debt', 'Loan', 'Mortgage'].includes(sourceType) && 'Asset account' === destType) {
|
if (['Debt', 'Loan', 'Mortgage'].includes(sourceType) && 'Asset account' === destType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user