Versions Compared

Key

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

Test Case #:637

 

Test Case Name: Print Proof of Deliver (POD)

System: OpenLMIS

Subsystem: requisition

Test case designed by: Lucyna Kwidzińska

Design Date:22.08.2016

Short description: As a warehouse manager performing local fill within OpenLMIS I want to be able to print a proof of delivery that shows the products, manufacturer and quantity of stock that I am issuing as part of my local fill process so that I have a record of what I issued and so I can receive a signature from the destination facility in order to comply with the SOP.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

        Generate the token for authentication.              

      Token is generated.     

Image Added

   

                                                 

2

Create FacilityType

URL: http://localhost:8080/api/facilityTypes/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

 

Example body:

{

"code": "typecode",

"name": "typename",

"displayOrder": "3"

}

 

 

 

 

3

Create geographicZone

 

URL: http://localhost:8080/api/geographicZones/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "geolcode",

"name": "geoname",

"level": "http://localhost:8080/api/geographicLevels/1f168007-f639-40ab-b221-fe82a8959199"

}

 

 

4

Create geographicLevel

 

URL: http://localhost:8080/api/geographicLevels/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "levelcode",

"name": "levelname",

"levelNumber": "3"

}

 

 

5

Create Facility

 

URL: http://localhost:8080/api/facilities/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "facilitycode",

"name": "facilityname",

"geographicZone": "http://localhost:8080/api/geographicZones/0e68bc8b-b15e-473c-bb5b-3e1e895843d1",

"type": "http://localhost:8080/api/facilityTypes/6c04d346-3890-440f-84f4-400ebd152286",

"active": "true",

"enabled": "true"

}

 
status 201 created is returned, 

id: "http://localhost:8080/api/facilities/c73da19c-2e0f-4a53-b1a8-3c30ae89b276"

 

6

Create User

 

URL: http://localhost:8080/api/users/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"username": "test",

"password": "test123",

"firstName": "test1",

"lastName": "test2",

"verified": true,

"active": true

}

 
status 201 created is returned, 

id: "http://localhost:8080/api/users/a5b64885-c3a6-4cf6-a5e2-b61266beceda"

 

7

Create Program

 

URL: http://localhost:8080/api/programs?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "programcode",

"name": "programname",

"description": "abc",

"periodsSkippable": true

 

}

 
status 201 created is returned, 

id: "http://localhost:8080/api/programs/810ec172-e428-45ab-bb8b-aae571bee304"

 

8

Create Schedule

 

URL: http://localhost:8080/api/schedules/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "schedulemcode",

"name": "schedulename"

 

}

status 201 created is returned,

id: "http://localhost:8080/api/schedules/63bcbc3d-96ac-497f-a1d4-3fe8ae8f3546"

 
9

Create Period

 

URL: http://localhost:8080/api/periods/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"processingSchedule": {

"id": "63bcbc3d-96ac-497f-a1d4-3fe8ae8f3546",

"code": "schedulemcode",

"name": "schedulename"

},

"name": "periodname",

"startDate": "2016-08-25",

"endDate": "2016-09-25"

 

 

}

status 201 created is returned,

id: "http://localhost:8080/api/periods/bbe93b33-1f6c-4a35-a739-075b310c7a2b"

 

10

                        

Create requisition

URL: http://localhost:8080/api/requisitions/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"facility": "http://localhost:8080/api/facilities/c73da19c-2e0f-4a53-b1a8-3c30ae89b276",

"program": "http://localhost:8080/api/programs/810ec172-e428-45ab-bb8b-aae571bee304",

"processingPeriod": "http://localhost:8080/api/periods/bbe93b33-1f6c-4a35-a739-075b310c7a2b",

"status": "SUBMITTED"

 

}

                        
status 201 created is returned, 

id: "http://localhost:8080/api/requisitions/f3fa21d4-2cb1-48c0-a57f-73d768453952"

 

11

Create Order

 

URL: http://localhost:8080/api/orders/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"requisition": "http://localhost:8080/api/requisitions/f3fa21d4-2cb1-48c0-a57f-73d768453952",

"createdBy": "http://localhost:8080/api/users/a5b64885-c3a6-4cf6-a5e2-b61266beceda",

"program": "http://localhost:8080/api/programs/810ec172-e428-45ab-bb8b-aae571bee304",

"requestingFacility": "http://localhost:8080/api/facilities/c73da19c-2e0f-4a53-b1a8-3c30ae89b276",

"receivingFacility": "http://localhost:8080/api/facilities/c73da19c-2e0f-4a53-b1a8-3c30ae89b276",

"supplyingFacility": "http://localhost:8080/api/facilities/c73da19c-2e0f-4a53-b1a8-3c30ae89b276",

"orderCode": "code1234",

"status": "ORDERED",

"quotedCost": "123.123456"

}

status 201 created is returned,

id: "http://localhost:8080/api/orders/16889820-febe-4699-bc92-b0d3f6504f2b"

 
12

Create productCategory

URL: http://localhost:8080/api/productCategories/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "categorycode",

"name": "categoryname",

"displayOrder": "44"

}

status 201 created is returned,

id: "http://localhost:8080/api/productCategories/8f7c42e9-e33a-4090-86c7-2824564391d8"

 
13

Create Product

URL: http://localhost:8080/api/products/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"code": "productcode",

"primaryName": "productname1",

"dispensingUnit": "unit34",

"dosesPerDispensingUnit": "4",

"packSize": "4",

"packRoundingThreshold": "4",

"roundToZero": true,

"active": true,

"fullSupply": true,

"tracer": true,

"productCategory": "http://localhost:8080/api/productCategories/8f7c42e9-e33a-4090-86c7-2824564391d8"

}

status 201 created is returned,

id: "http://localhost:8080/api/products/e849ef39-dd23-4f73-b983-8c4b7577bb3f"

 
14

Create OrderLine

URL: http://localhost:8080/api/orderLines/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"order": "http://localhost:8080/api/orders/16889820-febe-4699-bc92-b0d3f6504f2b",

"product": "http://localhost:8080/api/products/e849ef39-dd23-4f73-b983-8c4b7577bb3f",

"orderedQuantity": "12",

"filledQuantity": "12"

}

status 201 created is returned,

id: "http://localhost:8080/api/orderLines/27bf241f-9e80-426a-8e91-86e6a7e398e3"

 
15

Create ProofOfDelivery

URL: http://localhost:8080/api/proofOfDeliveries/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"order": "http://localhost:8080/api/orders/16889820-febe-4699-bc92-b0d3f6504f2b",

"totalShippedPacks": 2,

"totalReceivedPacks": 2,

"totalReturnedPacks": 2,

"deliveredBy": "testuser",

"receivedBy": "testureceiver",

"receivedData": "2016-08-26"

 

}

 

 

 

status 201 created is returned,

id: "http://localhost:8080/api/proofOfDeliveries/b49e860a-9559-4422-9adf-50ab106e7014"

 
16

Create printProofOfDeliveryLine

URL: http://localhost:8080/api/proofOfDeliveryLines/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738

Example body:

{

"orderLine": "http://localhost:8080/api/orderLines/27bf241f-9e80-426a-8e91-86e6a7e398e3",

"proofOfDelivery": "http://localhost:8080/api/proofOfDeliveries/b49e860a-9559-4422-9adf-50ab106e7014",

"packToShip": 2,

"quantityShipped": 2,

"quantityReceived": 2,

"quantityReturned": 0,

"notes": "somenotes"

 

}

status 201 created is returned,

id: "http://localhost:8080/api/proofOfDeliveryLines/70d3ea72-9e24-4274-bebb-5a0a8e59b13f"

 
17

Adding report PDF template:

URL:

http://localhost:8080/api/templates?access_token=fb4ebbfc-2ef2-40e7-8ee9-ccdfa508487f

Method: POST

Body (form-data):

  • file - select the proper file
  • name - type the proper name
  • description - type the description
status: 200 OK should be returned. 
18

Print POD as PDF report.


URL:

http://localhost:8080/api/proofOfDeliveries/b49e860a-9559-4422-9adf-50ab106e7014/print?access_token=fb4ebbfc-2ef2-40e7-8ee9-ccdfa508487f

Method: GET

 


 

File should be saved in proper location. After opening, the PDF report with filled fields should be seen. 

 

 

Post – conditions: