ajency / cashflow-issue-tracker

Issue Tracker for issues
0 stars 1 forks source link

BUG - The "balance" field in Invoice request does not make sense. It should not be left to the user to update the balance but should be a calculation done on our end when the invoice is paid. #835

Closed HazelColaco19 closed 4 years ago

HazelColaco19 commented 4 years ago

Describe the bug with Expectations The "balance" field in Invoice request does not make sense. It should not be left to the user to update the balance but should be a calculation done on our end when the invoice is paid.

Request:

ty_invoice_5545_66_1

{ "transactionType": "Invoice", "source": "tally", "data": [ { "id": 1, "parentId": 66, "description": "invoice of 222", "lineItemAccountChildCategory": null, "lineItemAccountCategory": "Telephone", "lineItemAccountSubType": "Utilities", "lineItemCategoryId": 79, "amount": 222.2222, "balance": 222, "currency": "USD", "createDate": "2020-06-12", "txnDate": "2020-06-12", "lastModifiedDate": "2020-06-12", "dueDate": "2020-06-12", "paymentStatus": "Pending", "customer": "Latesh" } ] }

Kibana data:

image

legred21 commented 4 years ago

Removed balance field from invoice request. Balance is updated when invoice payment is received. Also invoice is a Inflow type of transaction. Use the account in the transaction that maps to cashflow type inflow

HazelColaco19 commented 4 years ago

fixed

image