ananthakumaran / paisa

Paisa – Personal Finance Manager. https://paisa.fyi demo: https://demo.paisa.fyi
https://paisa.fyi
GNU Affero General Public License v3.0
2.34k stars 117 forks source link

Unable to set recurring transaction on Account with more than two level of depth. #104

Closed avinashkanaujiya closed 8 months ago

ananthakumaran commented 8 months ago

@avinashkanaujiya could you give an example? I don't see how the account level is related to recurring transactions.

avinashkanaujiya commented 8 months ago
= Expenses:Utilities:Electricity & Maintainance:Rented
    ; Recurring: CAM Recharge

= expr account=~/Electricity:Home/
    ; Recurring: Electricity

= Income:Salary:ABC
    ; Recurring: Salary

= Expenses:Rent
    ; Recurring: Rent

Of this, only Rent one, i.e the last one is working.

ananthakumaran commented 8 months ago

post some sample transactions as well

avinashkanaujiya commented 8 months ago
2023-10-23      Electricity payment on xxxx xxxxx App. 
    Expenses:Utilities:Electricity & Maintainance:Rented    XXXX INR
    Assets:Checking:Paytm

2023-11-08      MV electricity bill via Paytm bank. 
    Expenses:Utilities:Electricity:Home       XXXX INR
    Assets:Checking:Paytm

2023-11-29     electricity maintenance. Monthly payment paid using Paytm bank.
    Expenses:Utilities:Electricity & Maintainance:Rented    XXXX INR
    Assets:Checking:Paytm

2023-10-08      Rent.
    Expenses:Rent                              XXXXX INR
    Assets:Checking:Paytm

2023-11-01      Rent payment via Paytm bank. 
    Expenses:Rent                              XXXXX INR
    Assets:Checking:Paytm

2023-12-02      Rent payment paid using Paytm bank. 
    Expenses:Rent                              XXXXX INR
    Assets:Checking:Paytm

2023-10-01 Salary from xxxx
    Income:Salary:ABC                       -XXXXXX INR
    Expenses:Tax                               XXXXX INR
    Assets:Debt:EPF                             XXXX INR
    Assets:Checking:xxxxx

2023-10-04 xxxxx Interest
    Income:Interest:xxxxx                         -98 INR
    Assets:Checking:xxxxx

2023-10-17 Paytm FD Interest
    Income:Interest:Paytm FD                     -86 INR
    Assets:Debt:Paytm FD

2023-10-31 Paytm FD Interest
    Income:Interest:Paytm FD                    -106 INR
    Assets:Debt:Paytm FD

2023-11-01      Salary from xxxxxxx. 
    Income:Salary:ABC                       -XXXXX INR
    Expenses:Tax                               XXXXX INR
    Assets:Debt:EPF                             XXXXX INR
    Assets:Checking:HSBC

2023-12-01      Salary from xxxxxx.
    Assets:Checking:xxxxx                      XXXXX INR
    Expenses:Tax                               XXXX INR
    Assets:Debt:EPF                             XXXX INR
    Income:Salary:ABC
ananthakumaran commented 8 months ago

I can get it working, but there are a few things to keep in mind.

1) there need to be at least 2 matching transactions, otherwise, it won't show up 2) The rules should be present before the transactions, otherwise it will not be applied. Is this your real issue?

Depth has nothing to do with recurring transactions, as long as the metadata is attached, it will work

image

You can use the CSV command to view the ledger output with the tags applied (last column)

ledger -f test.ledger  csv
"2023/10/01","","Salary from xxxx","Income:Salary:ABC","INR","-100",""," Recurring: Salary"
"2023/10/01","","Salary from xxxx","Expenses:Tax","INR","100","",""
"2023/10/01","","Salary from xxxx","Assets:Debt:EPF","INR","100","",""
"2023/10/01","","Salary from xxxx","Assets:Checking:xxxxx","INR","-100","",""
"2023/10/04","","xxxxx Interest","Income:Interest:xxxxx","INR","-98","",""
"2023/10/04","","xxxxx Interest","Assets:Checking:xxxxx","INR","98","",""
"2023/10/08","","Rent.","Expenses:Rent","INR","100",""," Recurring: Rent"
"2023/10/08","","Rent.","Assets:Checking:Paytm","INR","-100","",""
"2023/10/17","","Paytm FD Interest","Income:Interest:Paytm FD","INR","-86","",""
"2023/10/17","","Paytm FD Interest","Assets:Debt:Paytm FD","INR","86","",""
"2023/10/23","","Electricity payment on xxxx xxxxx App.","Expenses:Utilities:Electricity & Maintainance:Rented","INR","100",""," Recurring: CAM Recharge"
"2023/10/23","","Electricity payment on xxxx xxxxx App.","Assets:Checking:Paytm","INR","-100","",""
"2023/10/31","","Paytm FD Interest","Income:Interest:Paytm FD","INR","-106","",""
"2023/10/31","","Paytm FD Interest","Assets:Debt:Paytm FD","INR","106","",""
"2023/11/01","","Rent payment via Paytm bank.","Expenses:Rent","INR","100",""," Recurring: Rent"
"2023/11/01","","Rent payment via Paytm bank.","Assets:Checking:Paytm","INR","-100","",""
"2023/11/01","","Salary from xxxxxxx.","Income:Salary:ABC","INR","-100",""," Recurring: Salary"
"2023/11/01","","Salary from xxxxxxx.","Expenses:Tax","INR","100","",""
"2023/11/01","","Salary from xxxxxxx.","Assets:Debt:EPF","INR","100","",""
"2023/11/01","","Salary from xxxxxxx.","Assets:Checking:HSBC","INR","-100","",""
"2023/10/08","","MV electricity bill via Paytm bank.","Expenses:Utilities:Electricity:Home","INR","100",""," Recurring: Electricity"
"2023/10/08","","MV electricity bill via Paytm bank.","Assets:Checking:Paytm","INR","-100","",""
"2023/11/08","","MV electricity bill via Paytm bank.","Expenses:Utilities:Electricity:Home","INR","100",""," Recurring: Electricity"
"2023/11/08","","MV electricity bill via Paytm bank.","Assets:Checking:Paytm","INR","-100","",""
"2023/11/29","","electricity maintenance. Monthly payment paid using Paytm bank.","Expenses:Utilities:Electricity & Maintainance:Rented","INR","100",""," Recurring: CAM Recharge"
"2023/11/29","","electricity maintenance. Monthly payment paid using Paytm bank.","Assets:Checking:Paytm","INR","-100","",""
"2023/12/01","","Salary from xxxxxx.","Assets:Checking:xxxxx","INR","100","",""
"2023/12/01","","Salary from xxxxxx.","Expenses:Tax","INR","100","",""
"2023/12/01","","Salary from xxxxxx.","Assets:Debt:EPF","INR","100","",""
"2023/12/01","","Salary from xxxxxx.","Income:Salary:ABC","INR","-300",""," Recurring: Salary"
"2023/12/02","","Rent payment paid using Paytm bank.","Expenses:Rent","INR","100",""," Recurring: Rent"
"2023/12/02","","Rent payment paid using Paytm bank.","Assets:Checking:Paytm","INR","-100","",""
avinashkanaujiya commented 8 months ago

I have a recurring.ledger file, and transactions are in there respective ledgers, so I should import recurring ledger before other ledgers right?

avinashkanaujiya commented 8 months ago

Ok, importing the recurring ledger before the all the transactions worked, thanks.