other_stuff:virtual_stores

24.08. Virtual stores

From the Special menu, choose Show stores

In mSupply a virtual store is a way of segregating particular stock so that some users only see that stock and the transactions associated with it. When a user logs into mSupply, they choose a particular store to login to - this we call the current store. mSupply then operates as if:

  1. The stock in that store is the only stock available.
  2. Only stock from the current store will be available for issuing,
  3. Reports will relate to stock in that store
  4. Issues from and receipts to that store only use the stock in that store
  5. Only suppliers and customers sets as “visible” for that store will be able to be chosen for receiving and issuing goods
  6. Only items set as “visible” in that store will be usable (So for example if you have a store that handles only vaccines you can make vaccines visible in that store (and invisible in all stores that don't handle vaccines)

Many users of mSupply will only have a single store, and so will have no need of this functionality.

The following examples illustrate situations where you might want to run more than one store.

  • A hospital pharmacy where you have two dispensing locations: an inpatient pharmacy and an outpatient pharmacy.
  • A pharmaceutical warehouse where stock from a particular donor is received, issued and accounted for separately to stock in the rest of the warehouse.
  • A hospital pharmacy where the pharmacy store stock is treated separately to the dispensary stock. You would set up mSupply with a store called “Pharmacy store” and a store called “Dispensary”. You would use the function covered in section 8.05. Transferring goods to another store to move stock from the pharmacy store to the dispensary.
  • A pharmaceutical warehouse where you have 2 or more actual warehouses. These may be adjacent or several hundred kilometres apart. (Of course you need network connectivity between sites to run mSupply at each site).
  • You're using mSupply mobile- each mobile site will synchronise data with a virtual store on the mSupply server.

Note: In the above examples, when you log on, you would select the appropriate mode - see table:

Examples Stores Log on mode
Hospital Pharmacy In-patient Dispensary Dispensary
Out-patient Dispensary Dispensary
Hospital Pharmacy Pharmacy store Store
Dispensary Dispensary
Warehouse Adjacent Store Store
Remote store Store

From the Special drop down menu click Show stores… The Stores list window (shown below) appears and displays a list of all the stores which currently exist including their sync type:

Double-click on any store in the list in the View stores window described above to view or edit its details. You will see the same window as in the Creating new stores section below but the various fields will be filled in with the store's current settings. You can click into the fields and edit them as desired. Note that in the top left of the window, the name of the store you are editing is always displayed, regardless of which tab you are on, so that you always have a reminder of which store you are editing!

To create a new store click the New store button in the Store list window shown above. This will display the Store details window shown below, which allows you to enter the details of the new store:

Store code: The code used to identify the store. If you have a lot of stores it would be helpful if you decide on a good pattern to use for the codes.

Store type: Set in the drop down list to the right of the Store code field. Can be one of:

  • Store: a normal store used for managing inventory and issuing to customers
  • Dispensary: a store used for managing inventory and dispensing to patients
  • Report: a special type of store used for reporting information only, not managing inventory. Don't use this unless specifically told to do so!

Name: The name used to identify the store throughout mSupply.

Organisation name: The name of the organisation running the store. Defaults to the organisation name entered in File > Preferences.

Address line 1-5, Postal /Zip code, phone: Enter the address and contact details for the store in here if there are any. These details can be used in reports

Disable this store: Check the Disable this store checkbox to stop the store from being used. You might want to use this feature if the store is not ready for use yet or is no longer to be used and can't be deleted. You will be asked to confirm the disabling after clicking on the OK button on this window.

Responsible officer: Select the officer responsible for the store in this drop down list. A helpful reminder for others and can be used in reports.

Please note: When you create a new store, the new store will automatically have its supplying store set to the store you are logged into at the time you create it.

Tags

Tags are used in reporting to group stores together. This area shows the tags that the store currently has. To add a tag, simply click into the area and type the tag's name. When you have finished typing the tag's name then press the Tab or Space keys on the keyboard (not Enter or return, that will close the window!). You know when you have done it right because the tag will appear in its own little box with an 'x'. If you want to remove any tag from the store, simply click on that 'x'. In this way you can add or delete as many tags from a store as you like.

After having created a new store, the Stores list window will display the new list of all stores and you may double-click an entry to edit that store's details. A number of things that will need to be attended to are:

To do a number of the following steps, you will need to log in to the new store. To do this, you will need to give yourself access to the new store as shown in section 23.15. Managing users. Any other users who need to access the store will also need their permission altered accordingly. After giving yourself permission to log in to the new store, log in to it and carry out these steps.

  • Set the preferences for the store.
  • Set the store's logo so that it can appear in print-outs and reports.
  • Set the visibility of items in the store. All items in the system will be set to invisible in the new store when it is created. You will need to modify visibility of items in order to be able to handle stock of those items.
  • Setup Synchronisation if you are going to use a synced system. See 24.03. Remote synchronisation.
  • Setup any custom store data (used for reporting).
  • Set the master lists used by the store (a convenient method for controlling item visibility). See 4.04. Item master lists

If this newly created store will be 'Active' on a satellite server on a synced mSupply system (refer to 24.03. Remote synchronisation, then user access to the store will need to be defined on that satellite server.

  • The preferences described here are set 'per store' and can be different for each store in an mSupply datafile.
  • In a synced system there will be multiple 'sync satellites' and store preferences will need to be set for each store on each mSupply sync satellite. See 24.03. Remote synchronisation.
  • Other preferences (accessed through File > Preferences…) apply to all stores in an mSupply datafile.
  • If you have to set the same preferences for lots of stores you might like to try the 24.09. Bulk Store Preferences Editor. It just might save you some time and your sanity :-)

This tab contains the preferences that can be set for a store. Each store has its own settings for these preferences: this is different for the settings in File > Preferences which apply to all stores in an mSupply datafile.

This is what each preference does:
Sort available batches by VVM statusIf the store is only to be used for vaccines, you can sort the list of available batches by vaccine status rather than expiry date.
Patients created in other stores not visible in this store If this is checked, patients that are created in other stores in the same site will not be visible in this store. It is set to true by default when a store is created.
Names created in other stores not visible in this store If this is checked, names (customers, suppliers, manufacturers, donors etc.) created in other stores in the same site will not be visible in this store. It is set to true by default when a store is created.
Allow users to enter total quantities to distribute to appropriate packs Users can enter the total quantity that they wish to distribute to appropriate packs.
Round up the distributed quantity The value for distributed quantities will be rounded upwards.
Able to pack items into multiple boxes Checking this enables the functionality for packaging goods into boxes on the Transport tab of a customer invoice. See 8.06. Box management for details.
Store: Able to issue in foreign currency Foreign currencies can be used on supplier invoices for overseas suppliers.
Allow editing selling price on customer invoice lines Individual selling prices can be edited on customer invoice lines. Please note that the Price editable when issuing checkbox on the General tab of an item's details page must also be checked for each item that the price is to be editable for.
Purchase order must be authorised Turns on purchase order authorisation. See Ordering Items From Suppliers.
Finalise customer invoice automatically Automatically finalise customer invoices with confirmed status, which is normally when the goods are dispatched.
Customer invoices must be authorised Turns on customer invoice authorisation (i.e. goods can only be sent to a customer after the action has been authorised). See 24.17. Authorisation for details.
Authorisation needed only if over budget This additional option is enabled when customer invoice authorisation is turned on.
Confirm customer invoices automatically Set a New Customer Invoice status to confirmed when the OK button is clicked. This means that it is not possible to print a picking slip for the issued goods.
Supplier invoices must be authorised Turns on supplier invoice authorisation (i.e. goods can only be brought into stock when the action has been authorised). See 24.17. Authorisation for details.
Confirm supplier invoices without asking Set a New Supplier Invoice status to confirmed when the OK button is clicked. The goods are made available in stock without informing the user.
Goods received lines must be authorised: Turns on goods receipt authorisation (i.e. only authorised goods receipts can be processed for the goods to be made available in stock). See 24.17. Authorisation for details.
Locations must be entered for goods received A shelf location must be entered on the goods receipt item line form when receiving goods into stock.
Able to specify manufacturer when receiving, ordering or quoting for items Gives users the option to record the manufacturer of goods when making purchase orders, goods receipts or entering a quotation from a supplier.
Show item unit column when issuing
Log transaction edit
Set pack to one for all visible items in this store
Use remote authorisation for request requisitions Turns on remote authorisation for request requisitions. See 24.18. Remote authorisation for details.
Use remote authorisation for response requisitions Turns on remote authorisation for response requisitions. See 24.18. Remote authorisation for details.
Use remote authorisation for customer invoices Turns on remote authorisation for customer invoices. See 24.18. Remote authorisation for details.
Use remote authorisation for supplier invoices Turns on remote authorisation for supplier invoices. See 24.18. Remote authorisation for details.
Can manually link requisition to supplier invoice When receiving stock, users can match the supplier invoice to the initial requisition. They can then add items from the linked requisition, speeding up the process of creating the supplier invoice. This is useful for stores requesting and receiving stock from suppliers that do not use mSupply. See the 7.01. Receiving goods (supplier invoices) page for details.
Automatically populate supply quantities with requested quantities On requisitions, automatically populate supply quantities with requested quantities, instead of 0. Supply quantities can still be edited.
Show extra fields on requisitions When a line is selected on a response requisition, an extra box is displayed under the table of requisition lines to show the calculations behind the suggested quantity. The extra field is currently only populated for Côte d'Ivoire users.
Show comment field when entering supplier invoice lines Allows users to type a comment for individual items received on a supplier invoice.
Consolidate batches Items with the same batch, expiry date, pack size, location, donor, cost and sell price will automatically consolidate when bringing goods into stock from a supplier invoice or doing a stocktake.
Edit prescribed quantity on prescriptions When checked an additional Prescribed quantity field os available when entering a precription line. See 10.02. Prescription entry for details.
mobile: Enforce lookback period This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses vaccine module This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses dispensary module This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses dashboard module This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses cash register module This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses payment module This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses patient types This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.
mobile: Uses Hide Shapshot column This preference only has an effect if this is an mSupply mobile store. See mSupply mobile setup for details.

Custom data

This section is for store specific custom data fields that must always be present. User definable custom fields are handled on the Custom fields tab (see the Custom fields tab section below for details).

Monthly consumption lookback period: The number of months of consumption information to use when calculating average monthly consumption for this store. Currently only used when the Côte d'Ivoire customisation is enabled.

Months lead time: The number of months before ordered goods normally arrive. Used to calculate how much stock to order for the suggested quantity in requisitions, for example. Currently only used when the Côte d'Ivoire customisation is enabled.

When finalising a goods receipt

There are three options:

  • Don't receive goods into stock until supplier invoice is taken off hold - for goods to enter stock you must finalise the goods receipt and then take the automatically generated supplier invoice off hold
  • Receive goods into stock, and leave supplier invoice confirmed - goods enter stock as soon as the goods receipt is finalised. The automatically generated supplier invoice is created with confirmed status.
  • Receive goods into stock, and finalise supplier invoice immediately - goods enter stock as soon as the goods receipt is finalised. The automatically generated supplier invoice is created with finalised status.

How you set this preference is determined by how separate your goods receiving and finance sections are. If they are not in the same building, you might want to use the “Receive into stock and leave confirmed” option, as this will allow you to proceed with issuing goods without waiting for the finance department's approval.

For stock transfers, the supplier invoice in the receiving store should be...

This option applies to all stores that this store transfers stock to.

This option is used to determine whether stock transferred from one store to another is received to a destination store and automatically introduced to stock or not. The On hold option prevents stock from being introduced, while the Finalised option automatically makes the stock available for use in the destination store - without the receiving store having the opportunity to amend the Goods Receipt.

  • Choose Finalised if there is no need to check / alter the quantity received compared to what was sent.
  • Choose On hold if the store is being used by mSupply mobile, and the goods receipt needs to be confirmed before receiving.

Here you can set the store logo by pasting in a logo you have copied to the clipboard - you must copy the contents of a file to the clipboard, not the file itself. The file can be in .jpg, .png, .bmp, .gif, or .tiff format. This logo will be displayed at the bottom right of the mSupply navigator screen when you login to this store only.

This store logo will override the logo saved in the Settings > Preferences > Logo tab.

To print this store logo on standard customer and supplier invoices etc. you will need to go to the Settings > Preferences > Logo tab in mSupply and tick the Display logo on invoice checkbox. When a store logo is set it will print the store logo instead of the logo set on that preferences tab.

Note that after saving the store logo you must login to mSupply again or use the switch function to reload this store to see it.

This tab shows the custom fields that have been set up for stores (see the Custom fields section for details). You can also add or edit custom fields directly from this screen.

Adding a custom field

To add a new field, click on the New line button; a new line with default values of “Field label” and “Field value” in the two columns is added to the table and highlighted. Click on the value in each column and type the real label and value for the piece of information.

Editing an existing custom field

To edit the label or value of any custom field, simply click on the cell in the table and edit the entry.

Deleting a custom field

To delete any custom field simply select its row in the table and click on the Delete line(s) button. You can use Shift+click, Control+click, Control A (or Cmd instead of Ctrl if you're using a Mac!) to select multiple lines and delete them all at once if you like.

Controlling the visibility of items in different stores is important because you can only order, distribute, receive goods for and report on items that are visible in your store. It's also important that stores don't have items visible that they don't use so that they don't accidentally order them etc.

If you have lots of stores in your data file, managing item visibility can turn into a difficult task. Thankfully, mSupply has some helpful tools to make it simple! There are 2 ways to manage item visibility and you use one or the other, not both:

  1. automatically using the Master lists tab or
  2. manually using the Visibility tab

Each are useful in different situations and are described below.

Master lists tab

If you have a lot of stores in mSupply, we recommend that you use master lists to control item visibility. Especially in a syncing system because it means that the visibility of newly created items will be automatically handled correctly. The visibility of items in a store whose visibility is controlled by master lists is immediately updated if any changes are made to any of the master lists. For instance, if a new item is added to a master list controlling visibility then that new item is made visible in all stores that use the master list. And any items deleted from the master list are made invisible in any store using that list.

The first thing to do is to turn on the preference to make master lists control item visibility in stores. Do that in File > Preferences… on the Item tab - see General preferences, the item tab for details.

The next thing to do is to create the master list(s) that will control item visibility. See Item master lists for details on how to do that. Giving your master lists helpful names will help you remember what they're for e.g. “Store xxx visibility list”.

Now edit the store to tell mSupply which master list(s) will be used to define which items are visible in the store:

  1. Click on Special > Show stores… (or click on the Stores icon on the Special tab of the navigator)
  2. Double-click the store who's visibility you would like to manage:
  3. Click on the Master lists tab:
  4. Select which master list(s) you would like to control the visibility of items in your chosen store by checking their checkbox in the Use master list column: In this example, the District warehouse master list has been selected to control the visibility of the District warehouse 1 store.
  5. Click the OK button to finish. As soon as you do that the items on the selected master list(s) are made visible in the store and any items not on the selected master list(s) are made invisible. Any new items added to the selected master list(s) will be made visible in the store and any items removed form the master list(s) will be made invisible in the store.

Visibility tab

If your system is a Sync system (with Primary and Satellite servers) and your store is hosted on a Sync Satellite server, then you will not see the Visibility tab. These settings need to be made while logged in to the Sync Primary Server.

You will also only see this tab if you are editing the store you are logged in to.
To log into a store you may need to first give yourself permission to do so under File > Edit Users > Double-click your user name > the Log in rights tab. Phew!

The Visibility tab contains tools for manually setting the visibility of items and names in a store.

The item visibility tools are good to use if you do not have many stores in mSupply and only need to make occasional changes to visibility for a number of items. If you want to make a change to a single item's visibility in a single store then you can do that by going to the item's details window and using the store tab (see Item basics, the stores tab).

If you have turned on the preference to control item visibility by master list then you will not be able to use the visibility tab or the visibility settings on the store tab of an individual item's details window.

Here's what the tab looks like:

The buttons provide you with different ways to hide and show items and names in the store (Note: be careful showing names in databases that have a lot of names records. For example if you have 20 virtual stores and 200,000 names in your database, showing all names in all stores will create 4 million (20×200,000) records to map the visibility of each name in each store):

  • The Show stats button shows how many items and names are currently hidden and visible
  • The Set item visibility to match master lists for this store button matches the item visibility to the master lists that are selected on the Master lists tab. (Note: this is a one-off operation, no changes will be made to item visibility if the master lists are changed after you click this button. See the section above if you want that to happen!) If there are some items that can't be set to invisible (because they have stock, for example) a temporary master list will be created containing the items which could not have their visibility removed. Use the list to decide what to do with each item.
  • The Make all items in this store visible and Make all items in this store invisible both do just as they say.
  • The Set pack to one for all visible items in this store will check the Allow pack to 1 conversion and Convert pack to 1 when receiving checkboxes for all items in the store so that all stock received into the store will automatically be received in packs of 1. This is useful in a dispensary store, for example.
  • The Set to match button requires you to choose a master list. Clicking the button makes the items that are on the master list selected in the drop down list next to it visible in the current store. Note that it does not hide items that are already visible but not on the master list.
  • The Make all names in this store visible button does exactly what it says and makes all names in the datafile visible in the current store.
  • The Make all names in this store invisible button does the opposite and makes all names in the datafile invisible in this store. Be careful using this - you won't be able to receive or distribute stock from/to anyone until you make some names visible in the store!
  • The Query names button enables you to search for names (customers, suppliers, manufacturers, donors etc.) in the datafile. Every search you run creates a selection which is then operated on by the Make found names visible in this store button.
  • The Make found names visible in this store will make all names in the last selection made with the Query names button visible in this store. Ask Sustainable Solutions for help if you're not sure about getting the right selection of names, as the consequences of making a mistake can be time consuming to fix!

mSupply has a synchronisation system designed to cope with environments which have weak or intermittent internet. The system passes information between a server and satellite (or tablet running mSupply mobile) when there is an internet connection, and stores information to be sent when there is not.

This tab is where the store specific settings for synchronisation are made. See Remote Synchronization for more details.

To delete a store, click on the Delete button in the View stores window. Note: deletion of a store is a serious thing to do and is only possible when that store contains zero stock and there have been no transactions recorded. mSupply will check and tell you that deletion is not possible if these criteria are not met. If you can't meet these criteria and you still want to stop people using the store then you can disable it. Do that by checking the Disable this store checkbox on the Store details window (see above).

If you have a customer that is about to start using mSupply mobile, once you create the virtual store you will end up with two customers with the same (or similar) names, as creating a virtual store also creates a linked name. Fear not: you can use mSupply's Merge names functionality to join the two names into one record.

Note that you must choose the newly created store's Name as the “Name to keep” and the older Customer's name as the “Name to delete”. However, doing this means that you will lose the original name properties → you should also take a note or screendump of any that you want to keep (e.g. address, categories etc.) and then re-apply them to the new store name.

  • Regardless of how you create the store from the customer, you will almost always find unfinalised CIs that prevent the merge from being completed. You will need to finalise these CIs on the corresponding sites before the merge is successful.
  • These can be hard to find on a multi-store system where the transactions could have come from a number of places. Suggested approach: Use Supervisor mode, view CIs, and customise the list view to show Store name.
  • If these transactions are on a number of stores on satellite sites on dodgy internet connections, it can take days to log in to the satellite sites, finalise the CIs, and sync the finalised CIs back to the Primary. Meanwhile, there is a danger that new transactions will be created! :-\



  • Last modified: 2020/09/30 06:09
  • by Mark Glover