1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 15:42:27 -05:00

s/r/t/ in example report lua code

This commit is contained in:
Aaron Lindsay 2017-06-23 06:01:54 -04:00
parent e49b11f349
commit c19644e0c7
2 changed files with 10 additions and 10 deletions

View File

@ -26,15 +26,15 @@ function generate()
account_type = account.Expense account_type = account.Expense
accounts = get_accounts() accounts = get_accounts()
r = tabulation.new(12) t = tabulation.new(12)
r:title(year .. " Monthly Expenses") t:title(year .. " Monthly Expenses")
series_map = account_series_map(accounts, r) series_map = account_series_map(accounts, t)
for month=1,12 do for month=1,12 do
begin_date = date.new(year, month, 1) begin_date = date.new(year, month, 1)
end_date = date.new(year, month+1, 1) end_date = date.new(year, month+1, 1)
r:label(month, tostring(begin_date)) t:label(month, tostring(begin_date))
for id, acct in pairs(accounts) do for id, acct in pairs(accounts) do
series = series_map[id] series = series_map[id]
@ -45,5 +45,5 @@ function generate()
end end
end end
return r return t
end end

View File

@ -26,14 +26,14 @@ function generate()
account_type = account.Income account_type = account.Income
accounts = get_accounts() accounts = get_accounts()
r = tabulation.new(1) t = tabulation.new(1)
r:title(year .. " Income") t:title(year .. " Income")
series_map = account_series_map(accounts, r) series_map = account_series_map(accounts, t)
begin_date = date.new(year, 1, 1) begin_date = date.new(year, 1, 1)
end_date = date.new(year+1, 1, 1) end_date = date.new(year+1, 1, 1)
r:label(1, year .. " Income") t:label(1, year .. " Income")
for id, acct in pairs(accounts) do for id, acct in pairs(accounts) do
series = series_map[id] series = series_map[id]
@ -43,5 +43,5 @@ function generate()
end end
end end
return r return t
end end