mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Fix #7845 among other things
This commit is contained in:
@@ -143,9 +143,8 @@ class JournalUpdateService
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
Log::debug(sprintf('Now in JournalUpdateService for journal #%d.', $this->transactionJournal->id));
|
||||
|
||||
if ($this->removeReconciliation()) {
|
||||
$this->data['reconciled'] = false;
|
||||
}
|
||||
|
||||
$this->data['reconciled'] = array_key_exists('reconciled', $this->data) ? $this->data['reconciled'] : false;
|
||||
|
||||
// can we update account data using the new type?
|
||||
if ($this->hasValidAccounts()) {
|
||||
@@ -182,21 +181,6 @@ class JournalUpdateService
|
||||
$this->transactionJournal->refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
private function removeReconciliation(): bool
|
||||
{
|
||||
if (count($this->data) > 1) {
|
||||
return true;
|
||||
}
|
||||
if (1 === count($this->data) && true === array_key_exists('transaction_journal_id', $this->data)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
@@ -514,9 +498,9 @@ class JournalUpdateService
|
||||
{
|
||||
$type = $this->transactionJournal->transactionType->type;
|
||||
if ((
|
||||
array_key_exists('bill_id', $this->data)
|
||||
array_key_exists('bill_id', $this->data)
|
||||
|| array_key_exists('bill_name', $this->data)
|
||||
)
|
||||
)
|
||||
&& TransactionType::WITHDRAWAL === $type
|
||||
) {
|
||||
$billId = (int)($this->data['bill_id'] ?? 0);
|
||||
|
||||
Reference in New Issue
Block a user