Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted transactions should be excluded from Last Used date query #5467

Closed
1 task done
tactilis opened this issue Dec 25, 2022 · 3 comments
Closed
1 task done

Deleted transactions should be excluded from Last Used date query #5467

tactilis opened this issue Dec 25, 2022 · 3 comments
Milestone

Comments

@tactilis
Copy link

MMEX version:

  • 1.6.2

See https://forum.moneymanagerex.org/viewtopic.php?p=23647

Deleted transactions are being included in the query to determine the 'Last Used' default date for new transactions.

Expected result

Only the transactions visible in the account should be used to determine the 'Last Used' default date for new transactions. Deleted transactions should be excluded.

@whalley whalley added the bug label Dec 26, 2022
@whalley whalley added this to the v1.6.3 milestone Dec 26, 2022
@vomikan vomikan modified the milestones: v1.6.4, v1.6.3 Jan 9, 2023
@vomikan
Copy link
Member

vomikan commented Jan 10, 2023

There is a problem. Only for newly created transactions, the DELETEDTIME field is empty. For previously created there null.

image

therefore, even if there is a transaction, its date is not taken into account.
image

vomikan added a commit to vomikan/moneymanagerex that referenced this issue Jan 10, 2023
vomikan added a commit that referenced this issue Jan 10, 2023
vomikan added a commit to vomikan/moneymanagerex that referenced this issue Jan 10, 2023
@vomikan vomikan added fixed and removed help wanted labels Jan 10, 2023
vomikan added a commit that referenced this issue Jan 10, 2023
fix(#5467): deletedtime null issue
@n-stein
Copy link
Contributor

n-stein commented Jan 10, 2023

We ran into a similar issue before with the nulls. In the next DB update script perhaps we should set all the nulls to blanks and change tables.sql to specify the default for DELETEDTIME as blank. That way using DELETEDTIME(wxEmptyString) in a find_all will return all valid records.

vomikan added a commit to vomikan/moneymanagerex that referenced this issue Jan 10, 2023
vomikan added a commit that referenced this issue Jan 10, 2023
vomikan added a commit to vomikan/moneymanagerex that referenced this issue Jan 10, 2023
vomikan added a commit that referenced this issue Jan 10, 2023
@vomikan
Copy link
Member

vomikan commented Jan 10, 2023

I wondered if this algorithm is correct?
It finds the maximum transaction date of the account, but less than or equal to today's date. It probably works well in most cases. But for those who start transactions for the future, it does not really help.
And the LASTUPDATEDTIME attribute also appeared. We can use it too.

We can make more options:

  1. None
  2. Last used
  3. Maximum invoice date
  4. Max. but less than today
  5. Maximum per month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants