<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="STOR" 
Name="SCANNED_INVENTORY_ELEMENTS" 
Description="Отсканированные элементы инвентаризации" 
PrimaryKey="ScannedInventoryElementsID">
  <Fields>
    <Attribute Name="ScannedInventoryElementsID" Type="guid" Description="Идентификатор" />
    <Attribute Name="Sgtin" Type="string" Description="Sgtin" CharacterMaximumLength="28" Required="1" />
    <Parent Name="Remains" Type="STOR.REMAINS" Description="Остатки на складе" />
    <Parent Name="InventoryElements" Type="STOR.INVENTORY_ELEMENTS" Description="Элемент инвентаризации" Required="1" />
    <Attribute Name="Barcode" Type="string" Description="Штрихкод" CharacterMaximumLength="100" />
    <Choice Name="Type" Description="Тип">
      <Item Name="Списание" Index="0" />
      <Item Name="Добавление" Index="1" />
    </Choice>
    <Attribute Name="OrdinalNumber" Type="int" Description="Порядковый номер" Required="1" />
    <Parent Name="SupplierContractAbr" Type="STOR.SUPPLIER_CONTRACT_ABR" Description="Аббревиатура договора" CharacterMaximumLength="20" Required="1" />
    <Parent Name="SupplierContract" Type="STOR.SUPPLIER_CONTRACT" Description="Договор от поставщика" Required="1" />
    <Attribute Name="Amount" Type="float" DefaultFormat="{0:0.#####}" Description="Количество(ед.покупки)" NumericPrecision="20" NumericScale="6" Required="1" />
    <Attribute Name="SpecifiedQuantity" Type="float" DefaultFormat="{0:0.#####}" Description="Указанное количество" NumericPrecision="20" NumericScale="6" Required="1" />
    <Parent Name="SpecifiedPackageType" Type="PHARM.PACKAGE_TYPE" Description="Вид упаковки" />
  </Fields>
  <DbMapping>
    <Table name="T_SCANNED_INVENTORY_ELEMENTS">
      <Map Name="ScannedInventoryElementsID" Column="ScannedInventoryElementsID" />
      <Map Name="Sgtin" Column="Sgtin" />
      <Map Name="Remains" Column="Remains" />
      <Map Name="InventoryElements" Column="InventoryElements" />
      <Map Name="Barcode" Column="Barcode" />
      <Map Name="Type" Column="Type" />
      <Map Name="OrdinalNumber" Column="OrdinalNumber" />
      <Map Name="SupplierContractAbr" Column="SupplierContractAbr" />
      <Map Name="SupplierContract" Column="SupplierContract" />
      <Map Name="Amount" Column="Amount" />
      <Map Name="SpecifiedQuantity" Column="SpecifiedQuantity" />
      <Map Name="SpecifiedPackageType" Column="SpecifiedPackageType" />
    </Table>
  </DbMapping>
</Entity>