zenmoney/ZenPlugins

[tbc-ge] Sync does not create entries entirely if there are transactions with unexpected title

Opened this issue · 0 comments

Issue:

The sync completes successfully, but no transactions (including the valid ones) are created in Zenmoney.

Error Message:

[error] Error parsing title "Usa2georgia;292189;თანხა:31.73;საკ.:0.50" in TransactionStandardMovementV2:
Cannot read properties of undefined (reading 'trim')

Example:

A transaction from the TBC Mobile Bank app is shown below. It was made using "Make Payment -> Pay a bill":

{
  "transactionId": 11980943422,
  "accountId": 815903362,
  "entryType": "StandardMovement",
  "movementId": "d_11980943422",
  "transactionDate": null,
  "localTime": null,
  "repeatTransaction": null,
  "setAutomaticTransfer": null,
  "payback": null,
  "saveAsTemplate": null,
  "shareReceipt": null,
  "dispute": null,
  "title": "Usa2georgia;292189;თანხა:31.73;საკ.:0.50",
  "subTitle": "Other Shopping",
  "amount": -31.73,
  "currency": "GEL",
  "categoryCode": "SHOPPING",
  "subCategoryCode": "OTHER_SHOPPING",
  "isSplit": false,
  "transactionSubtype": 31,
  "blockedMovementDate": null,
  "blockedMovementCardId": null,
  "blockedMovementIban": null,
  "transactionStatus": "Green",
  "isDebit": true
}

The corresponding transaction fee has similar format:

{
  "transactionId": 11980943423,
  "accountId": 815903362,
  "entryType": "StandardMovement",
  "movementId": "d_11980943423",
  "transactionDate": null,
  "localTime": null,
  "repeatTransaction": null,
  "setAutomaticTransfer": null,
  "payback": null,
  "saveAsTemplate": null,
  "shareReceipt": null,
  "dispute": null,
  "title": "საკომისიო: Usa2georgia;292189;თანხა:31.73;საკ.:0.50",
  "subTitle": "Fees",
  "amount": -0.5,
  "currency": "GEL",
  "categoryCode": "BANK_INSURE_TAX",
  "subCategoryCode": "FEES",
  "isSplit": false,
  "transactionSubtype": 31,
  "blockedMovementDate": null,
  "blockedMovementCardId": null,
  "blockedMovementIban": null,
  "transactionStatus": "Green",
  "isDebit": true
}