Skip to content

Commit

Permalink
Fix ADJ Check
Browse files Browse the repository at this point in the history
  • Loading branch information
krambox committed Mar 21, 2022
1 parent d6ffd3a commit 9d1bf32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ibkr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ function RefreshAccount(account, since)
local summary = parseBlock(statementContent, 'StmtFunds')
local transactions = {}
for p in summary:gmatch("<StatementOfFundsLine(.-)/>") do
print(p)
--print(p)
local sm = parseargs(p)
print(sm.reportDate,sm.settleDate,sm.description,sm.activityDescription,sm.amount,sm.activityCode)
if not activityCode == 'ADJ' then
print(#transactions,sm.transactionID,sm.reportDate,sm.settleDate,sm.description,sm.activityDescription,sm.amount,sm.activityCode)
if sm.activityCode ~= 'ADJ' then
transactions[#transactions + 1] = {
name=sm.description,
amount=sm.amount,
Expand All @@ -151,6 +151,7 @@ function RefreshAccount(account, since)
end
end
-- Return balance and array of transactions.
--print(JSON():set(transactions):json())
return {
balance = cash,
transactions = transactions
Expand Down

0 comments on commit 9d1bf32

Please sign in to comment.