Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Test Case #:813


 

Test Case Name:Configure Total Received Quantity attribute

System: openLMIS

Subsystem: requisitionblue

Test case designed by: Lucyna Kwidzińska

Design Date:0203.0811.2016

Short description:  I want the option to include and configure the "total received quantity" attribute (Total quantity received in last period. This is quantified in dispensing units) so that storeroom managers can use the information when determining the requested quantities and supervisors understand the amount of inventory received in the last period at the facilities when approving/reviewing requisitions.

  • the source of data is user input (at this time)
  • only non-negative and integer are allowed
  • the attribute is displayed in the defined order on the form
  • data entry validations should match the current 2.0 functionality (please check)

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

...

 



Create productCategory/localhost:8080productCategories/d694b63b40224b52af1ff397247fa433 POST

Example body:

{

"code": "categorycode",

"name": "categoryname",

"displayOrder": "32"

}

 Create program.
URL: http://localhost:8080/api/programs/

Step

Action

Expected system response

Comment

1

                                                                 

Request a Generate token from authentication service with some rest client:

 

 for authentication.



                                                                                                      

                                                                                                                            Image Removed


Image Added
                        

Copy the token from response (e.g. {"access_token":"121d02ed4425beb8-b6b4a9ea-42334590-9566bbc3-cac2b8a3aec9bffed45a59b6"...)

                         
2

Verify, if field "total Received Quantity" is available in requisition template.

  • program Id for requisition: dce17f2e-af3e-40ad-8e00-3496adef44c3


URL:  http:/

/10.222.17.134/requisition/api/

requisitionTemplates?access_token=

4425beb8-

a9ea-

4590-

bbc3-

bffed45a59b6

Method:

 

3

GET



Total Received Quantity is available in requisition template (the source is USER INPUT).

Image AddedImage Added

3

The field "totalReceivedQuantity" is mandatory when submit.

URL:  http://10.222.17.134/requisition/api/requisitions/fd575c05-c469-4bb4-b5d3-4e8937a8c1ff/submit?access_token=

d694b63b

4425beb8-

4022

a9ea-

4b52

4590-

af1f

bbc3-

f397247fa433

bffed45a59b6

Method: POST

Example body:

{

"code": "programcode",

"name": "programname",

"periodsSkippable": "true"

}

 
Image Removed

 

4


Create product.

URL: http://localhost:8080/api/products/

Image Added


4

Edit the requisition → enter the positive value into "totalReceivedQuantity" in requisition.
d694b63b40224b52af1ff397247fa433
Method:
POST

Example body:

{

"code": "productcode",

"primaryName": "productname01",

"dispensingUnit": "unittest",

"dosesPerDispensingUnit": "2",

"packSize": "2",

"packRoundingThreshold": "2",

"roundToZero": "true",

"active": "true",

"fullSupply": "true",

"tracer": "true",

"productCategory": "http://localhost:8080/api/productCategories/7a6bd7ee-e84a-42fd-a2e9-3d34d97b2d6c"

}

 
Image Removed

 

5

Create RequisitionLine.

URL: http://localhost:8080/api/requisitionLines/?access_token=d694b63b-4022-4b52-af1f-f397247fa433

Method: POST

Example body:

{

"product": "http://localhost:8080/api/products/147f2ee3-dc9b-46ab-82c8-a545d79c9e32",

"stockInHand": "12",

"beginningBalance": "10",

"totalReceivedQuantity": "8",

"totalLossesAndAdjustments": "2",

"stockOnHand": "2",

"requestedQuantity": "2",

"totalConsumedQuantity": "2",

"requestedQuantityExplenation": "2"

}

 
 

6

 

Displaying the attribute in defined order.

URL: http://localhost:8080/api/requisitionTemplates/?access_token=d694b63b-4022-4b52-af1f-f397247fa433

Method: POST

 Example body:

{

"program": "http://localhost:8080/api/programs/416cff8a-ec2c-44da-bef9-9d8117d6e3ed",

"columnsMap": {

"columnKey": {

"name": "nametest",

"label": "labeltest",

"displayOrder": "5",

"isDisplayed": "true",

"isDisplayedRequired": "true",

"canChangeOrder": "true"

}

}

}

 

Image Removed

 

7

  

 

8

                                                 

 

...

PUT

The requisition has been submitted. Value in TotalReceivedQuantity has been saved, the "total" value has been recalculated.

Image Added


5

Edit the requisition → enter negative value into "totalReceivedQuantity".

URL:  http://10.222.17.134/requisition/api/requisitions/fd575c05-c469-4bb4-b5d3-4e8937a8c1ff?access_token=4425beb8-a9ea-4590-bbc3-bffed45a59b6

Method: PUT

Image Added


6

Try to submit the requisition.

URL:  http://10.222.17.134/requisition/api/requisitions/6167e65c-6f56-4aeb-bff5-fdfe84e01a21/submitaccess_token=4425beb8-a9ea-4590-bbc3-bffed45a59b6

Method: POST

Image Added

Image Added


7

Try to submit the requisition when totalReceivedQuantity is negative.

URL:  http://10.222.17.134/requisition/api/requisitions/fd575c05-c469-4bb4-b5d3-4e8937a8c1ff/submit?access_token=4425beb8-a9ea-4590-bbc3-bffed45a59b6

Method: POST



Image Added


8


 





Post – conditions: