1009: Print a requisition

Test Case #:1009

Test Case Name: Print a requisition

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:27.01.2017

Short description

  • create the appropriate endpoint (v2.0 has /requisitions/ {id}

    /print)

  • print/display a table for appropriate full supply items
  • print/display a table for non-full supply (if any)
  • print/display all column headers (do not print out columns which are not configured for the specific requisition)
  • display non-skipped products
  • do not print/display skipped products
  • do not print/display "approved quantities" if the action of print is done from the initiated and submitted states
  • appropriate user permissions enforced
  • PDF is generated based on 'printing' service using the Jasper template and the JasperReportsViewFactory

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

 Add template for printing the requisition:

URL:  http://test.openlmis.org/api/reports/templates/requisitions?access_token=6ce4021a-d148-40b3-8f99-39a2a8428e2f

Method: POST

form-data:

  • file: (Select proper file)
  • name (type: "Print Requisition")
  • description (type what you want, e.g "test")

                                                                                    

                                                                                                                            

                                                 

2

Print some requisition with full-supply and non-full supply

URL: http://test.openlmis.org/api/requisitions/c6ce0209-6caf-4f40-bea8-01ce529fdc67/print?access_token=6ce4021a-d148-40b3-8f99-39a2a8428e2f

Method: GET

 

 The printed requisition contain two pages:

  • on the first page are products from supply-line


  • on the second page are products from non-full supply


 

3

  

 

4

  

 

5

   

6

  

 

7

  

 

8

                                                 

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software