-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from siowena/master
Reports updated mostly for currency conversion, split where appropriate and ignore Duplicate Tx
- Loading branch information
Showing
67 changed files
with
1,761 additions
and
965 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
Account Forecast Report using Repeating Transactions | ||
|
||
Note: Requires at least one entry for account name in repeating transactions. | ||
|
||
TODO: | ||
1. Update account name in SQL (line 24). | ||
2. Update account name in Template (line 12). | ||
<h1>Account Forecast Report using Repeating Transactions</h1> | ||
<p>Figures are displayed in the Currency of the Account selected.</p> | ||
<p>Note: Requires at least one entry for Account in Repeating Transactions.</p> | ||
<p>Setup: | ||
<ol> | ||
<li>Update Account name in SQL (line 25).</li> | ||
</ol> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
Checking and Term Account Summary Report | ||
Checking and Term Account Summary Report | ||
|
||
Setup: | ||
1. Edit SQL line 35 for the account types required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
select a.ACCOUNTNAME, c.BASECONVRATE, c.PFX_SYMBOL, c.SFX_SYMBOL, | ||
(select a.INITIALBAL + total(t.TRANSAMOUNT) | ||
from | ||
(select ACCOUNTID, STATUS, | ||
(case when TRANSCODE = 'Deposit' then TRANSAMOUNT else -TRANSAMOUNT end) as TRANSAMOUNT | ||
from CHECKINGACCOUNT_V1 | ||
union all | ||
select TOACCOUNTID, STATUS, TOTRANSAMOUNT | ||
from CHECKINGACCOUNT_V1 | ||
where TRANSCODE = 'Transfer') as t | ||
where t.ACCOUNTID = a.ACCOUNTID | ||
and t.STATUS <> 'V') as Balance | ||
from ACCOUNTLIST_V1 as a | ||
inner join CURRENCYFORMATS_V1 as c on c.CURRENCYID = a.CURRENCYID | ||
where a.ACCOUNTTYPE in ('Checking', 'Term') and a.STATUS = 'Open' | ||
group by a.ACCOUNTNAME | ||
order by a.ACCOUNTNAME asc; | ||
/* Setup: edit line 35 for the account types required */ | ||
SELECT a.ACCOUNTNAME, | ||
IFNULL(CH.CURRVALUE, c.BASECONVRATE) AS CURRVALUE,-- Only use ch.currvalue for v13 DB | ||
c.PFX_SYMBOL, | ||
c.SFX_SYMBOL, | ||
c.DECIMAL_POINT, | ||
c.GROUP_SEPARATOR, | ||
( | ||
SELECT a.INITIALBAL + total(t.TRANSAMOUNT) | ||
FROM ( | ||
SELECT c1.ACCOUNTID, | ||
(CASE WHEN c1.TRANSCODE = 'Deposit' THEN c1.TRANSAMOUNT ELSE -c1.TRANSAMOUNT END) AS TRANSAMOUNT | ||
FROM CHECKINGACCOUNT_V1 AS c1 | ||
WHERE c1.STATUS NOT IN ('D', 'V') | ||
UNION ALL | ||
SELECT c2.TOACCOUNTID, | ||
c2.TOTRANSAMOUNT | ||
FROM CHECKINGACCOUNT_V1 AS c2 | ||
WHERE c2.TRANSCODE = 'Transfer' AND | ||
c2.STATUS NOT IN ('D', 'V') | ||
) | ||
AS t | ||
WHERE t.ACCOUNTID = a.ACCOUNTID | ||
) | ||
AS BALANCE | ||
FROM ACCOUNTLIST_V1 AS a | ||
INNER JOIN | ||
CURRENCYFORMATS_V1 AS c ON c.CURRENCYID = a.CURRENCYID | ||
LEFT JOIN | ||
CURRENCYHISTORY_V1 AS CH ON CH.CURRENCYID = c.CURRENCYID AND | ||
CH.CURRDATE = ( | ||
SELECT MAX(CRHST.CURRDATE) | ||
FROM CURRENCYHISTORY_V1 AS CRHST | ||
WHERE CRHST.CURRENCYID = c.CURRENCYID | ||
) | ||
WHERE a.ACCOUNTTYPE IN ('Checking', 'Term') AND | ||
a.STATUS = 'Open' | ||
GROUP BY a.ACCOUNTNAME | ||
ORDER BY a.ACCOUNTNAME ASC; |
Oops, something went wrong.