| Next revision | Previous revision |
| import_and_export:importing_stores [2024/07/26 09:50] – created Gary Willetts | import_and_export:importing_stores [2026/01/28 22:04] (current) – Mark Glover |
|---|
| </WRAP> | </WRAP> |
| |
| The Import stores function allows you to import stores into your datafile. | The Import stores function allows you to import stores into your datafile. If the store does not exist already it will be created, if it does already exist it will be updated with the contents of the import file. |
| |
| | <WRAP center round alert 60%> |
| This function is currently not available to general users and is not available from the standard user interface. You can create the import spreadsheet of course, but the actual import will need to be done by The mSupply Foundation staff. | This function is currently not available to general users and is not available from the standard user interface. You can create the import spreadsheet of course, but the actual import will need to be done by The mSupply Foundation staff. |
| | </WRAP> |
| | |
| |
| |
| ==== Import file format ==== | ==== Import file format ==== |
| * The import file must be an ".xlsx" (Excel) type file. | * The import file must be an ".xlsx" (Excel) type file. |
| * The first row is assumed to contain the column headers and will be ignored during the import. | * The first row must contain the column headers shown in the **Column heading** column in the table below. |
| * The table below details the fields you should have (and the order they must be in) in each row of the file. | * The store code is used to check whether a store exists already. If it does not exist in the datafile it will be created with the values in that row of the spreadsheet. If a store with the store code does exist in the datafile already, its values will be updated with the values contained in that row of the spreadsheet. <WRAP center round important 60%> |
| | Blank cells will be ignored so values will not be updated with empty cells. |
| ^ Column ^ Field ^ Description ^ | |
| | 1 (A) | Store name | **Mandatory**, Text, up to 18 characters. . | | |
| | 2 (B) | Store code | **Mandatory**, Text, up to 18 characters. . | | |
| | 3 (C) | Store mode | **Mandatory**, Text, up to 80 characters. . | | |
| | 4 (D) | Site code | **Optional**, ignored during the import. Text up to 60 characters, for your reference only. The unit the item is to be measured in e.g. Tablet, Each, ml, g, bottle, vial, Ampoule. | | |
| | 5 (E) | Organisation name | **Mandatory**, Integer. The number of units in a single pack for this stock line. | | |
| | 6 (F) | Address 1 | **Mandatory**, Integer. The number of packs (containing the number of units in column 4) in this stock line. Equal to the total quantity if the Pack size is ''1''. | | |
| | 7 (G) | Address 2 | **Optional**, Real number. The price you pay for one pack. | | |
| | 8 (H) | Address 3 | **Optional**, Real number. The price the customers of this store pay for one pack. Set this to the same as the cost price or leave it empty if you do not actually sell the stock that you issue. | | |
| | 9 (I) | Address 4 | **Optional**, Text, Up to 20 characters. The batch of this stock line. | | |
| | 10 (J) | Address 5 | **Optional**, Text, in short format (dd/mm/yy or mm/dd/yy, depending on the format set in your computer's operating system). The date this stock line will expire. | | |
| | 11 (K) | Post/Zip code | **Optional**. Text, Up to 32,000 characters. The full description of the item. Be careful not to have any carriage return characters in the text though, or the import file will not be valid! | | |
| | 12 (L) | Phone number | **Optional**, Text, up to 30 characters. If you import a department name that doesn't exist, the department will be created. | | |
| | 13 (M) | Tags | **Optional**, Text, Up to 60 characters. The code for the shelf location of this stock line.\\ If the location does not exist, the location will be created as the stock is loaded. You can then edit the location details after the import.| | |
| | 14 (N) | Store to copy preferences from | **Optional**, Text, Up to 60 characters. The name of the donor of this stock line. If the donor doesn't exist, it will be created. | | |
| | 15 (O) | Type | **Optional**, Text. The value to be entered in custom stock field 5 for this batch. If the value doesn't already exist as an option for custom stock field 5 then it will be added. See the [[receiving_goods:custom_stock_fields]] page for details of custom stock fields. | | |
| | 16 (P) | Created date | **Optional**, Integer. The number of packs that fit in a carton (NOT the number of units in a carton!). | | |
| | 17 (Q) | Is a server | **Optional**, Decimal number. The volume that a single pack of this batch occupies on the shelf in m<sup>3</sup>. | | |
| | 18 (R) | Version | **Optional**, Decimal number. The weight of a single pack of this batch in kg. | | |
| | 19 (S) | Created by | **Optional**, Text. The name of the user whi created this store. | | |
| | |
| <WRAP important center round 90%> | |
| **Please note:** It is not part of the import file but, if an item's default Volume per pack is set (see the **Volume per pack** field on the [[items:item_basics:tab_storage]] page for details) then this will be applied to the stock line's volume per pack. The value will be proportionately increased or decreased if the stock line's pack size differs from the item's default pack size (**Preferred pack size** field on the [[items:item_basics:tab_storage]] page). | |
| </WRAP> | </WRAP> |
| | * The currently logged in user (the one doing the import) is given login permission to the store. |
| | * The table below details the fields you should have in each row of the file. |
| |
| Here is a blank spreadsheet you can use with the right columns: {{ :import_and_export:msupply_stock_import.xlsx |}} | ^ Column ^ Column heading ^ Description ^ |
| | | 1 (A) | store_name | **Mandatory**, Text. The name of the store . | |
| | | 2 (B) | code | **Mandatory**, Text. The code of the store. | |
| | | 3 (C) | store_mode | **Optional**, Text, one of "store" or "dispensary". The mode of the store. | |
| | | 4 (D) | site_code | **Optional**, Integer. The synchronisation site the store belongs to. Leave empty if this is not part of a synchronisation setup. Will be set to 1 by default if not provided. | |
| | | 5 (E) | organisation_name | **Optional**, Text. The name of the organisation this store belongs to. No functional value but can be included in reports etc. | |
| | | 6 (F) | address_1 | **Optional**, Text. The number of packs (containing the number of units in column 4) in this stock line. Equal to the total quantity if the Pack size is ''1''. | |
| | | 7 (G) | address_2 | **Optional**, Text. The first line of this store's address. | |
| | | 8 (H) | address_3 | **Optional**, Text. The first line of this store's address. | |
| | | 9 (I) | address_4 | **Optional**, Text. The first line of this store's address. | |
| | | 10 (J) | address_5 | **Optional**, Text. The first line of this store's address. | |
| | | 11 (K) | postal_zip_code | **Optional**. Text. The store's postal or ZIP code. | |
| | | 12 (L) | phone | **Optional**, Text. The phone number of the store in no particular format. | |
| | | 13 (M) | tags | **Optional**, Text. The tags belonging to the store. Separate individual tags with a space. | |
| | | 14 (N) | copyStorePrefFromStoreCode | **Optional**, Text. The code of the store to copy the following store properties from: preferences, custom data, master list associations and user permissions (for the user in column 19 (S)). If none is provided the store is given a default set of preferences, empty custom data, no master list associations and no user permissions. | |
| | | 15 (O) | Type | **Optional**, Text. . | |
| | | 16 (P) | Create Date | **Optional**, . | |
| | | 17 (Q) | Server | **Optional**, Not used. | |
| | | 18 (R) | Version | **Optional**, Not used. | |
| | | 19 (S) | User | **Optional**, Text. The name of the user to copy permission from to give to the currently loggfed in user for this store. | |
| |
| | Here is a blank spreadsheet you can use with the right columns: {{ :import_and_export:importstores.xlsx |}} |
| |
| |
| \\ | \\ |
| \\ | \\ |
| | // Previous: **[[import_and_export:importing_items]]** | | Next: **[[import_and_export:importing_names:]]** // | | | // Previous: **[[import_and_export:importing_supplier_quotes]]** | | Next: **[[import_and_export:importing_tenders]]** // | |
| ---- struct data ---- | ---- struct data ---- |
| pagestatus.status : | pagestatus.status : |
| ---- | ---- |
| |