import_and_export:importing_requisitions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
import_and_export:importing_requisitions [2021/08/10 15:58] – [Doing the import] Gary Willettsimport_and_export:importing_requisitions [2021/10/08 09:32] (current) Gary Willetts
Line 1: Line 1:
 {{indexmenu_n>96}} {{indexmenu_n>96}}
  
-====== 16.11. Importing requisitions ====== +====== 17.11. Importing requisitions ====== 
-Information coming soon.+This is a way to import standard customer requisitions (response)Requisitions created by this import are not connected to any internal order. You cannot import internal orders (request requisitions), customer stock history requisitions or imprest requisitions. 
  
 ===== Import spreadsheet format ===== ===== Import spreadsheet format =====
 The first row of the spreadsheet is for the column headers and is **not** imported. The first row of the spreadsheet is for the column headers and is **not** imported.
  
-The first 34 columns (up toand including column AH, "Notes") represent standard asset fields in mSupply and the column headers for these are completely ignored in the importAny columns after that are for asset properties and their headers are important; those headers must be in this format:+There **must be 6 columns** in the spreadsheet, in the order detailed in the table belowThey must all be present but some of the columns (the optional ones) are for your reference only and can be empty (the whole column is ignored during the import so it doesn't matter whether some or all the cells of the column are empty):
  
-<HTML><div style="text-align:center;font-weight:bold">Property name (Property type)</div></HTML>+^ Column number  ^ Column letter  ^ Field                                ^ Description ^ 
 +| 1              | A              | Customer code                   | **Mandatory**. 20 alphanumeric characters. The code of the customer the requisition is for. When the value in this column changes, mSupply will begin a new requisition. | 
 +| 2              | B              | Customer name                   | Optional. The name of the customer the requisition is for. | 
 +| 3              | C              | Item code                       | **Mandatory**. 18 alphanumeric characters. The code of the item that the customer is requesting stock of. | 
 +| 4              | D              | Item name                       | Optional. 255 alphanumeric characters. The name of the item that the customer is requesting stock of. | 
 +| 5              | E              | Customer current stock on hand  | Optional. Integer. The number of units of the item (not packs) the customer currently has in stock. If there is no value in this column, it is assumed to be 0. | 
 +| 6              | F              | Quantity requested              | **Mandatory**. Integer. The number of units (not packsof the item that the customer is requesting. |
  
-where **Property name** is the description the property will be given and **Property type** is one of "Text", "Date" or "Drop down list".+Rows belonging to the same requisition must all be grouped together in the spreadsheet; mSupply will interpret a change in customer code to mean that this row is for a new requisition
  
-For example, a column header of **Project name (Drop down list)** will represent a drop down list property with the description **Project name**.+Here is an example spreadsheet you can use (contains no property columns, only the standard mSupply columns): {{ :import_and_export:requisition_import_blank_template.xlsx |}}
  
-During the import process, if any properties or entities (like asset locations) do not exist, they will be created. If any options for drop down list properties or standard asset drop down lists (categories) are found not to exist, they will also be created. 
- 
-The import spreadsheet must contain these columns in this order (//Description// and //Current status// are mandatory, the others are all optional): 
- 
-^ Column number  ^ Column letter  ^ Field                                ^ Description                                                                                                                                                                                                                              ^ 
-| 1              | A              | Code                            | 255 alphanumeric characters. A code that the asset can be recognised by                                                                                                                                                                                               | 
-| 2              | B              | Description                     | **Mandatory**. 255 alphanumeric characters. The name the asset will have and be recognised by throughout the system                                                                                                                                                                                                                               | 
-| 3              | C              | Make                            | 255 alphanumeric characters                                                            | 
-| 4              | D              | Model                           | 255 alphanumeric characters                                                                                                                                                                                                                                                    | 
-| 5              | E              | Serial number                   | 255 alphanumeric characters                                                                                                                                                                                                                                 | 
-| 6              | F              | Supplier name                   | 255 alphanumeric characters. Name of the company/person who supplied the asset                                                                                                                                                                                                                                 | 
-| 7              | G              | Purchase order number           | 255 alphanumeric characters                                                                                                                                                                                                                                 | 
-| 8              | H              | Purchase order date             | Valid date in current operating system format. The date the purchase order to buy the asset was confirmed                                                                                                                                                                                                                                 | 
-| 9              | I              | Acquisition date                | Valid date in current operating system format | 
-| 10             | J              | Next maintenance due date       | Valid date in current operating system format. The date the next maintenance is due to be carried out on the asset | 
-| 11             | K              | Disposal date                   | Valid date in current operating system format. The date the asset will be or was disposed of | 
-| 12             | L              | Last verification date          | Valid date in current operating system format | 
-| 13             | M              | Location code                   | 20 alphanumeric characters. The code the location name will have. Will be matched against the names currently in the database. If a name with this code does not exist, one will be created with the name provided in the Location name field. If the Location name field is empty the name will be created with the code as its name. This field is mandatory if you want mSupply to create the name.  | 
-| 14             | N              | Location name                   | 255 alphanumeric characters.  | 
-| 15             | O              | Asset user name                 | 255 alphanumeric characters. The name of the asset user in the format "//last name//,//first name//". Will be created if the user does not exist as a contact of the location. | 
-| 16             | P              | Asset user phone number         | 255 alphanumeric characters | 
-| 17             | Q              | Asset user email                | 255 alphanumeric characters | 
-| 18             | R              | Custodian location              | 255 alphanumeric characters. Where the custodian of the asset (the main person responsible for it) is located | 
-| 19             | S              | Custodian name                  | 255 alphanumeric characters. The name of the custodian | 
-| 20             | T              | Custodian phone number          | 255 alphanumeric characters | 
-| 21             | U              | Custodian email                 | 255 alphanumeric characters | 
-| 22             | V              | Current status                  | **Mandatory**. 255 alphanumeric characters. Will be created if it doesn't exist | 
-| 23             | W              | Proposed status                 | 255 alphanumeric characters. The proposed next status of the asset. Will be created if it doesn't exist. Please note that there is no way of telling mSupply what proposed statuses are allowed to follow which current statuses during import. This can only be done manually in the asset settings (see the [[assets:assets_setup|]] page for details). During import all proposed statuses are assumed to be valid and will not be checked. There are, however, some important exceptions:\\ 1. If the current status of an asset is designated to be a final status, any proposed status will be ignored.\\ 2. If an imported asset has a current status which has some possible proposed statuses assigned, if the proposed status is not included in these, it will be added to them.\\ \\ So, be careful with the proposed statuses in the import file: you could make a mess if you have already set up which statuses can follow which and you don't follow that in the import file. | 
-| 24             | X              | Type                            | 255 alphanumeric characters. Will be created if it doesn't exist | 
-| 25             | Y              | Condition                       | 255 alphanumeric characters. Will be created if it doesn't exist | 
-| 26             | Z              | Purchase price                  | Number, currency. The cost of the asset when it was purchased | 
-| 27             | AA              | Purchase costs                  | Number, currency. Any costs that are ot be added ot the purchase proce to arrive at the total value of the asset to be depreciated | 
-| 28             | AB             | In service date                 | Valid date in current operating system format. The date the asset starts to depreciate from                                                                                                                                                                                                                                | 
-| 29             | AC             | Useful lifespan (months)        | Number, integer. The number of months the asset can be used for | 
-| 30             | AD             | Disposal value                  | Number, currency. The value of the asset at the end of its useful life | 
-| 31             | AE             | Insurer name                    | 255 alphanumeric characters | 
-| 32             | AF             | Insurance policy number        | 255 alphanumeric characters | 
-| 33             | AG             | Insurance renewal date          | Valid date in current operating system format. The date the insurance should be renewed by | 
-| 34             | AH             | Notes                           | Lots of alphanumeric characters! Any other information that needs to be stored against the asset | 
-| 35 onwards     | AI onwards     | User-defined property columns   | You can add user-defined property columns in any order from column AI onwards. Column header must be in the format "//Property name// (//Type//)" where //Property name// is the name of the property and //Type// is the type of the property (either //Date//, //Text// or //Drop down list//). If the property does not exist it will be created and if the option of a Drop down list property does not exist it will also be created. | 
- 
-Here is an example spreadsheet you can use (contains no property columns, only the standard mSupply columns): {{ :import_and_export:asset_import_blank_template.xlsx |}} 
- 
-<WRAP important center round 90%> 
-When entering dates in the spreadsheet, make sure they are counted as text in their cells. Sometimes Excel will autoconvert dates to //date// or //numerical// format and then they will import into mSupply as blank dates. You can make sure that dates will import correctly by using the row preview functionality (see below) - if the dates look correct here then they will import correctly. 
-</WRAP> 
  
 ===== Doing the import ===== ===== Doing the import =====
-Go to the //File > Import > Import assets// menu and you will be asked to select the import file from a file window. After you have selected the file (if it is valid) you will be shown this window:+Choose //File > Import > Import requisitions// from the menus and you will be asked to select the import file from a file window. After you have selected the file (if it is valid) you will be shown this window:
  
-{{ :import_and_export:screenshot_2021-04-19_at_15.35.02.png?600 |}}+{{ :import_and_export:screenshot_2021-08-11_at_15.42.11.png?400 |}}
  
-mSupply uses the **code** field to determine whether the asset being imported is a duplicate; an asset with the same code as one already in the database is determined to be a duplicate. Any assets with no code are ignored during duplicate checking i.e. an asset with no code can //never// be a duplicate and will always be imported as a new asset. In the //If duplicate codes are detected// section you tell mSupply what to do if it encounters a duplicate asset during the import: +The //Value// column shows the values mSupply has found in the cells for that row of the spreadsheet. You can move through the rows of the spreadsheet using the **Previous** and **Next** buttons. If you try to go beyond the first or last row of the spreadsheet mSupply will let you know.
-  * **Import as new asset:** this option will import the duplicate as a new asset +
-  * **Skip the duplicate without asking:** the duplicate will not be imported and that row of the spreadsheet will be ignored +
-  * **Stop the import:** as soon as a duplicate is encountered, the import will stop and all assets imported so far will be removed so that nothing is imported. +
-  * **Update the existing asset:** the asset that already exists with the code in the database will be updated with the information contained in the spreadsheet row. A new asset will not be created. BE CAREFUL WITH THIS OPTION: if a cell is blank in the spreadsheet then the corresponding value is removed from the asset (if it had a value set for it), not left as it is. +
- +
-The //Field// column of the table shows you all the columns that mSupply has detected in your import file, the //Value// column shows the values it has found in the cells for that row of the spreadsheet. You can move through the rows of the spreadsheet using the **Previous** and **Next** buttons. If you try to go beyond the first or last row of the spreadsheet mSupply will let you know.+
  
 You can carry out the import by clicking on the **Import now** button or cancel it by clicking on the **Cancel** button. You can carry out the import by clicking on the **Import now** button or cancel it by clicking on the **Cancel** button.
  
-When the import has finished you will be shown a message telling you how many assets were imported and how many rows of the spreadsheet were skipped, ignored or failed. +When the import has finished you will be shown a message telling you how many requisitions were imported. If there is an error (a customer code or item code doesn't exist or a mandatory column value is not present) you will be told what the error is and the import will be cancelled (nothing will be imported). In this case, correct the error in the spreradsheet and try the import again.
- +
-<WRAP info center round 90%> +
-All the assets created by the import will have the text "Created by import on //xx/xx/xxxx//" (where //xx/xx/xxxx// is the date of the import) appended to the end of their //Notes// field. +
-</WRAP>+
  
 \\ \\
  • Last modified: 2021/08/10 15:58
  • by Gary Willetts