<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="ProgrammersReference.xslt"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ePocket.no/Handyman62/Api">
  <xs:element name="StoreList">
    <xs:annotation>
      <xs:documentation>Handyman Import: Stores and items</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Store" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="StoreNo">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="StoreName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="40"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DeleteStoreContents" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>Use to delete entire store content when no StoreItemList is provided.
This tag will have no effect if StoreItemList has items.

If one or more item is provided in the StoreItemList, the entire store content will be replaced with the provided items</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AddToAllDepartments" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, the store will be added to all departments if not already added</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AutomaticHandheldUpdate" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, the handheld will be updated without the user requesting an update</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AutomaticHandheldUpdateNextSync" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, the handheld will be updated without the user requesting an update on the next sync only</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="InventoryStausAllowedOnHandheld" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, the user are allowed to perfom an inventory status on the handheld</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ShowInvetoryWhenCounting" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1 (Default), the inventory for existing items will not be visible when counting items</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AutomaticInventoryStausUpdate" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, innvetoy status will utdate the store contents immedeately</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>                
              </xs:element>
              <xs:element name="IgnoreWholesaler" minOccurs="0">
                <xs:simpleType>
                  <xs:annotation>
                    <xs:appinfo>0=No, 1=Yes</xs:appinfo>
                    <xs:documentation>If 1, wholesaler will not be taken into acconut when maintaining the store. One item-number will only exist one time in the store</xs:documentation>
                  </xs:annotation>
                  <xs:restriction base="xs:integer">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="StoreItemList">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="StoreItem" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="WholesalerNo" minOccurs="0">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="20"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="ItemNo">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="255"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="Description">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="110"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="Unit">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="4"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="Price" type="xs:float" />
                          <xs:element name="VATRate" type="xs:float">
                            <xs:annotation>
                              <xs:documentation>If empty string, the the default VATRate will be used</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element name="OrderUnit" type="xs:float" />
                          <xs:element name="Quantity" type="xs:float" />
                          <xs:element name="StoreMinimum" type="xs:integer">
                            <xs:annotation>
                              <xs:documentation>Lower limit for quantity</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element name="StoreMaximum" type="xs:integer">
                            <xs:annotation>
                              <xs:documentation>Upper limit for quantity</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element name="StockItem">
                            <xs:simpleType>
                              <xs:annotation>
                                <xs:appinfo>0/1</xs:appinfo>
                                <xs:documentation>0 = temporary item.</xs:documentation>
                              </xs:annotation>
                              <xs:restriction base="xs:integer">
                                <xs:enumeration value="0"/>
                                <xs:enumeration value="1"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="CostPrice" type="xs:float" minOccurs="0" />
                          <xs:element name="ItemNo2" minOccurs="0">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="255"/>
                              </xs:restriction>
                            </xs:simpleType>
                          <xs:annotation>
                              <xs:documentation>Increased from 20 to 255 in 9.4.4</xs:documentation>
                            </xs:annotation>
						  </xs:element>
                          <xs:element name="ItemGroup" minOccurs="0">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="20"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                          <xs:element name="URL" minOccurs="0">
                            <xs:annotation>
                              <xs:documentation>URL to product information on the Internet</xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:maxLength value="20"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>