Configure Total Cost by product

Description

As an implementer, I want the option to include the "Total Cost" (Q) attribute on the requisition template so that the user can see the total cost of each product lineItem requested. This is a column in the grid NOT the total requisition cost at the bottom of the grid which is covered in OLMIS-1451.

Total Cost Column within the Product grid.

This parent ticket is for the API work to support this new field. should we make a subtask or new task to do the UI piece for both the product grid and Admin UI?).

Acceptance Criteria
Verify that:

  • in the APIs for configuring a requisition template, this new field can be added into the requisition template (by an admin with permissions to configure the template for their program)

  • if this field is NOT configured/associated to a requisition template, it does not appear on the requisition form

  • the field can be configured with a display order that controls where it appears on the requisition

  • in the APIs for initiating and saving a requisition, if this field is part of the template, then this field appears on the requisitions. Its display order should be based on the requisition template.

  • value must be a number calculated as V * T non-negative integer

  • this field is read only

  • Total cost is calculated by V * T

    • V = packs to ship (from reference data) and

    • T = price per pack (from reference data in program product)

  • if there are no prices defined for the pack, the total cost value will be 0.

UI Aspects

  • when configuring the field Q, it can be assigned a display order

  • Total cost is calculated by V * T

    • V = packs to ship (from reference data) and

    • T = price per pack (from reference data in program product)

  • when initiating and filling out a requisition for a program that uses Q in its requisition template...

  • if Q is associated with a requisition template, the column is displayed in the defined order on the requisition product grid

  • if Q is not associated with a requisition template, the column does not appear on the requisition product grid

  • if there are no prices defined for the pack, the total cost value will show 0

  • value must be a number calculated as V * T non-negative integer

  • value displays with 2 decimal points

  • value should include the currency symbol (see screenshot) - https://openlmis.atlassian.net/browse/OLMIS-538#icft=OLMIS-538

  • the display order is enforced in the requisition form

Attachments

18

Activity

Show:
Anna Czyrko
December 23, 2016 at 8:40 AM
  • in the APIs for configuring a requisition template, this new field can be added into the requisition template (by an admin with permissions to configure the template for their program)

"pricePerPack": { "name": "pricePerPack", "label": "Price Per Pack", "indicator": "T", "displayOrder": 16, "isDisplayed": true, "source": "REFERENCE_DATA", "columnDefinition": { "id": "df524868-9d0a-18e6-80f5-76304ded7ab9", "name": "pricePerPack", "sources": [ "REFERENCE_DATA" ], "options": [], "label": "Price Per Pack", "indicator": "T", "mandatory": false, "isDisplayRequired": false, "canChangeOrder": true, "canBeChangedByUser": false, "columnType": "NUMERIC" },
"packsToShip": { "name": "packsToShip", "label": "Packs To Ship", "indicator": "V", "displayOrder": 14, "isDisplayed": true, "source": "CALCULATED", "columnDefinition": { "id": "dc9dde56-593d-4929-81be-d1faec7025a8", "name": "packsToShip", "sources": [ "CALCULATED" ], "options": [], "label": "Packs To Ship", "indicator": "V", "mandatory": false, "isDisplayRequired": false, "canChangeOrder": true, "canBeChangedByUser": false, "columnType": "NUMERIC" },

I noticed that Price per Pack and Packs To Ship are added to template.

Anna Czyrko
December 23, 2016 at 8:16 AM
(edited)

API:

  • if this field is NOT configured/associated to a requisition template, it does not appear on the requisition form

I test it on UI. All works.

  • this field is read only
    I checked it on UI.

  • Total cost is calculated by V * T
    I checked it on UI, all works,

  • if there are no prices defined for the pack, the total cost value will be 0.

Anna Czyrko
December 21, 2016 at 2:17 PM

I confirm that Q = V (packs to ship) * T = (price per pack),

Anna Czyrko
December 21, 2016 at 2:05 PM
(edited)

I try to update this data because I want to be sure that Q = V (packs to ship) * T = (price per pack), with I cannot confirm it with current demo data.

Paweł Gesek
December 21, 2016 at 2:04 PM
Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

1w 5h logged

Components

Sprint

None

Fix versions

Priority

Time Assistant

Created August 11, 2016 at 12:19 AM
Updated January 11, 2017 at 4:27 PM
Resolved December 23, 2016 at 8:41 AM