Income vs. expense report (monthly) WITH transfers to loan

Page 1 of 1
5 posts
Income vs. expense report (monthly) WITH transfers to loan

spoker
New MMEX User

Posts: 12
Joined: Wed Nov 09, 2016 5:24 pm
Hello,

I would love a income vs. expense report, like the one that is available in mmex 1.3.0rc2, but with transfers to a loan account added to the expenses. Tbese transfers are usually the repayment of the principal of a mortgage and represent money that is no longer available.

I, and i think a lot of other people to, would love this.

Can I get this done with a custom report? 
Re: Income vs. expense report (monthly) WITH transfers to lo

spoker
New MMEX User

Posts: 12
Joined: Wed Nov 09, 2016 5:24 pm
Nobody tried this before? 
Can you help me get started on this, using maybe another report as a base?
Re: Income vs. expense report (monthly) WITH transfers to lo

spoker
New MMEX User

Posts: 12
Joined: Wed Nov 09, 2016 5:24 pm
Anybody care to help get me started?


Thanks
Re: Income vs. expense report (monthly) WITH transfers to lo

spoker
New MMEX User

Posts: 12
Joined: Wed Nov 09, 2016 5:24 pm
I tried it myself based on another report in the github repository (https://github.com/moneymanagerex/gener ... nueByMonth)
It's not really 'clean' and contains hardcoded accountID's, but it works.

Any tips on how to clean this up so it looks like the built-in revenue vs expenses charts?

Code: Select all
select 
    Periode,
    sum(Deposit) as Inkomsten,
   sum(Transfer) as Afbetaling,
    sum(Withdrawal) as Uitgave,
    round(sum(Deposit) + sum(Withdrawal) + sum(Transfer),2) as Totaal
from (  
    select 
        strftime('%Y-%m', TRANSDATE) as Periode,
        case
            when transcode = 'Deposit' then transamount
            else 0
        end as Deposit,
        case
          when transcode = 'Withdrawal' then -transamount
          else 0
        end as Withdrawal,
      case
         when transcode = 'Transfer' and toaccountid=('19') then -transamount
         when transcode = 'Transfer' and toaccountid=('20') then -transamount
         else 0
      end as Transfer
        --,*
    from
        checkingaccount_V1
    where
        TRANSDATE > date('now', 'start of month','-4 year','localtime')
        and status <>'V'
)
group by periode
order by periode asc
Re: Income vs. expense report (monthly) WITH transfers to lo

spoker
New MMEX User

Posts: 12
Joined: Wed Nov 09, 2016 5:24 pm
Page 1 of 1
Who is online

Users browsing this forum: No registered users and 1 guest

cron