Incorrect validation of the pricePerPack field in PUT orderables/id endpoint

Description

While checking OLMIS-6413, I noticed that negative values ​​can be entered in the "pricePerPack" field using PUT api/orderables/id endpoint.
Then the total requisition coast also shows the minus values.

Reproduction steps:

  1. Log into the application as an administrator and obtain the user's access token.

  2. Update any orderable with the use of the PUT api/orderables/id endpoint so that the pricePerPack value is, e.g. -10.
    Sample body:

  3. Go to Requisition > Create/Authorize and inititate a new requisition.

  4. Fill in the required fields for just-updated product.

  5. The minus values occurs in the Price Per Pack and Toal requisition cost fields.

Expected results:

  • This field shouldn't accept negative values.

 

Environment

None

Assignee

Unassigned

Reporter

Joanna Szymańska

Labels

Story Points

2

Epic Link

Components

Priority

Major
Configure