Skip to content

Batch payment query: total success count differs from the actual number of payments for a scenario #313

@sandhiyakavi

Description

@sandhiyakavi

Description:

Tried Batch payment query for below

image

But If we GET/work-periods?startDate=2021-01-31&endDate=2021-02-06&userHandle=pshah_manager

In the below response, Only 6 records has payments and 2 records don't (the first and last Workperiods don't have payments), the last one is expected as BA is not added to it. But RB id: 616ad7c7-a694-495c-858b-cf9d85c9faf0 should have payment created as it has BA assigned as well as member rate.

[
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "616ad7c7-a694-495c-858b-cf9d85c9faf0",
        "daysWorked": null,
        "payments": [],
        "createdAt": "2021-04-23T10:08:11.700Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "e7ad4211-7297-46cb-9571-a3cfc331c721",
        "projectId": 16805,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "540442b3-fb33-4f59-9e8d-67f34e366f84",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.308Z",
                "amount": 13.23,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "26df11d1-c39e-4c47-aa10-9ece1ad2b1ae",
                "workPeriodId": "dd4f7bc4-e8b4-4f04-ae94-7b847900f78a",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.308Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:11.646Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "dd4f7bc4-e8b4-4f04-ae94-7b847900f78a",
        "projectId": 16857,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "f7fb37a9-cab4-4c71-a5ff-abe4985320c6",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.018Z",
                "amount": 99.62,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "50a7c99d-3276-474b-9498-dc9f174a9520",
                "workPeriodId": "ce66efdb-26c5-4cfd-9266-c398f4202acf",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.018Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:11.647Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "ce66efdb-26c5-4cfd-9266-c398f4202acf",
        "projectId": 16886,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "31cf931d-519e-476c-946b-70069e13695b",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.344Z",
                "amount": 1212,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "fa5293a5-21ed-4fce-b9bf-c2731108966e",
                "workPeriodId": "cc40b3cb-a88d-47c6-8e13-b970918f75f9",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.344Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:12.003Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "cc40b3cb-a88d-47c6-8e13-b970918f75f9",
        "projectId": 16879,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "88422344-c6e6-430a-af68-18e05368f662",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.150Z",
                "amount": 4,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "177f5681-c852-4e65-b7d4-5502ded23f3a",
                "workPeriodId": "81aa3330-60ea-450b-afa3-50529f0152e2",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.150Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:11.502Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "81aa3330-60ea-450b-afa3-50529f0152e2",
        "projectId": 16882,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "6b255242-a72a-4af3-8ee6-523cf2c7de3c",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.186Z",
                "amount": 9,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "6c610cff-4e39-419a-ba46-ee90cbfc807d",
                "workPeriodId": "75c44a3b-30e6-45de-ab8d-edfadaa3b33a",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.186Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:11.640Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "75c44a3b-30e6-45de-ab8d-edfadaa3b33a",
        "projectId": 16893,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "dc683ecd-8aa7-40de-8a26-b8b9ffb3fa81",
        "daysWorked": null,
        "payments": [
            {
                "createdAt": "2021-06-07T07:13:00.103Z",
                "amount": 4444,
                "challengeId": null,
                "updatedBy": null,
                "createdBy": "71c5e6a8-51d9-4fb5-91ce-d974642531af",
                "billingAccountId": 80000068,
                "id": "ea05c896-9155-4b45-838d-6854499e3794",
                "workPeriodId": "441894f7-a973-46b7-8a24-0a9aa28b1b07",
                "status": "scheduled",
                "updatedAt": "2021-06-07T07:13:00.103Z"
            }
        ],
        "createdAt": "2021-04-23T10:08:10.624Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "441894f7-a973-46b7-8a24-0a9aa28b1b07",
        "projectId": 16885,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    },
    {
        "userHandle": "pshah_manager",
        "updatedBy": null,
        "endDate": "2021-02-06",
        "resourceBookingId": "d8e102c1-c354-4b76-8a7d-37f312da4342",
        "daysWorked": null,
        "payments": [],
        "createdAt": "2021-04-23T10:08:11.645Z",
        "memberRate": null,
        "createdBy": "00000000-0000-0000-0000-000000000000",
        "customerRate": null,
        "id": "150714cc-d7ac-4b7a-9823-0ee8703afae3",
        "projectId": 16879,
        "startDate": "2021-01-31",
        "paymentStatus": "pending",
        "updatedAt": null
    }
]

@maxceem @nkumar-topcoder This is not the case for all Batch payment query but raised this issue as I can't find the root cause of failure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions