Skip to content

Test: Stock Movement Workflows

Maria Khaydar edited this page Jan 27, 2025 · 33 revisions

Before you get started

  • This test suit is designed to test in a single store environment (e.g. not between Store A and Store B, but rather all actions are taken within a single store). In future, the test suit will be expanded to include more scenarios.
  • When testing, you will mostly be checking 3 areas of Admin: Catalogue -> Items, Inventory -> View Stock and Ledger.
  • Catalogue -> Items can be found here:
Screenshot 2024-06-13 at 11 37 39 AM
  • Inventory -> View Stock can be found here:
Screenshot 2024-06-13 at 11 43 17 AM
  • Ledger can be found by going to Inventory -> View Stock and clicking on a specific item, then navigating to the Ledger tab:
Screenshot 2024-06-13 at 11 45 12 AM

Item Ledger

Changes via Stocktake

  • Go to Inventory -> View Stock and choose a stock line to be tested. Note the batch you will be testing.
  • Go to Inventory -> Stocktakes and create a new Stocktake. Add the batch you are testing.
  • Finalise the Stocktake.
  • Go back to Inventory -> View Stock and click on the stock line you just tested -> Go to Ledger. The increase/decrease via Stocktake should have created a new ledger line. Check the numbers and the details are correct.

Change via positive inventory adjustment of an existing stock line

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Do an inventory adjustment and increase the number of units of this specific item.
  • 'increase/decrease' drop down should work, you can type the number of packs and adjust the reason, if any are enabled.
  • Finalise by clicking on the button 'save'.
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The increase via stocktake should have created a new ledger line

Change via positive inventory adjustment on a new stock line

  • Go to stock and click on the button on the top right 'New stock'
  • Choose an item from the catalogue and add details like batch, number of units and expiry date.
  • If 'Reason' is configured, choose an option form the drop down list
  • Finalise by clicking on the button 'save'.
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The increase via stocktake should have created a new ledger line

Change via negative inventory adjustment

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Do an inventory adjustment and decrease the number of units of this specific item.
  • 'increase/decrease' drop down should work, you can type the number of packs and adjust the reason, if any are enabled.
  • Finalise by clicking on the button 'save'.
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The decrease via stocktake should have created a new ledger line

Change via Outbound Shipment

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to 'Outbound shipments' and create a new shipment.
  • Add 2 units of the item you chose to be tested
  • Confirm the shipment as Picked
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The decrease via outbound shipment should have created a new ledger line. Check the details to make sure they match.

Change via Inbound Shipment

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to 'Inbound shipments' and create a new shipment.
  • Add 2 units of the item you chose to be tested
  • Confirm the shipment as Delivered
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The increase via Inbound Shipment should have created a new ledger line. Check the details to make sure they match.

Change via Dispensing

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to 'prescriptions' and create a new prescription
  • Add 2 units of the item you chose to be tested
  • after adding units and confirming, the status changes from 'new' to 'picked'
  • Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. The decrease via dispensing should have created a new ledger line
  • Go to the prescription module, select the 'picked' prescription and delete it by clicking on 'actions Go back to 'stock' and click on the stock line selected to be tested
  • Check the ledger tab. Because the prescription was deleted, the ledger line is erased.
  • After deleting the 'picked' prescription, the quantity goes back to the initial point.

Change via Customer Return

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to Outbound shipments and create a new Customer return
  • Add 2 units of the item you chose to be tested
  • Confirm the status as Verified
  • Go back to 'stock'
  • The increase via Customer Return should have created a new stock line. If you check the ledger tab it should say 'Customer return'

Change via Supplier Return

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to Inbound shipments and create a new Supplier return
  • Add 2 units of the item you chose to be tested
  • Confirm the status as Picked
  • Go back to 'stock'
  • The decrease via Supplier Return should have created a new stock line. If you check the ledger tab it should say 'Supplier return'

Change via Repack all packs from 1 specific item line

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to 'repack' and double the package size. If pack size =1, make it 2, and so on.
  • Confirm the repack
  • Automatically the ledger tab will have the total quantity repacked with a negative sign. If repacked 80 packs, it will show -80
  • Go back to items view. New item lines with correct pack size will be created.
  • You should not be able to see any lines containing the old pack size.
  • Check the ledger tab. The changes via repacks should have created a new ledger line

Change via Repack only a few packs from 1 specific item line

  • Go to stock and choose a stock line to be tested. Take notes of the batch.
  • Go to 'repack' and double the package size. If pack size =1, make it 2, and so on.
  • Confirm the repack
  • Automatically the ledger tab will have the total quantity repacked with a negative sign. If repacked 80 packs, it will show -80
  • Go back to items view. New item lines with correct pack size will be created.
  • Check the ledger tab. The changes via repacks should have created a new ledger line
  • Go back to items view. The old pack size is still there, with the remaining packs.
  • Check the ledger tab. The changes via repacks should have created a new ledger line

Inbound Shipments

  • Start off by creating a new Inbound Shipment.
  • When status is New, the item quantity under Catalogue -> Items & Inventory -> View Stock is not updated. Deleting a batch from New inbound shipment will not update the stock levels either.
  • When status is updated to Delivered, the item quantity under Catalogue -> Items is updated. Inventory -> View Stock will now show an extra line with the batch number you just added, and the Pack Qty should match the quantity you entered previously. If you are entering multiple batches of the same item, then 2 separate lines will show, now one with the combined quantity.
  • Deleting a batch from Delivered inbound shipment should update the quantity under Catalogue -> Items. Inventory -> View Stock will be updated also - if one batch is deleted, then just that specific line will be removed.
  • Back to adding the items -> Ledger should update the quantity with Type set to Inbound Shipment
  • Changing the status to Verified should not have any impact on the stock levels.

Outbound Shipments

  • Start off by creating a new Outbound Shipment.
  • When entering a new Outbound Shipment, you will select an item and quantity you want to issue - for example, 20 packs of 1 tablet each. At this point, Outbound Shipment is still in New and is not affecting any stock levels. Deleting a batch from New outbound shipment will not update the stock levels either.
  • When pressing Confirm Allocated, it will change the item quantity under Catalogue -> Items, but will not change it under Inventory -> View Stock. Ledger will not have any updates at this stage either. Deleting an item/batch will reverse any changes done to Catalogue -> Items - e.g. the item should return back to the original quantity.
  • Confirm Picked -> the item quantity under Catalogue -> Items stays the same, and Inventory -> View Stock quantity has now changed. Ledger will be updated with the Outbound Shipment's details and the quantity will be displayed as something like '-20'.
  • Confirm Shipped/Delivered/Verified do not have any further changes on the stock levels.

Customer Returns

  • Start off by creating a new Customer Return.
  • When selecting an item returning, enter the quantity that is being returned to the store -> Customer Return is sitting as New. At this stage, both Catalogue -> Items and Inventory -> View Stock quantities are unchanged. Ledger does not have any updates.
  • Confirm Delivered -> Catalogue -> Items quantity is updated to include the returned quantity, and Inventory -> View Stock will now have a new extra line for the returned quantity. Ledger for that entry is updated with the quantity being added and Type Customer Return.
  • Confirm Verified does not have any further changes on the stock levels.

Supplier Returns

  • Start off by creating a new Supplier Return.
  • When selecting an item to return, enter the quantity that is going to be returned -> Supplier Return is sitting as New. At this stage, Catalogue -> Items quantity is unchanged and Inventory -> View Stock quantity is unchanged. Ledger does not have any updates.
  • Confirm Picked -> Catalogue -> Items quantity is updated to exclude the returning quantity, and Inventory -> View Stock quantity has also changed. Ledger will be updated with the Outbound Shipment's details and the quantity.
  • Confirm Shipped/Delivered/Verified do not have any further changes on the stock levels.

Repacks

Repack all packs from 1 specific item line

  • Go to Inventory -> View Stock and choose a stock line to be tested. Take note of the batch.
  • Click on the stock line -> Repack
  • Choose to repack ALL available packs
  • Double the package size. If pack size = 1, make it 2, for example.
  • Confirm the repack -> you will see a confirmation modal pop-up, warning the existing line will be removed. You will be taken to the newly created stock line.
  • You should not be able to see any lines containing the old pack size.
  • Go to Catalogue -> Items -> the item you were testing -> Ledger. The repack should have created a new line, showing the quantity and the details. Confirm everything is shown correctly.

Repack only a few packs from 1 specific item line

  • Go to Inventory -> View Stock and choose a stock line to be tested. Take note of the batch.
  • Click on the stock line -> Repack
  • Choose to repack only half of the available packs
  • Double the package size. If pack size = 1, make it 2, for example.
  • Confirm the repack
  • Automatically the ledger tab will have the total quantity repacked with a negative sign. If repacked 20 packs, it will show -20
  • Go back to item view and use the filter to find the item you chose to test. New stock lines should have been created with the correct pack size.
    • Under ledger tab of these new line, the changes via repacks should have created a new ledger line. If repacked 20 packs, it will show 20
  • Go back to items view. The old pack size should be there, with the remaining packs you did not repack.

Stocktakes

  • Before testing Stocktakes, take note of an item you are testing and take down the quantity - for example, I am testing Ibuprofen Tablets 400mg.
  • When creating a new Stocktake, add the item you are testing to that Stocktake and enter the Counted Packs quantity. If the Stocktake is New, the quantity of the item will remain unchanged under Catalogue -> Items or under Inventory -> View Stock.
  • When the Stocktake is Finalised, the quantity of the item will should change under Catalogue -> Items and under Inventory -> View Stock. Under Inventory -> View Stock, the batch you edited will reflect the updated quantity instead of it being shown as a new line.
  • When testing, it is important to test both scenarios - Stocktakes that increase stock and Stocktakes that decrease stock. Also, change the quantity of several batches to make sure the updates are being shown correctly under Inventory -> View Stock.

Prescriptions

  • Before testing Prescriptions, take note of an item you are testing and take down the quantity - for example, I am testing Mebendazole Chewable Tablets 100mg.
  • When creating a new Prescription, add an item you are testing -> as soon as you press 'OK', the status of the prescription is going to change from New to Picked. At this point, the item quantity is going to go down under Catalogue -> Items and Inventory -> View Stock. Under Inventory -> View Stock, you can click on a batch you prescribed and under Ledger you should be able to see the stock movement with Prescription set as Type.
  • Changing the quantity prescribed, adding another batch or deleting a prescription should reverse the changes displayed under Catalogue -> Items and Inventory -> View Stock.
  • Confirming prescription as Verified should not have any further changes on the item quantity and you should not be able to edit the prescription either.

When backdating

Injection
22/02/2024: 50
07/03/2024: -10
15/03/2024: -20
21/03/2024: -10
22/03/2024: +50
Total on hand (at the moment): 60

The logic is to allow the users to backdate prescriptions without messing up the actions that were done afterwards. For example, let's say on 23d of February you had 60 items in stock. But 50 items were dispensed through time up until today, so actually you only have 10 items available to dispense. So if you were backdate the prescription to 23d of February, the system should only allow you to dispense 10 items and not 60.

  • Issuing 60 today should be allowed by the system ✅
  • Issuing 60 on 23d of February should not be allowed by the system 🚫 (because 50 items get dispensed through time until today's date, so in reality you only have 10 items to dispense). The system should give you an error and reset the date to today.
  • Issuing 10 on 23d of February should be allowed by the system ✅
  • Issuing 60 on 23d of March should be allowed by the system ✅
  • Issuing 61+ packs should not be allowed, in the past or now 🚫 (because it's more than you ever have in stock)
  • If you try and add another item to the prescription, and the stock for it is not available on the date you set previously, the system should give you an error and not allow to add 🚫

Make sure to test not only recently created prescriptions (e.g. if you create one on the day you are testing), but also repeat the actions for prescriptions that have been created previously and have been in the system for a few days/weeks.

  • Should not be able to edit a finalised prescription

Ledger

  • Prescription is New/Picked: creating a Prescription and adding an item to it will be reflected in the Ledger as Type: Prescription
  • Prescription is Verified: stays the same as above - reflected in the Ledger as Type: Prescription