<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="STOR" 
Name="IMPORT_INVOICE" 
Description="Загрузка накладных" 
Inherits="STOR.IMPORT_ELEMENTS">
  <Fields>
    <Attribute Name="InvoiceId" Index="5410001" Type="GUID" Description="Идентификатор накладной" />
    <Attribute Name="InvoiceNumber" Index="5410002" Type="string" Description="Номер накладной" />
    <Attribute Name="InvoiceDate" Index="5410003" Type="date" Description="Дата накладной" />
    <Attribute Name="Amount" Index="5410008" Type="float" DefaultFormat="{0:F3}" Description="Количество" NumericPrecision="12" NumericScale="2" />
    <Attribute Name="LotNumber" Index="5410009" Type="int" Description="Партия" />
    <Attribute Name="Series" Index="5410010" Type="string" Description="Серия" CharacterMaximumLength="100" />
    <Attribute Name="Price" Index="5410011" Type="float" DefaultFormat="{0:F2}" Description="Цена" NumericPrecision="12" NumericScale="2" />
    <Attribute Name="Sum" Index="5410012" Type="float" DefaultFormat="{0:F2}" Description="Сумма" NumericPrecision="12" NumericScale="2" />
    <Attribute Name="ExpirationDate" Index="5410013" Type="date" Description="Срок годности" />
    <Attribute Name="Comment" Index="5410014" Type="string" Description="Комментарий" />
    <Parent Name="Storage" Index="5410005" Type="STOR.STORAGE" Description="Склад" />
    <Parent Name="Post" Index="5410007" Type="STOR.POST" Description="Должность" />
    <Parent Name="BillOfGoods" Index="5410017" Type="PHARM.BILL_OF_GOODS" Description="Номенклатура товаров" />
    <Parent Name="PackageType" Index="5410018" Type="PHARM.PACKAGE_TYPE" Description="Вид упаковки" />
    <Parent Name="SupplierContract" Index="5410019" Type="STOR.SUPPLIER_CONTRACT" Description="Договор от поставщика" />
    <Choice Name="VAT" Description="НДС">
      <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="gtin" Type="string" Description="gtin" CharacterMaximumLength="14" />
    <Attribute Name="sgtin" Type="string" Description="sgtin" CharacterMaximumLength="28" />
    <Parent Name="Sender" Type="STOR.STORAGE" Description="Склад отправителя" />
    <Attribute Name="ShipmentDate" Type="date" Description="Дата документа отгрузки" />
    <Attribute Name="ShipmentDocumentNumber" Type="string" Description="Номер документа отгрузки" CharacterMaximumLength="200" />
  </Fields>
  <DbMapping>
    <Table name="T_IMPORT_INVOICE">
      <Map Name="InvoiceId" Column="InvoiceId" />
      <Map Name="InvoiceNumber" Column="InvoiceNumber" />
      <Map Name="InvoiceDate" Column="InvoiceDate" />
      <Map Name="Amount" Column="Amount" />
      <Map Name="LotNumber" Column="LotNumber" />
      <Map Name="Series" Column="Series" />
      <Map Name="Price" Column="Price" />
      <Map Name="Sum" Column="Sum" />
      <Map Name="ExpirationDate" Column="ExpirationDate" />
      <Map Name="Comment" Column="Comment" />
      <Map Name="Storage" Column="Storage" />
      <Map Name="Post" Column="Post" />
      <Map Name="BillOfGoods" Column="BillOfGoods" />
      <Map Name="PackageType" Column="PackageType" />
      <Map Name="SupplierContract" Column="SupplierContract" />
      <Map Name="VAT" Column="VAT" />
      <Map Name="gtin" Column="gtin" />
      <Map Name="sgtin" Column="sgtin" />
      <Map Name="Sender" Column="Sender" />
      <Map Name="ShipmentDate" Column="ShipmentDate" />
      <Map Name="ShipmentDocumentNumber" Column="ShipmentDocumentNumber" />
    </Table>
  </DbMapping>
</Entity>