<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="STOR" 
Name="ELEMENT" 
Description="Элемент" 
PrimaryKey="ElementID" 
DNAttributes="{BillOfGoods/DisplayName}" 
DisplayName="{0}">
  <Fields>
    <Attribute Name="ElementID" Index="19350001" Type="guid" Description="Идентификатор" />
    <Attribute Name="Amount" Index="19350002" Type="float" DefaultFormat="{0:0.#####}" Description="Количество" NumericPrecision="20" NumericScale="6" Required="1" />
    <Attribute Name="LotNumber" Index="19350003" Type="int" Description="Партия" Required="1" />
    <Attribute Name="Series" Index="19350004" Type="string" Description="Серия" CharacterMaximumLength="100" Required="1" />
    <Attribute Name="Price" Index="19350005" Type="float" DefaultFormat="{0:F2}" Description="Цена" NumericPrecision="12" NumericScale="2" Required="1" />
    <Attribute Name="ExpirationDate" Index="19350007" Type="date" Description="Срок годности" Required="1" />
    <Attribute Name="Comment" Index="19350008" Type="string" Description="Комментарий" Required="1" />
    <Attribute Name="TotalApplicationCount" Index="19350009" Type="float" DefaultFormat="{0:0.#####}" Description="Итоговое расходное количество" NumericPrecision="20" NumericScale="6" Required="1" />
    <Attribute Name="GTINSerialNumber" Index="19350017" Type="string" Description="GTIN/серийный номер" CharacterMaximumLength="28" Required="1" />
    <Parent Name="BillOfGoods" Index="19350012" Type="PHARM.BILL_OF_GOODS" Description="Номенклатура товаров" Required="1" />
    <Parent Name="PackageType" Index="19350013" Type="PHARM.PACKAGE_TYPE" Description="Вид упаковки" Required="1" />
    <Parent Name="TotalPackageType" Index="19350014" Type="PHARM.PACKAGE_TYPE" Description="Вид упаковки товара" Required="1" />
    <Choice Name="VAT" Index="19350015" Description="НДС" Required="1">
      <Item Name="Без НДС" Index="0" />
      <Item Name="10%" Index="1" />
      <Item Name="18%" Index="2" />
      <Item Name="20%" Index="3" />
      <Item Name="5%" Index="4" />
      <Item Name="7%" Index="5" />
      <Item Name="22%" Index="6" />
    </Choice>
    <Attribute Name="OrdinalNumber" Index="19350016" Type="int" Description="Порядковый номер" />
    <Attribute Name="ConversionId" Type="string" Description="Идентификатор перехода" CharacterMaximumLength="36" Required="1" />
  </Fields>
  <DbMapping>
    <Table name="T_INVOICE_ITEM">
      <Map Name="ElementID" Column="ElementID" />
      <Map Name="Amount" Column="Amount" />
      <Map Name="LotNumber" Column="LotNumber" />
      <Map Name="Series" Column="Series" />
      <Map Name="Price" Column="Price" />
      <Map Name="ExpirationDate" Column="ExpirationDate" />
      <Map Name="Comment" Column="Comment" />
      <Map Name="TotalApplicationCount" Column="TotalApplicationCount" />
      <Map Name="GTINSerialNumber" Column="GTINSerialNumber" />
      <Map Name="BillOfGoods" Column="BillOfGoods" />
      <Map Name="PackageType" Column="PackageType" />
      <Map Name="TotalPackageType" Column="TotalPackageType" />
      <Map Name="VAT" Column="VAT" />
      <Map Name="OrdinalNumber" Column="OrdinalNumber" />
      <Map Name="ConversionId" Column="ConversionId" />
    </Table>
  </DbMapping>
</Entity>