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.24k stars 111 forks source link

HDFC Rupay Card Template #245

Closed Mozenraath closed 3 weeks ago

Mozenraath commented 3 weeks ago

6529XXXXXXXXXX70_13-06-2024 - Copy.PDF Hi, it would be great if you can support to create the template for Rupay credit card. I tried with existing templates but was not successful getting rid of invalid dates.

Much appreciated.

ananthakumaran commented 3 weeks ago
{{#if (isDate (regexpMatch ROW.A "\s*(\d{2}/\d{2}/\d{4}).*" group=1) "DD/MM/YYYY")}}
  {{date (regexpMatch ROW.A "\s*(\d{2}/\d{2}/\d{4}).*" group=1) "DD/MM/YYYY"}} {{ROW.B}}
  {{#if (eq (trim ROW.D) "Cr")}}
    Income:Refund:CreditCard:HDFC             -{{trim ROW.C}} INR
  {{else}}
    {{predictAccount prefix="Expenses"}}      {{trim ROW.C}} INR
  {{/if}}
  Liabilities:CreditCard:Rupay
{{/if}}

give this a try

Mozenraath commented 3 weeks ago

Worked perfectly.. Thanks a lot.