You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
On the Purchase Order "Items to Receive" page, there is a UX flaw in the Batch selection dropdown. When a user types or selects a batch number that already exists in the system (e.g., 3333), the dropdown still displays the + Create batch: [number] action above the "Existing Batches" list.
If the user clicks the "Create" action instead of selecting the existing batch below it, the system treats it as a completely new batch (adding a "New" badge) and allows the user to input a new expiry date. This allows duplicate batches with potentially conflicting data to be created.
Steps to Reproduce:
Create a Purchase Order in the Inventory Purchase Order page by adding required items details.
Create delivery Order for this item.
Load items to receive.
Click on the Batch column dropdown for an item.
Type in a batch number that already exists in the system.
Notice that the dropdown shows both + Create batch: (Batch Number) and the existing batch details (#Batch Number) under "Existing Batches".
Click on + Create batch: (Batch Number).
Observe that the batch is added with a "New" badge, and including the expiry date field is editable.
Actual Behaviour:
The system permits the creation of a "New" batch using an ID that already exists. It allows the user to set a completely different expiry date for this duplicate batch, which can lead to inventory data corruption and confusion.
Purchase.order.issue.4.mp4
Impact
Risk of duplicate batches
Incorrect inventory tracking
Data inconsistency in pharmacy records
Expected Behaviour:
To prevent duplicate data entry and user error, the system should handle exact matches better. Suggested fixes include:
Hide "Create": If the typed batch number exactly matches an existing batch number, hide the + Create batch button and only show the existing batch.
Validation Error: If the user attempts to create a batch that already exists, throw a validation error ("Batch [number] already exists. Please select it from the list.").
Description
On the Purchase Order "Items to Receive" page, there is a UX flaw in the Batch selection dropdown. When a user types or selects a batch number that already exists in the system (e.g., 3333), the dropdown still displays the + Create batch: [number] action above the "Existing Batches" list.
If the user clicks the "Create" action instead of selecting the existing batch below it, the system treats it as a completely new batch (adding a "New" badge) and allows the user to input a new expiry date. This allows duplicate batches with potentially conflicting data to be created.
Steps to Reproduce:
Create a Purchase Order in the Inventory Purchase Order page by adding required items details.
Create delivery Order for this item.
Load items to receive.
Click on the Batch column dropdown for an item.
Type in a batch number that already exists in the system.
Notice that the dropdown shows both + Create batch: (Batch Number) and the existing batch details (#Batch Number) under "Existing Batches".
Click on + Create batch: (Batch Number).
Observe that the batch is added with a "New" badge, and including the expiry date field is editable.
Actual Behaviour:
The system permits the creation of a "New" batch using an ID that already exists. It allows the user to set a completely different expiry date for this duplicate batch, which can lead to inventory data corruption and confusion.
Purchase.order.issue.4.mp4
Impact
Risk of duplicate batches
Incorrect inventory tracking
Data inconsistency in pharmacy records
Expected Behaviour:
To prevent duplicate data entry and user error, the system should handle exact matches better. Suggested fixes include:
Hide "Create": If the typed batch number exactly matches an existing batch number, hide the + Create batch button and only show the existing batch.
Validation Error: If the user attempts to create a batch that already exists, throw a validation error ("Batch [number] already exists. Please select it from the list.").