Skip to content

Commit

Permalink
Attachment mark in transaction list
Browse files Browse the repository at this point in the history
  • Loading branch information
guanlisheng committed Dec 10, 2024
1 parent d5eb0e8 commit 130d7b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions app/src/main/res/raw/query_alldata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ FROM CHECKINGACCOUNT_V1 TX
LEFT JOIN currencyformats_v1 cf ON cf.currencyid = FROMACC.currencyid
LEFT JOIN currencyformats_v1 cfTo ON cfTo.currencyid = TOACC.currencyid
LEFT JOIN (
select REFID, count(*) as ATTACHMENTCOUNT
from ATTACHMENT_V1
where REFTYPE = 'Transaction'
group by REFID
) AS ATT on TX.TransID and ATT.REFID
select REFID, count(*) as ATTACHMENTCOUNT
from ATTACHMENT_V1
where REFTYPE = 'Transaction'
group by REFID
) AS ATT on TX.TransID = ATT.REFID
WHERE (TX.DELETEDTIME IS NULL OR TX.DELETEDTIME = '')
10 changes: 5 additions & 5 deletions app/src/main/res/raw/query_billdeposits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ FROM BILLSDEPOSITS_V1
LEFT OUTER JOIN ACCOUNTLIST_V1 TOACCOUNT ON BILLSDEPOSITS_V1.TOACCOUNTID = TOACCOUNT.ACCOUNTID
LEFT OUTER JOIN categories ON BILLSDEPOSITS_V1.CATEGID = categories.CATEGID
LEFT JOIN (
select REFID, count(*) as ATTACHMENTCOUNT
from ATTACHMENT_V1
where REFTYPE = 'RecurringTransaction'
group by REFID
) AS ATT on BILLSDEPOSITS_V1.BDID and ATT.REFID
select REFID, count(*) as ATTACHMENTCOUNT
from ATTACHMENT_V1
where REFTYPE = 'RecurringTransaction'
group by REFID
) AS ATT on BILLSDEPOSITS_V1.BDID = ATT.REFID
3 changes: 1 addition & 2 deletions app/src/main/res/raw/query_mobiledata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ SELECT TX.TransID AS ID,
* ifnull(cf.BaseConvRate, 1) As AmountBaseConvRate
FROM CHECKINGACCOUNT_V1 TX
LEFT JOIN categories CAT ON CAT.CATEGID = TX.CATEGID
-- LEFT JOIN categories PARENTCAT ON PARENTCAT.CATEGID = CAT.PARENTID
LEFT JOIN categories PARENTCAT ON PARENTCAT.CATEGID = CAT.CATEGID
LEFT JOIN PAYEE_V1 PAYEE ON PAYEE.PAYEEID = TX.PAYEEID
LEFT JOIN ACCOUNTLIST_V1 FROMACC ON FROMACC.ACCOUNTID = TX.ACCOUNTID
Expand All @@ -56,5 +55,5 @@ FROM CHECKINGACCOUNT_V1 TX
from ATTACHMENT_V1
where REFTYPE = 'Transaction'
group by REFID
) AS ATT on TX.TransID and ATT.REFID
) AS ATT on TX.TransID = ATT.REFID
WHERE (TX.DELETEDTIME IS NULL OR TX.DELETEDTIME = '')

0 comments on commit 130d7b4

Please sign in to comment.