ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
65 stars 80 forks source link

[UBS Admin Cabinet] Overpayment and underpayment messages #2899

Closed YuliyaTymkiv closed 2 years ago

YuliyaTymkiv commented 3 years ago

As an administrator, I want to see if there is overpayment or underpayment in the current order, so that I know whether to return the unused amount to the client or ask for additional payment.

Assumptions & Constraints N/A

Preconditions

  1. User is logged in as administrator.
  2. Administrator has opened an separate order from current orders view table

Business rules

  1. Only administrators with access should be able to view Admin Cabinet

Acceptance Criteria

  1. The system should compare the following values each time, when they are changed: a. confirmed order total “Сума до оплати” (column “Підтверджена к-сть”) with total payment “Замовлення оплачено в розмірі” on the order statuses Сформовано; Узгодження; Підтверджено; На маршруті; Не виконано; Привезе сам; b. actual order total “Сума до оплати” (column “Вивезена к-сть”) with total payment “Замовлення оплачено в розмірі” on the order statuses Виконано; Скасовано.

  2. If the confirmed or actual order total "Сума до оплати" (depends on the order status) is greater than total payment "Замовлення оплачено в розмірі", the system shows the following message under the table with packages quantity and order total details: “Потрібно доплатити <underpayment грн>”, where underpayment is float number with 2 digits (250.00), greater than 0 and calculated by formula: a. on the order statuses Сформовано; Узгодження; Підтверджено; На маршруті; Привезе сам; Не виконано: confirmed order total "Сума до оплати" - total payment "Замовлення оплачено в розмірі" = underpayment b. on the order statuses Виконано; Скасовано: actual order total "Сума до оплати" - total payment "Замовлення оплачено в розмірі" = underpayment

  3. If the confirmed or actual order total "Сума до оплати" (depends on the order status) is less than total payment "Замовлення оплачено в розмірі", the system shows the following message under the table with packages quantity and order total details: “Переплата <overpayment грн>”, where overpayment is float number with 2 digits (250.00), greater than 0 and calculated by formula: a. on the order statuses Сформовано; Узгодження; Підтверджено; На маршруті; Привезе сам; Не виконано: total payment "Замовлення оплачено в розмірі" - confirmed order total "Сума до оплати" = overpayment b. on the order statuses Виконано; Скасовано: total payment "Замовлення оплачено в розмірі" - actual order total "Сума до оплати" = overpayment

Mockup

over_underpayment notifications

Out of scope

Epic link E.g.: Epic #2195

Labels to be added "User story", Correspondind Functionality (e.g. User), Priority ("pri: "), "Corresponding Epic"

Tasks

    • [ ] sample task.
SofiiaHavsot7 commented 5 months ago

Overpayment Copy.postman_collection.json Postman collection for API testing