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

Prettify in the Ledger Editor does not format periodic transaction #62

Closed ethanppl closed 10 months ago

ethanppl commented 10 months ago

Describe your Environment OS: Windows 11 Paisa Version: 0.5.3 App Variant: Desktop

Describe the bug

Paisa supports periodic transaction, e.g. ~ Monthly in 2023/08/01, but the ledger editor prettify button doesn't prettify entries within a periodic transaction.

To Reproduce

  1. Go to ledger editor
  2. Create a budget as in the docs: https://paisa.fyi/reference/budget/ with entries not aligned
  3. Click on prettify
  4. The transactions are not prettified

Expected behavior Prettify button can prettify periodic transaction.

Screenshots

image

Journal

~ Monthly in 2023/08/01
    Expenses:Rent           15,000 INR
    Expenses:Food            10,000 INR
    Expenses:Clothing           5,000 INR
    Expenses:Entertainment      5,000 INR
    Expenses:Transport              5,000 INR
    Expenses:Personal     5,000 INR
    Assets:Checking

Seems to be a problem here: https://github.com/ananthakumaran/paisa/blob/master/src/lib/journal.ts#L27

Thank you for the great app. Saw that you don't accept PRs but let me know if I can help :)

ethanppl commented 10 months ago

Thank you!