637: Print Proof of Deliver (POD)
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.
|
|
2 | Create FacilityType
Example body: { "code": "typecode", "name": "typename", "displayOrder": "3" }
| status 201 created is returned, id:
|
|
3 | Create geographicZone
Example body: { "code": "geolcode", "name": "geoname", }
| status 201 created is returned, id:
|
|
4 | Create geographicLevel
Example body: { "code": "levelcode", "name": "levelname", "levelNumber": "3" }
| status 201 created is returned, id:
|
|
5 | Create Facility
Example body: { "code": "facilitycode", "name": "facilityname", "geographicZone": "http://localhost:8080/api/geographicZones/b0e62722-7ac9-4570-87ee-ec67fdc29751", "active": "true", "enabled": "true" }
| status 201 created is returned, id: |
|
6 | Create User
Example body: { "username": "test", "firstName": "test1", "lastName": "test2", "verified": true, "active": true }
| status 201 created is returned, |
|
7 | Create Program
Example body: { "code": "programcode", "name": "programname", "description": "abc", "periodsSkippable": true
}
| status 201 created is returned, id: |
|
8 | Create Schedule
Example body: { "code": "schedulemcode", "name": "schedulename"
} | status 201 created is returned, id: "http://localhost:8080/api/schedules/b0f63d5a-1815-405d-92ef-266d6bfcb531" |
|
9 | Create Period
Example body: { "processingSchedule": { "id": "b0f63d5a-1815-405d-92ef-266d6bfcb531", "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/4878678f-fdc0-4a75-a0b2-55f143241c0d"
|
|
10 |
Create requisition Example body: { "processingPeriod": "http://localhost:8080/api/periods/4878678f-fdc0-4a75-a0b2-55f143241c0d", "status": "SUBMITTED"
}
| status 201 created is returned, id:
|
|
11 | Create Order
Example body: { "requestingFacility": "http://localhost:8080/api/facilities/b8e6ef2a-91c7-4558-b538-168d59c734b2", "receivingFacility": "http://localhost:8080/api/facilities/b8e6ef2a-91c7-4558-b538-168d59c734b2", "supplyingFacility": "http://localhost:8080/api/facilities/b8e6ef2a-91c7-4558-b538-168d59c734b2", "orderCode": "code1234", "status": "ORDERED", "quotedCost": "123.123456" } | status 201 created is returned, id: |
|
12 | Create productCategory Example body: { "code": "categorycode", "name": "categoryname", "displayOrder": "44" } | status 201 created is returned, id:
|
|
13 | Create Product Example body: { "code": "productcode", "primaryName": "productname1", "dispensingUnit": "unit34", "dosesPerDispensingUnit": "4", "packSize": "4", "packRoundingThreshold": "4", "roundToZero": true, "active": true, "fullSupply": true, "tracer": true, "productCategory": } | status 201 created is returned, id: |
|
14 | Create OrderLine Example body: { "orderedQuantity": "12", "filledQuantity": "12" } | status 201 created is returned, id: |
|
15 | Create ProofOfDelivery Example body: { "order": "totalShippedPacks": 2, "totalReceivedPacks": 2, "totalReturnedPacks": 2, "deliveredBy": "testuser", "receivedBy": "testureceiver", "receivedData": "2016-08-26"
}
| status 201 created is returned, id: |
|
16 | Create printProofOfDeliveryLine URL: http://localhost:8080/api/proofOfDeliveryLines/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738 Example body: { "orderLine": "proofOfDelivery": "packToShip": 2, "quantityShipped": 2, "quantityReceived": 2, "quantityReturned": 0, "notes": "somenotes"
} | status 201 created is returned, id: |
|
17 | Create the another ProofOfDeliveryLine with another orderLine URL: http://localhost:8080/api/proofOfDeliveryLines/?access_token=804fd76a-4056-4b65-9aed-8ddbbbabb738 Example body: { "orderLine": "http://localhost:8080/api/orderLines/9abe0c32-e5d5-477a-a6ef-6a52721f012c", "proofOfDelivery": "http://localhost:8080/api/proofOfDeliveries/b4386e94-df0e-4568-8320-06fa91a2a3b6", "packToShip": 2, "quantityShipped": 2, "quantityReceived": 2, "quantityReturned": 0, "notes": "somenotes"
} | id: "http://localhost:8080/api/proofOfDeliveryLines/b3e42cdd-ff5b-4a59-8559-1f2db7ec7819" | the second orderLine must contain the other product and productCategory (the creation process is described in points 12-14). |
18 | Add report PDF template: URL: Method: POST Body (form-data):
| status: 200 OK should be returned. |
|
19 | Print POD as PDF report.
Method: GET
| File should be saved in proper location. After opening, the PDF report with filled fields should be seen. |
|
Post – conditions: |