<?xml version="1.0" encoding="windows-1251"?>
<xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns="" id="CDFS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sm="http://www.servplus.ru" >
  <!--Карточка товара от поставщика -->
  <xs:element name="CDFS" abstract="true" msdata:IsDataSet="true" msdata:CaseSensitive="true" msdata:Locale="ru" >
    <xs:complexType>
      <xs:sequence>
        <!--Карточка складского учета-->
        <xs:element msdata:IsDataSet="true" msdata:CaseSensitive="true" msdata:Locale="ru" name="CD" sm:PostId="SMCARD.ARTICLE" >
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element msdata:Locale="ru" name="SMCARD">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ARTICLE" type="xs:string" sm:Function="ArticleFromNewBarcode(_BC,DATATYPE,999,1,,)" />
                    <xs:element name="COUNTRY" type="xs:string" minOccurs="0" sm:ColumnName="Страна"/>
                    <xs:element name="DATATYPE" type="xs:decimal" default="0" />
                    <xs:element name="DEADLINE" type="xs:decimal" minOccurs="0" sm:ColumnName="Срок реализации товара" />
                    <xs:element name="IDCLASS" type="xs:decimal" sm:Function="CardClassId(999,1,,)" />
                    <xs:element name="GLOBALARTICLE" type="xs:string" minOccurs="0" sm:Function="ArticleFromNewBarcode(_BC,DATATYPE,999,1,,)" />
                    <xs:element name="IDMEASUREMENT" type="xs:decimal" default="0" sm:ColumnName="Ед изм" />
                    <xs:element name="MINPROFIT" type="xs:decimal" default="0" sm:ColumnName="Фиксированная цена, минимальная цена, обеспечивающая рентабельность" />
                    <xs:element name="NAME" type="xs:string" sm:ColumnName="Название товара" />
                    <xs:element name="SHORTNAME" type="xs:string" default="Название товара" sm:ColumnName="Краткое наименование" />
                    <xs:element name="MESNAME" type="xs:string" minOccurs="0" sm:Function="MeasurementName(IDMEASUREMENT)" />
                    <xs:element name="MESABBREV" type="xs:string" minOccurs="0" sm:Function="MeasurementAbbreviation(IDMEASUREMENT)" />
					<xs:element name="_BC" type="xs:string" sm:ColumnName="Штрихкод" /> 
                    <xs:element name="_QTY" type="xs:decimal" default="1" sm:ColumnName="Количество в штрихкоде" />
                    <xs:element name="_PACKID" type="xs:decimal" minOccurs="0" sm:ColumnName="Код упаковки" />
                    <xs:element name="_WEIGHT" type="xs:decimal" minOccurs="0" sm:ColumnName="Вес брутто в упаковке" />
                    <xs:element name="_TW" type="xs:decimal" minOccurs="0" sm:ColumnName="Ширина упаковки" />
                    <xs:element name="_TL" type="xs:decimal" minOccurs="0" sm:ColumnName="Длина упаковки" />
                    <xs:element name="_TH" type="xs:decimal" minOccurs="0" sm:ColumnName="Высота упаковки" />
					<xs:element name="CARDCOMMENT" type="xs:string" minOccurs="0" sm:ColumnName="Код" />
                    <xs:element name="_VERIFY" type="xs:string" sm:Function="VerifyNewBarcode(_BC,_QTY,_PACKID,IDMEASUREMENT,_WEIGHT,_TW,_TL,_TH)" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element msdata:Locale="ru" name="SMCARDTAX">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ARTICLE" type="xs:string" sm:Function="ArticleFromNewBarcode(_BC,0,999,1,,)" />
                    <xs:element name="RGNID" type="xs:decimal" default="-1" />
                    <xs:element name="DATEFROM" type="xs:dateTime" default="1970-01-01T00:00:00+03:00" />
                    <xs:element name="DATETO" type="xs:dateTime" default="9999-01-01T00:00:00+03:00" />
                    <xs:element name="TAXGROUPID" type="xs:decimal" default="3" sm:ColumnName="Код ставки НДС" />
					<xs:element name="_BC" type="xs:string" sm:ColumnName="Штрихкод" /> 
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
          <xs:unique msdata:PrimaryKey="true" name="SMCARD_PK">
            <xs:selector xpath=".//SMCARD" />
            <xs:field xpath="ARTICLE" />
          </xs:unique>
          <xs:unique msdata:PrimaryKey="true" name="SMCARDTAX_Constraint1">
            <xs:selector xpath=".//SMCARDTAX" />
            <xs:field xpath="ARTICLE" />
            <xs:field xpath="RGNID" />
            <xs:field xpath="DATEFROM" />
          </xs:unique>
          <xs:keyref name="SMCCARDTAXART" refer="SMCARD_PK">
            <xs:selector xpath=".//SMCARDTAX" />
            <xs:field xpath="ARTICLE" />
          </xs:keyref>
          <xs:keyref name="SMCCARDPROPERTIES_CARD" refer="SMCARD_PK">
            <xs:selector xpath=".//SMCARDPROPERTIES" />
            <xs:field xpath="ARTICLE" />
          </xs:keyref>
        </xs:element>
        <!--Штриховой код-->
        <xs:element name="BC" msdata:IsDataSet="true" msdata:CaseSensitive="true" msdata:Locale="ru" sm:PostId="SVSTOREUNITS.BARCODE+ARTICLE" >
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element msdata:Locale="ru" name="SVSTOREUNITS">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="BARCODE" type="xs:string" sm:ColumnName="Штрихкод" />
                    <xs:element name="ARTICLE" type="xs:string" sm:Function="ArticleFromNewBarcode(BARCODE,0,999,1,,)" />
                    <xs:element name="BARCODETYPE" type="xs:decimal" default="7" sm:ColumnName="Тип шк" />
                    <xs:element name="QUANTITY" type="xs:decimal" default="1" sm:ColumnName="Количество в штрихкоде" />
                    <xs:element name="UNITNAME" type="xs:string" minOccurs="0" sm:Function="PackName(_PACKID,_MEASID)" />
                    <xs:element name="_PACKID" type="xs:decimal" minOccurs="0" sm:ColumnName="Код упаковки" />
                    <xs:element name="_MEASID" type="xs:decimal" sm:ColumnName="Ед изм" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
          <xs:unique msdata:PrimaryKey="true" name="SVSTOREUNITS_PK">
            <xs:selector xpath=".//SVSTOREUNITS" />
            <xs:field xpath="BARCODE" />
            <xs:field xpath="ARTICLE" />
          </xs:unique>
          <xs:unique msdata:PrimaryKey="true" name="SVSTOREUNITS_ARTICLE">
            <xs:selector xpath=".//SVSTOREUNITS" />
            <xs:field xpath="ARTICLE" />
          </xs:unique>
        </xs:element>
        <!--Уровни складских запасов-->
        <xs:element name="GL" msdata:IsDataSet="true" msdata:CaseSensitive="true" msdata:Locale="ru" sm:PostId="SMSTOCKLEVELS.ARTICLE+STORELOC" >
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="SMSTOCKLEVELS" msdata:Locale="ru">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ARTICLE" type="xs:string" sm:Function="ArticleFromNewBarcode(_BC,0,999,1,,)" />
                    <xs:element name="STORELOC" type="xs:decimal" sm:List="AllActiveStoreLocations()" />
                    <xs:element name="MINDAYS" type="xs:decimal" default="0" sm:ColumnName="Мин.дней" />
                    <xs:element name="SHOWLEVEL" type="xs:decimal" default="0" sm:ColumnName="Зал" />
					<xs:element name="_BC" type="xs:string" sm:ColumnName="Штрихкод" /> 
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
          <xs:unique name="SMSTOCKLEVELS_PK" msdata:PrimaryKey="true">
            <xs:selector xpath=".//SMSTOCKLEVELS" />
            <xs:field xpath="ARTICLE" />
            <xs:field xpath="STORELOC" />
          </xs:unique>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>