-
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 #11 from siena123/master
new report
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
List all user colored transactions. | ||
|
||
Use CTRL 1 through CTRL 7 to set color. Use CTRL 0 to clear color. | ||
Map specific colors used in MMEX View Options. |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
local base_total = 0; | ||
|
||
function handle_record(record) | ||
local prefix = record:get("PFX_SYMBOL"); | ||
local suffix = record:get("SFX_SYMBOL"); | ||
local amount = record:get("TRANSAMOUNT"); | ||
record:set("TRANSAMOUNT", prefix .. string.format("%.2f", amount) .. suffix); | ||
base_total = base_total + record:get("BaseAmount"); | ||
end | ||
|
||
function complete(result) | ||
result:set("BaseTotal", base_total); | ||
end |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
select t.FOLLOWUPID, t.PAYEENAME, t.TRANSDATE, t.TRANSAMOUNT | ||
, t.TRANSAMOUNT*c.BASECONVRATE as BaseAmount | ||
, c.PFX_SYMBOL, c.SFX_SYMBOL | ||
from | ||
(select p.PAYEENAME as PAYEENAME, c1.TRANSDATE as TRANSDATE, c1.FOLLOWUPID as FOLLOWUPID, | ||
(case when c1.TRANSCODE = 'Deposit' then c1.TRANSAMOUNT else -c1.TRANSAMOUNT end) as TRANSAMOUNT, | ||
a1.CURRENCYID as CURRENCYID | ||
from CHECKINGACCOUNT_V1 as c1 | ||
inner join PAYEE_V1 as p on p.PAYEEID = c1.PAYEEID | ||
inner join ACCOUNTLIST_V1 as a1 on a1.ACCOUNTID = c1.ACCOUNTID | ||
union all | ||
select a2.ACCOUNTNAME, c2.TRANSDATE, c2.FOLLOWUPID, c2.TOTRANSAMOUNT, a2.CURRENCYID | ||
from CHECKINGACCOUNT_V1 as c2 | ||
inner join ACCOUNTLIST_V1 as a2 on a2.ACCOUNTID = c2.TOACCOUNTID | ||
where TRANSCODE = 'Transfer') as t | ||
inner join CURRENCYFORMATS_V1 as c on t.CURRENCYID=c.CURRENCYID | ||
where t.FOLLOWUPID > 0 and t.FOLLOWUPID <= 7 | ||
order by t.FOLLOWUPID asc, t.PAYEENAME asc, t.TRANSDATE asc; |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http - equiv = "Content-Type" content = "text/html" /> | ||
<title><TMPL_VAR REPORTNAME></title> | ||
<link href = "master.css" rel = "stylesheet" /> | ||
</head> | ||
<body> | ||
<div class = "container"> | ||
<h3><TMPL_VAR REPORTNAME></h3> | ||
<TMPL_VAR TODAY><hr> | ||
<div class = "row"> | ||
<div class = "col-xs-2"></div> | ||
<div class = "col-xs-8"> | ||
<table class = "table"> | ||
<thead> | ||
<tr> | ||
<th>Color</th> | ||
<th>Payee Name</th> | ||
<th>Date</th> | ||
<th class="text-center">Amount</th> | ||
<th class="text-center">Base Amount</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<TMPL_LOOP NAME=CONTENTS> | ||
<tr> | ||
<td><TMPL_VAR "FOLLOWUPID"></td> | ||
<td><TMPL_VAR "PAYEENAME"></td> | ||
<td><TMPL_VAR "TRANSDATE"></td> | ||
<td class = "text-right"><TMPL_VAR "TRANSAMOUNT"></td> | ||
<td class = "money text-right"><TMPL_VAR "BaseAmount"></td> | ||
</tr> | ||
</TMPL_LOOP> | ||
</tbody> | ||
<tfoot> | ||
<tr class="total"> | ||
<td>Total</td> | ||
<td></td> | ||
<td></td> | ||
<td></td> | ||
<td class="money text-right"><TMPL_VAR BaseTotal></td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
<TMPL_LOOP ERRORS> | ||
<hr> | ||
<TMPL_VAR ERROR> | ||
</TMPL_LOOP> | ||
</div> | ||
</div> | ||
</body> | ||
<script> | ||
<!--Format numbers--> | ||
function currency(n) { n = parseFloat(n); return isNaN(n) ? 0 : n.toFixed(2); } | ||
var elements = document.getElementsByClassName("money"); | ||
for (var i = 0; i < elements.length; i++) | ||
{ elements[i].innerHTML = "<TMPL_VAR PFX_SYMBOL>" + currency(elements[i].innerHTML) + "<TMPL_VAR SFX_SYMBOL>"; } | ||
</script> | ||
</html> |