Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Update BA for already processed payments of the Work Period #81

Closed
maxceem opened this issue Jul 27, 2021 · 4 comments
Closed

Update BA for already processed payments of the Work Period #81

maxceem opened this issue Jul 27, 2021 · 4 comments

Comments

@maxceem
Copy link
Contributor

maxceem commented Jul 27, 2021

Background

Managers can process payments for Work Periods. Money for the payments comes from the Billing Account which is associated with Resource Booking:

image

Sometimes Managers process payments using the wrong billing account. And they would like to update the billing account for all payments which are done during the current Work Period (week).

Task

  • Add Actions dropdown menu to each of the row in the table with 1 option: Update BA for payments (or add this option if Actions is already implemented via this task [$80] Additional Payments #82)

    Additional BA Modal (2)
  • When we click Update BA for payments show a modal:

    Additional BA Modal (1)
    • For modal, use the same design as for adding payment: [$80] Additional Payments #82
    • Inside Current BA used list the billing accounts which were used for payments at the moment which would be updated
  • If we click Cancel or X just close the modal.

  • if we click Update BA for payments show a loading indicator inside the modal OR just disable the fields and all the buttons while sending request to the server.

    • if the request was successful, show a successful green toastr and close the modal which says, Billing account was successfully updated for all the payments:
      image
    • in case of error show error red toastr with error message from the server, but keep the modal open so user can try updating payment again

API

@sandhiyakavi
Copy link
Collaborator

@maxceem Below are some of the issues found,

  1. No BA option is getting displayed normally in the dropdown, except the one assigned to the RB through backend.

image

  1. If we assign some invalid/expired BA to the RB, no error is shown. The payment is going to completed status / BA updated for completed challenges without any error. But if the same BA is assigned at the project level, the payment is failing.
    sample Expired BA used: 80000071
    is that possible to validate the BA at RB level as the payment is based on the BA at RB level?

image

@sandhiyakavi sandhiyakavi added question Further information is requested and removed Ready for DEV QA labels Aug 16, 2021
@maxceem
Copy link
Contributor Author

maxceem commented Aug 16, 2021

@sandhiyakavi

  1. In this list we are show the same list of BA which we show for RB:

    image

    image

    So if for RB we are showing only 1 BA, then when updating we also showing only 1 BA.

    NOTE: the logic behind showing the list of BA is quite tricky:
    - user has to have BAs available to they
    - user must be Topcoder Admin, or be a member of the Topcoder Team inside the Project associated with Resource Booking

    To verify if we are showing correct BAs, you may open project in Connect and see the list of BAs there, it should be the same in all 3 places: Connect, RB, and Update BA Model.

    image

  2. Theoretically we can try add such check, but I'm not sure if that's needed. Imagine the next situation:

    • we process payments using 1 BA
    • after some we realised that we used wrong BA, so we want to set the correct BA, but correct BA at this moment is expired now. I guess we would still would like to update BA in the past payments even though the BA is not more active, just to have correct history.

    If you believe we should validate it anyway, I suggest tracking this separately as an enhancement requirement.

@maxceem maxceem added Ready for DEV QA and removed question Further information is requested labels Aug 16, 2021
@sandhiyakavi
Copy link
Collaborator

Below scenarios are tested in Dev Env.

  1. Verify Update BA for payments is shown in dropdown Actions only if there is already some payment processed.
  2. Verify whether modal opens for Update BA for payments
  3. Verify whether the contents Work period, ResourceBooking, Job name, Team name, Current BA's used are correctly displayed.
  4. Verify whether all the BA's used for the WP are displayed in Current BA's used.
  5. Verify whether BA are populated from the New Billing Account dropdown
  6. Verify whether BA updated on clicking 'Update BA for payments' button.
  7. Verify whether payment is not processed on clicking cancel or 'x' button.
  8. Verify whether toaster message is displayed for processing payment 'Billing account was successfully updated for all the payments:'
  9. Verify whether BA already updated was displayed if the BA was already displayed for all WP payments.

@sandhiyakavi
Copy link
Collaborator

Verified on Prod Env. Working as expected.

cc: @nkumar-topcoder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants