USE [WPCARHIV]
GO
/****** Object:  Table [dbo].[DNprostoritve]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DNprostoritve](
	[Opisnar] [ntext] NULL,
	[OpisDela] [ntext] NULL,
	[Opombe] [ntext] NULL,
	[klavzula] [ntext] NULL,
	[nalog] [nvarchar](12) NOT NULL,
	[Konos] [nvarchar](200) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaDNprostoritve_PK] PRIMARY KEY NONCLUSTERED 
(
	[nalog] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[DnproEtikete]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DnproEtikete](
	[Etiketa] [nvarchar](15) NOT NULL,
	[Stroj] [nvarchar](50) NULL,
	[Barve] [nvarchar](90) NULL,
	[Opomba] [nvarchar](255) NULL,
	[Stanca] [nvarchar](15) NULL,
	[Kosov] [int] NULL,
	[Sirina] [float] NULL,
	[Premerjedra] [float] NULL,
	[MaxPremer] [float] NULL,
	[StevVzorcev] [int] NULL,
	[Zaponatis] [int] NULL,
	[Navitje1] [nvarchar](50) NULL,
	[Navitje2] [nvarchar](50) NULL,
	[nalog] [nvarchar](12) NOT NULL,
	[pak1] [bit] NOT NULL CONSTRAINT [DF__DnproEtike__pak1__1FCDBCEB]  DEFAULT ((0)),
	[pak2] [bit] NOT NULL CONSTRAINT [DF__DnproEtike__pak2__20C1E124]  DEFAULT ((0)),
	[pak3] [bit] NOT NULL CONSTRAINT [DF__DnproEtike__pak3__21B6055D]  DEFAULT ((0)),
	[PakUR] [money] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaDnproEtikete_PK] PRIMARY KEY NONCLUSTERED 
(
	[nalog] ASC,
	[Etiketa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Dnpronormativi]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dnpronormativi](
	[IDPAKETA] [nvarchar](15) NULL,
	[IDARTIKLA] [nvarchar](15) NOT NULL,
	[KOLICINA] [float] NULL,
	[SERIJA] [int] NULL,
	[CENA] [money] NULL,
	[SKL] [nvarchar](3) NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[OP] [nvarchar](50) NULL,
	[KOLICINAS] [float] NULL,
	[Nalog] [nvarchar](12) NOT NULL,
	[Rabat] [money] NULL,
	[Pozizd] [int] NULL,
	[Stevizd] [int] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaDnpronormativi_PK] PRIMARY KEY NONCLUSTERED 
(
	[Nalog] ASC,
	[POZICIJA] ASC,
	[IDARTIKLA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDARTIKLA] ON [dbo].[Dnpronormativi] 
(
	[IDARTIKLA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDPAKETA] ON [dbo].[Dnpronormativi] 
(
	[IDPAKETA] ASC,
	[IDARTIKLA] ASC,
	[Nalog] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Dnprooperacije]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dnprooperacije](
	[IDPAKETA] [nvarchar](15) NOT NULL,
	[OP] [nvarchar](50) NULL,
	[NORMAUR] [float] NULL,
	[PRETOCNOUR] [float] NULL,
	[CENA] [money] NULL,
	[SERIJA] [int] NULL,
	[DM] [nvarchar](15) NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[naziv] [nvarchar](250) NULL,
	[opis] [ntext] NULL,
	[Nalog] [nvarchar](12) NOT NULL,
	[delavec] [nvarchar](15) NULL,
	[cenaP] [money] NULL,
	[tocka] [money] NULL,
	[Datum] [datetime] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaDnprooperacije_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDPAKETA] ASC,
	[Nalog] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [nalog] ON [dbo].[Dnprooperacije] 
(
	[Nalog] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Dnpropribitki]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dnpropribitki](
	[IDPAKETA] [nvarchar](15) NOT NULL,
	[SIFRA] [nvarchar](15) NULL,
	[TIP] [nvarchar](15) NULL,
	[OSNOVA] [nvarchar](15) NULL,
	[PROCENT] [float] NULL,
	[ZNESEK] [money] NULL,
	[ZNFAKTOR] [float] NULL,
	[ZNEM] [nvarchar](12) NULL,
	[SERIJA] [int] NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[OPIS] [nvarchar](250) NULL,
	[Nalog] [nvarchar](12) NOT NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaDnpropribitki_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDPAKETA] ASC,
	[Nalog] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [nalog] ON [dbo].[Dnpropribitki] 
(
	[Nalog] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[EDIEan]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EDIEan](
	[EAN] [nvarchar](35) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
	[Ident] [nvarchar](15) NULL,
 CONSTRAINT [aaaaaEDIEan_PK] PRIMARY KEY NONCLUSTERED 
(
	[EAN] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Ident] ON [dbo].[EDIEan] 
(
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[EDIOsnovaN]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EDIOsnovaN](
	[ST_IZMENJA] [nvarchar](14) NULL,
	[EAN_LOK_ME] [nvarchar](35) NOT NULL,
	[ST_DOKUMEN] [nvarchar](35) NOT NULL,
	[ZAP_ST_NAR] [nvarchar](14) NULL,
	[FUNK_DOK] [nvarchar](3) NULL,
	[DAT_CAS_N] [datetime] NULL,
	[DAT_CAS_D] [datetime] NULL,
	[EAN_KUP] [nvarchar](35) NULL,
	[NAZ_KUP] [nvarchar](35) NULL,
	[EAN_MD] [nvarchar](35) NULL,
	[NAZ_MD] [nvarchar](35) NULL,
	[EAN_OE_D] [nvarchar](35) NULL,
	[NAZ_OE_D] [nvarchar](50) NULL,
	[STEV_POST] [int] NULL,
	[OPOMBA] [nvarchar](70) NULL,
	[ST_PROM] [nvarchar](35) NULL,
	[EAN_NAR] [nvarchar](35) NULL,
	[NAZ_NAR] [nvarchar](35) NULL,
	[NAC_DOST] [nvarchar](3) NULL,
	[EAN_SF] [nvarchar](35) NULL,
	[NAZ_SF] [nvarchar](35) NULL,
	[TIP_NAR] [nvarchar](3) NULL,
 CONSTRAINT [aaaaaEDIOsnovaN_PK] PRIMARY KEY NONCLUSTERED 
(
	[EAN_LOK_ME] ASC,
	[ST_DOKUMEN] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[EDIPostavkeN]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EDIPostavkeN](
	[ST_IZMENJA] [nvarchar](14) NULL,
	[EAN_LOK_ME] [nvarchar](35) NOT NULL,
	[ST_DOKUMEN] [nvarchar](35) NOT NULL,
	[ZAP_ST_POS] [int] NOT NULL,
	[EAN_UPC_A] [nvarchar](35) NULL,
	[V_ST_KODE] [nvarchar](3) NULL,
	[D_ID_ART] [nvarchar](3) NULL,
	[DOB_SIF_A] [nvarchar](35) NULL,
	[INT_SIF_A] [nvarchar](35) NULL,
	[NAZ_ART_1] [nvarchar](35) NULL,
	[NAZ_ART_2] [nvarchar](35) NULL,
	[KOLICINA] [decimal](15, 0) NULL,
	[E_MERE] [nvarchar](3) NULL,
	[DAT_UPORA] [datetime] NULL,
	[CENA_ART] [money] NULL,
	[OPOMBA] [nvarchar](70) NULL,
	[PAK_ZAH1] [nvarchar](3) NULL,
	[PAK_ZAH2] [nvarchar](3) NULL,
	[PAK_ZAH3] [nvarchar](3) NULL,
	[DOD_SIF_A1] [nvarchar](35) NULL,
	[DOD_SIF_A2] [nvarchar](35) NULL,
	[CENA2_OZN] [money] NULL CONSTRAINT [DF__EDIPostav__CENA2__060DEAE8]  DEFAULT ((0)),
	[CENA2_OSN] [money] NULL CONSTRAINT [DF__EDIPostav__CENA2__07020F21]  DEFAULT ((0)),
	[CENA2_MER] [nvarchar](3) NULL,
	[CENA3] [money] NULL CONSTRAINT [DF__EDIPostav__CENA3__07F6335A]  DEFAULT ((0)),
	[DAVEK] [nvarchar](6) NULL,
 CONSTRAINT [aaaaaEDIPostavkeN_PK] PRIMARY KEY NONCLUSTERED 
(
	[EAN_LOK_ME] ASC,
	[ST_DOKUMEN] ASC,
	[ZAP_ST_POS] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Embalaze]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Embalaze](
	[Sifra] [nvarchar](12) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Cena] [money] NULL,
 CONSTRAINT [aaaaaEmbalaze_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Gladok]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Gladok](
	[Sifradok] [nvarchar](3) NOT NULL,
	[Stevdok] [int] NOT NULL,
	[Kljuc] [int] IDENTITY(1,1) NOT NULL,
	[Skl] [nvarchar](3) NULL,
	[Datumdok] [datetime] NULL,
	[Datumknj] [datetime] NULL,
	[Idepa] [nvarchar](8) NULL,
	[Prevoznik] [nvarchar](8) NULL,
	[Kupec] [nvarchar](120) NULL,
	[Status] [nvarchar](1) NULL,
	[Poraba] [nvarchar](2) NULL,
	[Uporabnik] [nvarchar](12) NULL,
	[Narocilo] [nvarchar](24) NULL,
	[nalog] [nvarchar](12) NULL,
	[Valuta] [nvarchar](3) NULL,
	[Tecaj] [money] NULL,
	[Racun] [nvarchar](12) NULL,
	[VrednostN] [money] NULL,
	[Vrednostvp] [money] NULL,
	[VrednostMP] [money] NULL,
	[Postavke] [bit] NOT NULL CONSTRAINT [DF__Gladok__Postavke__3E52440B]  DEFAULT ((0)),
	[Klavzula] [ntext] NULL,
	[Vstevdok] [int] NULL,
	[Vsifradok] [nvarchar](50) NULL,
	[Vstorno] [bit] NOT NULL CONSTRAINT [DF__Gladok__Vstorno__3F466844]  DEFAULT ((0)),
	[Vskl] [nvarchar](3) NULL,
	[Davcna] [nvarchar](25) NULL,
	[Miza] [smallint] NULL,
	[oddelek] [nvarchar](250) NULL,
	[Intra_porocanje] [bit] NOT NULL CONSTRAINT [DF__Gladok__Intra_po__403A8C7D]  DEFAULT ((0)),
	[Intra_faktvr] [money] NULL,
	[Intra_statvr] [money] NULL,
	[Intra_drzavaN] [nvarchar](2) NULL,
	[Intra_drzavaP] [nvarchar](2) NULL,
	[Intra_Pogoji] [nvarchar](3) NULL,
	[Intra_Lega] [nvarchar](1) NULL,
	[Intra_VrstaPosla] [nvarchar](2) NULL,
	[Intra_Prevoz] [nvarchar](1) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaGladok_PK] PRIMARY KEY CLUSTERED 
(
	[Sifradok] ASC,
	[Stevdok] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Kljuc] ON [dbo].[Gladok] 
(
	[Kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Miza] ON [dbo].[Gladok] 
(
	[Miza] ASC,
	[Sifradok] ASC,
	[Datumdok] ASC,
	[Status] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[IDembalaze]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IDembalaze](
	[Ident] [nvarchar](15) NOT NULL,
	[SifraE] [nvarchar](12) NOT NULL,
	[Teza] [money] NULL,
	[Cena] [money] NULL,
 CONSTRAINT [aaaaaIDembalaze_PK] PRIMARY KEY NONCLUSTERED 
(
	[Ident] ASC,
	[SifraE] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[INTRAglave]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INTRAglave](
	[ZaporednaStevilka] [nvarchar](6) NULL,
	[VrstaStavka] [nvarchar](3) NULL,
	[ZaporednaStevilkaObrazca] [nvarchar](6) NULL,
	[ZaporednaStevilkaPostavke] [nvarchar](3) NULL,
	[PO] [nvarchar](1) NULL,
	[EvidencnaStevilka] [nvarchar](20) NOT NULL,
	[OznakaDrzavePE] [nvarchar](2) NULL,
	[DavcnaPE] [nvarchar](8) NULL,
	[OEPE] [nvarchar](3) NULL,
	[ObdobjePorocanja] [nvarchar](6) NULL,
	[SteviloPostavk] [nvarchar](3) NULL,
	[ZadnjiDok] [nvarchar](1) NULL,
	[Oznakadrzave] [nvarchar](2) NULL,
	[DavcnaDeklaranta] [nvarchar](12) NULL,
	[OEdeklaranta] [nvarchar](3) NULL,
	[VlogaDokumenta] [nvarchar](1) NULL,
	[Valuta] [nvarchar](3) NULL,
	[Polnilo] [nvarchar](67) NULL,
	[Posilka] [nvarchar](10) NULL,
 CONSTRAINT [aaaaaINTRAglave_PK] PRIMARY KEY NONCLUSTERED 
(
	[EvidencnaStevilka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Posilka] ON [dbo].[INTRAglave] 
(
	[Posilka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[INTRAkonst]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INTRAkonst](
	[Davcna] [nvarchar](12) NOT NULL,
	[OE] [nvarchar](3) NOT NULL,
	[Deklarant_davcna] [nvarchar](12) NULL,
	[Deklarant_OE] [nvarchar](3) NULL,
	[Drzava] [nvarchar](2) NULL,
	[Pogoji] [nvarchar](3) NULL,
	[Pogoj2] [nvarchar](1) NULL,
	[VP1] [nvarchar](2) NULL,
	[VP2] [nvarchar](1) NULL,
	[Transport] [nvarchar](1) NULL,
	[DavcnaCarine] [nvarchar](12) NULL,
	[OEcarine] [nvarchar](3) NULL,
	[VP] [nvarchar](2) NULL,
	[DrzavaP] [nvarchar](2) NULL,
 CONSTRAINT [aaaaaINTRAkonst_PK] PRIMARY KEY NONCLUSTERED 
(
	[Davcna] ASC,
	[OE] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[INTRApostavke]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INTRApostavke](
	[ZaporednaStevilka] [nvarchar](6) NULL,
	[VrstaStavka] [nvarchar](3) NULL,
	[ZaporednaStevilkaObrazca] [nvarchar](6) NULL,
	[ZaporednaStevilkaPostavke] [nvarchar](3) NOT NULL,
	[PO] [nvarchar](1) NULL,
	[EvidencnaStevilka] [nvarchar](20) NOT NULL,
	[DrzavaNamena] [nvarchar](2) NULL,
	[PogojiDobave] [nvarchar](3) NULL,
	[PogojiDobave2_LEGA] [nvarchar](1) NULL,
	[VrstaPosla] [nvarchar](2) NULL,
	[VrstaPosla2] [nvarchar](1) NULL,
	[VrstaTransporta] [nvarchar](1) NULL,
	[Tarifa] [nvarchar](8) NULL,
	[KNSI] [nvarchar](1) NULL,
	[DrzavaPorekla] [nvarchar](2) NULL,
	[NetoMasa] [float] NULL,
	[Kolicina] [float] NULL,
	[FakturnaVrednost] [money] NULL CONSTRAINT [DF__INTRApost__Faktu__108B795B]  DEFAULT ((0)),
	[StatisticnaVr] [money] NULL CONSTRAINT [DF__INTRApost__Stati__117F9D94]  DEFAULT ((0)),
	[Regija] [nvarchar](3) NULL,
	[Pristanisce] [nvarchar](1) NULL,
	[Polnilo] [nvarchar](27) NULL,
	[Opis] [nvarchar](50) NULL,
	[ident] [nvarchar](15) NULL,
	[Sifradok] [nvarchar](3) NULL,
	[Stevdok] [int] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaINTRApostavke_PK] PRIMARY KEY NONCLUSTERED 
(
	[EvidencnaStevilka] ASC,
	[ZaporednaStevilkaPostavke] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Tarifa] ON [dbo].[INTRApostavke] 
(
	[EvidencnaStevilka] ASC,
	[Tarifa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[INTRAvodilni]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INTRAvodilni](
	[ZaporednaStevilka] [nvarchar](6) NULL,
	[VrstaStavka] [nvarchar](3) NULL,
	[ZaporednaStevilkaObrazca] [nvarchar](6) NULL,
	[ZaporednaStevilkaPostavke] [nvarchar](3) NULL,
	[VrstaSporocila] [nvarchar](3) NULL,
	[Leto] [nvarchar](4) NOT NULL,
	[ZaporednaPosilka] [nvarchar](6) NOT NULL,
	[SteviloStavkov] [nvarchar](6) NULL,
	[SteviloDokumentov] [nvarchar](6) NULL,
	[SteviloPostavk] [nvarchar](6) NULL,
	[OznakaDrzave] [nvarchar](2) NULL,
	[DavcnaStevilka] [nvarchar](12) NULL,
	[OE] [nvarchar](3) NULL,
	[OznakaNaslovnika] [nvarchar](2) NULL,
	[DavcnaNaslovnika] [nvarchar](8) NULL,
	[OENaslovnika] [nvarchar](3) NULL,
	[Datumsporocila] [nvarchar](8) NULL,
	[CasSporocila] [nvarchar](6) NULL,
	[Verzija] [nvarchar](1) NULL,
	[Zastavice] [nvarchar](15) NULL,
	[Polnilo] [nvarchar](41) NULL,
	[Datumknj] [datetime] NULL,
 CONSTRAINT [aaaaaINTRAvodilni_PK] PRIMARY KEY NONCLUSTERED 
(
	[Leto] ASC,
	[ZaporednaPosilka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[IntraDrzave]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IntraDrzave](
	[Oznaka] [nvarchar](3) NOT NULL,
	[Ime] [nvarchar](30) NULL,
 CONSTRAINT [aaaaaIntraDrzave_PK] PRIMARY KEY NONCLUSTERED 
(
	[Oznaka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[IntraLega]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IntraLega](
	[Oznaka] [nvarchar](1) NOT NULL,
	[Opis] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaIntraLega_PK] PRIMARY KEY NONCLUSTERED 
(
	[Oznaka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[IntraPogoji]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IntraPogoji](
	[Oznaka] [nvarchar](3) NOT NULL,
	[Pomen] [nvarchar](50) NULL,
	[Opis] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaIntraPogoji_PK] PRIMARY KEY NONCLUSTERED 
(
	[Oznaka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[IntraTransport]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IntraTransport](
	[Oznaka] [nvarchar](1) NOT NULL,
	[Opis] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaIntraTransport_PK] PRIMARY KEY NONCLUSTERED 
(
	[Oznaka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Kupcenik]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Kupcenik](
	[Idepa] [nvarchar](8) NOT NULL,
	[Ident] [nvarchar](15) NOT NULL,
	[Klas] [nvarchar](12) NULL,
	[Vpcena] [money] NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[DK] [nvarchar](2) NULL,
	[Mpcena] [money] NULL,
	[Valcena] [money] NULL CONSTRAINT [DF__Kupcenik__Valcen__5441852A]  DEFAULT ((0)),
	[Valuta] [nvarchar](50) NULL,
	[Koda] [nvarchar](15) NULL,
	[Naziv] [nvarchar](50) NULL,
	[Strm] [nvarchar](12) NULL,
	[faktorkol] [float] NULL,
	[faktorcene] [float] NULL,
 CONSTRAINT [aaaaaKupcenik_PK] PRIMARY KEY NONCLUSTERED 
(
	[Idepa] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Kupstrm]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Kupstrm](
	[Idepa] [nvarchar](8) NOT NULL,
	[Ident] [nvarchar](15) NOT NULL,
	[Klas] [nvarchar](12) NULL,
	[Vpcena] [money] NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[DK] [nvarchar](2) NULL,
	[Mpcena] [money] NULL,
	[Valcena] [money] NULL CONSTRAINT [DF__Kupstrm__Valcena__5FB337D6]  DEFAULT ((0)),
	[Valuta] [nvarchar](50) NULL,
	[Prevoznik] [nvarchar](8) NOT NULL,
	[SKl] [nvarchar](3) NULL,
	[Strm] [nvarchar](12) NULL,
	[Naziv] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaKupstrm_PK] PRIMARY KEY NONCLUSTERED 
(
	[Idepa] ASC,
	[Ident] ASC,
	[Prevoznik] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[LCD]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LCD](
	[ident] [int] IDENTITY(1,1) NOT NULL,
	[OZNAKA] [nvarchar](10) NULL,
	[OPIS] [nvarchar](50) NULL,
	[A] [nvarchar](15) NULL,
	[B] [nvarchar](15) NULL,
	[T1A] [nvarchar](20) NULL,
	[T1B] [nvarchar](20) NULL,
	[T2A] [nvarchar](20) NULL,
	[T2B] [nvarchar](20) NULL,
	[T3A] [nvarchar](20) NULL,
	[T3B] [nvarchar](20) NULL,
	[T4A] [nvarchar](20) NULL,
	[T4B] [nvarchar](20) NULL,
	[PORT] [nvarchar](4) NULL
) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [ident] ON [dbo].[LCD] 
(
	[ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Lokacije]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Lokacije](
	[Lokacija] [nvarchar](25) NOT NULL,
	[Opis] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaLokacije_PK] PRIMARY KEY NONCLUSTERED 
(
	[Lokacija] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[NORMATIVI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[NORMATIVI](
	[IDPAKETA] [nvarchar](15) NULL,
	[IDARTIKLA] [nvarchar](15) NULL,
	[KOLICINA] [float] NULL,
	[CENA] [money] NULL,
	[DELEZCENE] [float] NULL,
	[POZICIJA] [int] NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaNORMATIVI_PK] PRIMARY KEY NONCLUSTERED 
(
	[kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDARTIKLA] ON [dbo].[NORMATIVI] 
(
	[IDARTIKLA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDPAKETA] ON [dbo].[NORMATIVI] 
(
	[IDPAKETA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Nabave]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Nabave](
	[Sifra] [nvarchar](2) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](2) NULL CONSTRAINT [DF__Nabave__Tip__07C12930]  DEFAULT ('VP'),
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL,
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[SKl] [nvarchar](3) NULL,
	[Tipkalk] [smallint] NULL CONSTRAINT [DF__Nabave__Tipkalk__08B54D69]  DEFAULT ((4)),
	[VPZ] [smallint] NULL CONSTRAINT [DF__Nabave__VPZ__09A971A2]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__Nabave__MPZ__0A9D95DB]  DEFAULT ((2)),
	[Serstev] [bit] NOT NULL CONSTRAINT [DF__Nabave__Serstev__0B91BA14]  DEFAULT ((0)),
	[Klavzula] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaNabave_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Nargladok]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Nargladok](
	[Sifradok] [nvarchar](3) NOT NULL,
	[Stevdok] [int] NOT NULL,
	[Kljuc] [int] IDENTITY(1,1) NOT NULL,
	[Skl] [nvarchar](3) NULL,
	[Datumdok] [datetime] NULL,
	[Datumknj] [datetime] NULL,
	[Idepa] [nvarchar](8) NULL,
	[Prevoznik] [nvarchar](8) NULL,
	[Kupec] [nvarchar](120) NULL,
	[Status] [nvarchar](1) NULL,
	[Poraba] [nvarchar](2) NULL,
	[Uporabnik] [nvarchar](12) NULL,
	[Narocilo] [nvarchar](24) NULL,
	[nalog] [nvarchar](12) NULL,
	[Valuta] [nvarchar](3) NULL,
	[Tecaj] [money] NULL CONSTRAINT [DF__Nargladok__Tecaj__1BC821DD]  DEFAULT ((0)),
	[Racun] [nvarchar](12) NULL,
	[VrednostN] [money] NULL CONSTRAINT [DF__Nargladok__Vredn__1CBC4616]  DEFAULT ((0)),
	[Vrednostvp] [money] NULL CONSTRAINT [DF__Nargladok__Vredn__1DB06A4F]  DEFAULT ((0)),
	[VrednostMP] [money] NULL CONSTRAINT [DF__Nargladok__Vredn__1EA48E88]  DEFAULT ((0)),
	[Postavke] [bit] NOT NULL CONSTRAINT [DF__Nargladok__Posta__1F98B2C1]  DEFAULT ((0)),
	[Klavzula] [ntext] NULL,
	[Vstevdok] [int] NULL,
	[Vsifradok] [nvarchar](50) NULL,
	[Vstorno] [bit] NOT NULL CONSTRAINT [DF__Nargladok__Vstor__208CD6FA]  DEFAULT ((0)),
	[Vskl] [nvarchar](3) NULL,
	[Davcna] [nvarchar](8) NULL,
	[Miza] [smallint] NULL CONSTRAINT [DF__Nargladok__Miza__2180FB33]  DEFAULT ((0)),
	[Datumrok] [datetime] NULL,
	[Opomba] [nvarchar](255) NULL,
	[Konos] [nvarchar](255) NULL,
	[Datump] [datetime] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaNargladok_PK] PRIMARY KEY CLUSTERED 
(
	[Sifradok] ASC,
	[Stevdok] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Kljuc] ON [dbo].[Nargladok] 
(
	[Kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Miza] ON [dbo].[Nargladok] 
(
	[Miza] ASC,
	[Sifradok] ASC,
	[Datumdok] ASC,
	[Status] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Narpromet]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Narpromet](
	[Ident] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](250) NULL,
	[Skl] [nvarchar](3) NULL,
	[Datumdok] [datetime] NULL,
	[Sifradok] [nvarchar](3) NOT NULL,
	[Stevdok] [int] NOT NULL,
	[Pozicija] [smallint] NOT NULL,
	[Kolicina] [money] NULL CONSTRAINT [DF__Narpromet__Kolic__55009F39]  DEFAULT ((0)),
	[Vrstaprom] [nvarchar](1) NULL,
	[status] [nvarchar](1) NULL CONSTRAINT [DF__Narpromet__statu__55F4C372]  DEFAULT ('S'),
	[Opomba] [nvarchar](30) NULL,
	[Fakcena] [money] NULL CONSTRAINT [DF__Narpromet__Fakce__56E8E7AB]  DEFAULT ((0)),
	[Dobcena] [money] NULL,
	[Dobddv] [money] NULL,
	[dobFaktor] [float] NULL,
	[Odvisni] [money] NULL,
	[odvproc] [money] NULL,
	[Cena] [money] NULL,
	[Vpcena] [float] NULL,
	[Mposnova] [float] NULL,
	[Mpcena] [float] NULL,
	[Provizija] [money] NULL,
	[Nalog] [nvarchar](12) NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[Serstev] [nvarchar](15) NULL,
	[Valcena] [float] NULL,
	[Em] [nvarchar](3) NULL,
	[fifocena] [money] NULL,
	[popcena] [money] NULL,
	[Mpzalcena] [money] NULL,
	[Mpniv] [money] NULL,
	[Kumkol] [money] NULL,
	[Normpoz] [int] NOT NULL CONSTRAINT [DF__Narpromet__Normp__57DD0BE4]  DEFAULT ((0)),
	[Davekproc] [money] NULL CONSTRAINT [DF__Narpromet__Davek__58D1301D]  DEFAULT ((0)),
	[Datumrok] [datetime] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaNarpromet_PK] PRIMARY KEY CLUSTERED 
(
	[Sifradok] ASC,
	[Stevdok] ASC,
	[Pozicija] ASC,
	[Normpoz] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Datumdok] ON [dbo].[Narpromet] 
(
	[Datumdok] ASC,
	[Skl] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Ident] ON [dbo].[Narpromet] 
(
	[Skl] ASC,
	[Ident] ASC,
	[Datumdok] ASC,
	[Vrstaprom] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[OpomnikiDEF]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OpomnikiDEF](
	[Ident] [nvarchar](15) NULL,
	[Naziv] [nvarchar](50) NULL,
	[Tip] [nvarchar](10) NULL,
	[Idepa] [nvarchar](10) NULL,
	[Datumod] [datetime] NULL,
	[Interval] [nvarchar](2) NULL,
	[Ponovitev] [int] NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[opis] [nvarchar](250) NULL,
	[Ninterval] [float] NULL,
 CONSTRAINT [aaaaaOpomnikiDEF_PK] PRIMARY KEY NONCLUSTERED 
(
	[kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Ident] ON [dbo].[OpomnikiDEF] 
(
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Idepa] ON [dbo].[OpomnikiDEF] 
(
	[Idepa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[OpomnikiP]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OpomnikiP](
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[datumop] [nvarchar](25) NULL,
	[opombe] [nvarchar](150) NULL,
	[racun] [nvarchar](25) NOT NULL,
 CONSTRAINT [aaaaaOpomnikiP_PK] PRIMARY KEY NONCLUSTERED 
(
	[kljuc] ASC,
	[racun] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Optima]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Optima](
	[Blagajna] [nvarchar](2) NOT NULL,
	[SKl] [nvarchar](3) NULL,
	[Comport] [nvarchar](1) NULL,
	[Modem] [bit] NOT NULL CONSTRAINT [DF__Optima__Modem__571DF1D5]  DEFAULT ((0)),
	[Telefon] [nvarchar](24) NULL,
	[Datumv] [datetime] NULL,
	[Datumiz] [datetime] NULL,
	[VP] [nvarchar](2) NULL,
	[Zadnja] [int] NULL CONSTRAINT [DF__Optima__Zadnja__5812160E]  DEFAULT ((0)),
	[Tip] [nvarchar](3) NULL,
	[R1] [nvarchar](50) NULL,
	[r2] [nvarchar](50) NULL,
	[R3] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaOptima_PK] PRIMARY KEY NONCLUSTERED 
(
	[Blagajna] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PLACILA]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PLACILA](
	[SIFRADOK] [nvarchar](3) NULL,
	[STEVDOK] [int] NULL,
	[SIFPLACILA] [nvarchar](6) NULL,
	[ZNESEK] [float] NULL,
	[opis] [nvarchar](50) NULL,
	[datumdok] [datetime] NULL,
	[status] [nvarchar](1) NULL,
	[placilaproc] [int] NULL,
	[IDEPA] [nvarchar](8) NULL,
	[VALUTA] [datetime] NULL,
	[VVNOVCITEV] [datetime] NULL,
	[REALIZIRAN] [nvarchar](50) NULL
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDEPA] ON [dbo].[PLACILA] 
(
	[IDEPA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PRODM]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PRODM](
	[DM] [nvarchar](15) NOT NULL,
	[OPIS] [nvarchar](50) NULL,
	[CENA] [money] NULL,
	[STRM] [nvarchar](50) NULL,
	[CENAP] [money] NULL,
	[CENAN] [money] NULL,
 CONSTRAINT [aaaaaPRODM_PK] PRIMARY KEY NONCLUSTERED 
(
	[DM] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROEtikete]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROEtikete](
	[Etiketa] [nvarchar](15) NOT NULL,
	[Stroj] [nvarchar](50) NULL,
	[Barve] [nvarchar](90) NULL,
	[Opomba] [nvarchar](255) NULL,
	[Stanca] [nvarchar](15) NULL,
	[Kosov] [int] NULL,
	[Sirina] [float] NULL,
	[Premerjedra] [float] NULL,
	[MaxPremer] [float] NULL,
	[StevVzorcev] [int] NULL,
	[Zaponatis] [int] NULL,
	[Navitje1] [nvarchar](50) NULL,
	[Navitje2] [nvarchar](50) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROEtikete_PK] PRIMARY KEY NONCLUSTERED 
(
	[Etiketa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PRONORMATIVI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PRONORMATIVI](
	[IDPAKETA] [nvarchar](15) NOT NULL,
	[IDARTIKLA] [nvarchar](15) NOT NULL,
	[KOLICINA] [float] NULL,
	[SERIJA] [int] NULL,
	[CENA] [money] NULL,
	[SKL] [nvarchar](3) NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[OP] [nvarchar](50) NULL,
	[PROCENT] [money] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPRONORMATIVI_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDPAKETA] ASC,
	[IDARTIKLA] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDARTIKLA] ON [dbo].[PRONORMATIVI] 
(
	[IDARTIKLA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROOPERACIJE]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROOPERACIJE](
	[IDPAKETA] [nvarchar](15) NOT NULL,
	[OP] [nvarchar](50) NOT NULL,
	[NORMAUR] [float] NULL,
	[PRETOCNOUR] [float] NULL,
	[CENA] [money] NULL,
	[SERIJA] [int] NULL,
	[DM] [nvarchar](15) NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[naziv] [nvarchar](250) NULL,
	[opis] [ntext] NULL,
	[tocka] [money] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROOPERACIJE_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDPAKETA] ASC,
	[POZICIJA] ASC,
	[OP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROPRIBITKI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROPRIBITKI](
	[IDPAKETA] [nvarchar](15) NOT NULL,
	[SIFRA] [nvarchar](15) NULL,
	[TIP] [nvarchar](15) NOT NULL,
	[OSNOVA] [nvarchar](15) NULL,
	[PROCENT] [float] NULL,
	[ZNESEK] [money] NULL,
	[ZNFAKTOR] [float] NULL,
	[ZNEM] [nvarchar](12) NULL,
	[SERIJA] [int] NULL,
	[STRM] [nvarchar](12) NULL,
	[POZICIJA] [int] NOT NULL,
	[kljuc] [int] IDENTITY(1,1) NOT NULL,
	[OPIS] [nvarchar](250) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROPRIBITKI_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDPAKETA] ASC,
	[TIP] ASC,
	[POZICIJA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROSIFOP]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROSIFOP](
	[OP] [nvarchar](50) NOT NULL,
	[NORMAUR] [float] NULL,
	[PRETOCNOUR] [float] NULL,
	[CENA] [money] NULL,
	[DM] [nvarchar](15) NULL,
	[STRM] [nvarchar](12) NULL,
	[naziv] [nvarchar](250) NULL,
	[opis] [ntext] NULL,
	[tocka] [money] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROSIFOP_PK] PRIMARY KEY NONCLUSTERED 
(
	[OP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROSIFPRIB]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROSIFPRIB](
	[SIFRA] [nvarchar](15) NOT NULL,
	[TIP] [nvarchar](15) NULL,
	[OSNOVA] [nvarchar](15) NULL,
	[PROCENT] [float] NULL,
	[ZNESEK] [money] NULL,
	[ZNFAKTOR] [float] NULL,
	[ZNEM] [nvarchar](12) NULL,
	[STRM] [nvarchar](12) NULL,
	[OPIS] [nvarchar](250) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROSIFPRIB_PK] PRIMARY KEY NONCLUSTERED 
(
	[SIFRA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROTIPNAL]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROTIPNAL](
	[Sifra] [nvarchar](6) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](3) NULL,
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL,
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[Skl] [nvarchar](3) NULL,
	[tipkalk] [smallint] NULL CONSTRAINT [DF__PROTIPNAL__tipka__32AB8735]  DEFAULT ((1)),
	[VPZ] [smallint] NULL CONSTRAINT [DF__PROTIPNAL__VPZ__339FAB6E]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__PROTIPNAL__MPZ__3493CFA7]  DEFAULT ((2)),
	[Serstev] [bit] NOT NULL CONSTRAINT [DF__PROTIPNAL__Serst__3587F3E0]  DEFAULT ((0)),
	[Ratip] [nvarchar](2) NULL,
	[Klavzula] [nvarchar](50) NULL,
	[Popust] [money] NULL,
	[SklMAT] [nvarchar](3) NULL,
	[IZDtip] [nvarchar](2) NULL,
 CONSTRAINT [aaaaaPROTIPNAL_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROstance]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROstance](
	[IDstance] [nvarchar](15) NOT NULL,
	[narocnik] [nvarchar](50) NULL,
	[posebnost] [nvarchar](255) NULL,
	[visina_trak] [float] NULL,
	[dolzina_tek] [float] NULL,
	[povisini] [float] NULL,
	[poteku] [float] NULL,
	[raz_vis] [float] NULL,
	[raz_dol] [float] NULL,
	[zaoblj] [float] NULL,
	[datoteka] [nvarchar](255) NULL,
	[datum] [datetime] NULL,
	[mat_izs] [nvarchar](50) NULL,
	[inch N] [nvarchar](15) NULL,
	[inch R] [nvarchar](15) NULL,
	[Opombe] [nvarchar](255) NULL,
	[Dolzina_pomika_N] [nvarchar](15) NULL,
	[Dolzina_pomika_R] [nvarchar](15) NULL,
	[Rotacija] [bit] NOT NULL CONSTRAINT [DF__PROstance__Rotac__41EDCAC5]  DEFAULT ((0)),
	[id] [int] IDENTITY(1,1) NOT NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPROstance_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDstance] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[PROstroji]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PROstroji](
	[Stroj] [nvarchar](150) NOT NULL,
	[OPIS] [nvarchar](250) NULL,
	[CENA] [money] NULL,
	[STRM] [nvarchar](12) NULL,
 CONSTRAINT [aaaaaPROstroji_PK] PRIMARY KEY NONCLUSTERED 
(
	[Stroj] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Predal]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Predal](
	[PORT] [nvarchar](4) NULL,
	[KODA] [nvarchar](10) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Promet]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Promet](
	[Ident] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](250) NULL,
	[Skl] [nvarchar](3) NULL,
	[Datumdok] [datetime] NULL,
	[Sifradok] [nvarchar](3) NOT NULL,
	[Stevdok] [int] NOT NULL,
	[Pozicija] [smallint] NOT NULL,
	[Kolicina] [money] NULL CONSTRAINT [DF__Promet__Kolicina__35BCFE0A]  DEFAULT ((0)),
	[Vrstaprom] [nvarchar](1) NULL,
	[status] [nvarchar](1) NULL CONSTRAINT [DF__Promet__status__36B12243]  DEFAULT ('S'),
	[Opomba] [nvarchar](30) NULL,
	[Fakcena] [money] NULL CONSTRAINT [DF__Promet__Fakcena__37A5467C]  DEFAULT ((0)),
	[Dobcena] [money] NULL,
	[Dobddv] [money] NULL,
	[dobFaktor] [float] NULL,
	[Odvisni] [money] NULL,
	[odvproc] [money] NULL,
	[Cena] [money] NULL,
	[Vpcena] [float] NULL,
	[Mposnova] [float] NULL,
	[Mpcena] [float] NULL,
	[Provizija] [money] NULL,
	[Nalog] [nvarchar](12) NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[Serstev] [nvarchar](15) NULL,
	[Valcena] [float] NULL,
	[Em] [nvarchar](3) NULL,
	[fifocena] [money] NULL,
	[popcena] [money] NULL,
	[Mpzalcena] [money] NULL,
	[Mpniv] [money] NULL,
	[Kumkol] [money] NULL,
	[Normpoz] [int] NOT NULL CONSTRAINT [DF__Promet__Normpoz__38996AB5]  DEFAULT ((0)),
	[Davekproc] [money] NULL CONSTRAINT [DF__Promet__Davekpro__398D8EEE]  DEFAULT ((0)),
	[Datump] [datetime] NULL,
	[Stevnar] [int] NULL,
	[Poznar] [smallint] NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaPromet_PK] PRIMARY KEY CLUSTERED 
(
	[Sifradok] ASC,
	[Stevdok] ASC,
	[Pozicija] ASC,
	[Normpoz] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Datumdok] ON [dbo].[Promet] 
(
	[Datumdok] ASC,
	[Skl] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Ident] ON [dbo].[Promet] 
(
	[Skl] ASC,
	[Ident] ASC,
	[Datumdok] ASC,
	[Vrstaprom] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Prt]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Prt](
	[ident] [int] IDENTITY(1,1) NOT NULL,
	[IME] [nvarchar](100) NULL,
	[OPIS] [nvarchar](100) NULL,
	[VRSTIC] [smallint] NULL,
	[KOLON] [smallint] NULL,
	[KODAVKLOP] [nvarchar](100) NULL,
	[KODAIZKLOP] [nvarchar](100) NULL,
	[IZBRAN] [bit] NOT NULL CONSTRAINT [DF__Prt__IZBRAN__17F790F9]  DEFAULT ((0)),
	[RDECE] [nvarchar](100) NULL,
	[CRNO] [nvarchar](100) NULL,
	[PORT] [nvarchar](5) NULL,
	[SLIPVKLOP] [nvarchar](100) NULL,
	[SLIPIZKLOP] [nvarchar](100) NULL,
	[KOPVKLOP] [nvarchar](100) NULL,
	[KOPIZKLOP] [nvarchar](100) NULL,
	[kodnastran] [nvarchar](5) NULL,
	[dostisk] [bit] NOT NULL CONSTRAINT [DF__Prt__dostisk__18EBB532]  DEFAULT ((0)),
	[predal] [nvarchar](100) NULL,
	[klavzula] [nvarchar](100) NULL
) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [ident] ON [dbo].[Prt] 
(
	[ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Racdavki]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Racdavki](
	[STrac] [nvarchar](12) NOT NULL,
	[Tarifa] [nvarchar](5) NOT NULL,
	[Procent] [money] NULL,
	[Znesek] [money] NULL,
	[Osnova] [money] NULL,
 CONSTRAINT [aaaaaRacdavki_PK] PRIMARY KEY NONCLUSTERED 
(
	[STrac] ASC,
	[Tarifa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Racdob]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Racdob](
	[Sifradok] [nvarchar](3) NULL,
	[Stevdok] [int] NULL,
	[Vr] [nvarchar](2) NULL,
	[Dobavitelj] [nvarchar](8) NULL,
	[Stevrac] [nvarchar](15) NULL,
	[Valznesek] [money] NULL,
	[Znesek] [money] NULL CONSTRAINT [DF__Racdob__Znesek__32E0915F]  DEFAULT ((0)),
	[Interna] [nvarchar](8) NULL,
	[Tip] [nvarchar](1) NULL,
	[Osnova] [nvarchar](1) NULL,
	[Valuta] [nvarchar](3) NULL,
	[Tecaj] [money] NULL,
	[Opis] [nvarchar](30) NULL
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Stevdok] ON [dbo].[Racdob] 
(
	[Sifradok] ASC,
	[Stevdok] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SERTIPI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SERTIPI](
	[TIP] [nvarchar](2) NOT NULL,
	[opis] [nvarchar](30) NULL,
	[zadnji] [nvarchar](15) NULL,
	[neto] [bit] NOT NULL CONSTRAINT [DF__SERTIPI__neto__7D439ABD]  DEFAULT ((1)),
	[bruto] [bit] NOT NULL CONSTRAINT [DF__SERTIPI__bruto__7E37BEF6]  DEFAULT ((0)),
	[tdol] [nvarchar](20) NULL CONSTRAINT [DF__SERTIPI__tdol__7F2BE32F]  DEFAULT ('Dol?ina:'),
	[tsir] [nvarchar](20) NULL CONSTRAINT [DF__SERTIPI__tsir__00200768]  DEFAULT ('?irina:'),
	[tdeb] [nvarchar](20) NULL CONSTRAINT [DF__SERTIPI__tdeb__01142BA1]  DEFAULT ('Debelina:'),
	[defdol] [float] NULL CONSTRAINT [DF__SERTIPI__defdol__02084FDA]  DEFAULT ((0)),
	[defdeb] [float] NULL CONSTRAINT [DF__SERTIPI__defdeb__02FC7413]  DEFAULT ((0)),
	[defsir] [float] NULL CONSTRAINT [DF__SERTIPI__defsir__03F0984C]  DEFAULT ((0)),
	[Faktor] [float] NULL CONSTRAINT [DF__SERTIPI__Faktor__04E4BC85]  DEFAULT ((1)),
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaSERTIPI_PK] PRIMARY KEY NONCLUSTERED 
(
	[TIP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SOLA_RAZREDI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SOLA_RAZREDI](
	[Razred] [nvarchar](6) NOT NULL,
	[naziv] [nvarchar](50) NULL,
	[razrednik] [nvarchar](50) NULL,
	[ucilnica] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaSOLA_RAZREDI_PK] PRIMARY KEY NONCLUSTERED 
(
	[Razred] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SOLA_UARTIKLI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SOLA_UARTIKLI](
	[Ucenec] [nvarchar](8) NOT NULL,
	[Ident] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
	[Kolicina] [money] NULL,
	[Cena] [money] NULL,
	[Tip] [nvarchar](10) NULL,
 CONSTRAINT [aaaaaSOLA_UARTIKLI_PK] PRIMARY KEY NONCLUSTERED 
(
	[Ucenec] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SOLA_UCENCI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SOLA_UCENCI](
	[Ucenec] [nvarchar](8) NOT NULL,
	[Ime] [nvarchar](50) NULL,
	[Priimek] [nvarchar](50) NULL,
	[razred] [nvarchar](6) NULL,
	[placnik] [nvarchar](8) NULL,
	[spol] [nvarchar](50) NULL,
	[rojen] [datetime] NULL,
	[aktiven] [nvarchar](2) NULL,
	[Stevrac] [nvarchar](15) NULL,
	[datumrac] [datetime] NULL,
 CONSTRAINT [aaaaaSOLA_UCENCI_PK] PRIMARY KEY NONCLUSTERED 
(
	[Ucenec] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [razred] ON [dbo].[SOLA_UCENCI] 
(
	[razred] ASC,
	[Ucenec] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SOLA_URARTIKLI]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SOLA_URARTIKLI](
	[Ucenec] [nvarchar](8) NOT NULL,
	[Ident] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
	[Kolicina] [money] NULL,
	[Cena] [money] NULL,
	[Tip] [nvarchar](10) NULL,
 CONSTRAINT [aaaaaSOLA_URARTIKLI_PK] PRIMARY KEY NONCLUSTERED 
(
	[Ucenec] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Serije]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Serije](
	[Kljuc] [int] IDENTITY(1,1) NOT NULL,
	[Serija] [nvarchar](15) NULL,
	[Skadenca] [datetime] NULL,
	[lokacija] [nvarchar](25) NULL,
	[Zaloga] [money] NULL CONSTRAINT [DF__Serije__Zaloga__5AEE82B9]  DEFAULT ((0)),
	[Ident] [nvarchar](15) NULL,
	[Skl] [nvarchar](3) NULL,
 CONSTRAINT [aaaaaSerije_PK] PRIMARY KEY NONCLUSTERED 
(
	[Kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Serija] ON [dbo].[Serije] 
(
	[Serija] ASC,
	[Ident] ASC,
	[Skl] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [skadenca] ON [dbo].[Serije] 
(
	[Ident] ASC,
	[Skadenca] ASC,
	[Skl] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Serstev]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Serstev](
	[serstev] [nvarchar](15) NULL,
	[ident] [nvarchar](15) NULL,
	[opis] [nvarchar](50) NULL,
	[kosov] [money] NULL CONSTRAINT [DF__Serstev__kosov__619B8048]  DEFAULT ((1)),
	[dolzina] [float] NULL CONSTRAINT [DF__Serstev__dolzina__628FA481]  DEFAULT ((0)),
	[sirina] [float] NULL CONSTRAINT [DF__Serstev__sirina__6383C8BA]  DEFAULT ((0)),
	[debelina] [float] NULL CONSTRAINT [DF__Serstev__debelin__6477ECF3]  DEFAULT ((0)),
	[m3] [float] NULL CONSTRAINT [DF__Serstev__m3__656C112C]  DEFAULT ((0)),
	[tip] [nvarchar](2) NULL,
	[dolzinaB] [float] NULL CONSTRAINT [DF__Serstev__dolzina__66603565]  DEFAULT ((0)),
	[sirinaB] [float] NULL CONSTRAINT [DF__Serstev__sirinaB__6754599E]  DEFAULT ((0)),
	[debelinaB] [float] NULL CONSTRAINT [DF__Serstev__debelin__68487DD7]  DEFAULT ((0)),
	[M3B] [float] NULL CONSTRAINT [DF__Serstev__M3B__693CA210]  DEFAULT ((0)),
	[Faktor] [float] NULL CONSTRAINT [DF__Serstev__Faktor__6A30C649]  DEFAULT ((1)),
	[status] [nvarchar](1) NULL,
	[dokdob] [int] NULL CONSTRAINT [DF__Serstev__dokdob__6B24EA82]  DEFAULT ((0)),
	[dokizd] [int] NULL CONSTRAINT [DF__Serstev__dokizd__6C190EBB]  DEFAULT ((0)),
	[upsize_ts] [timestamp] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Sifsklad]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sifsklad](
	[Skl] [nvarchar](3) NOT NULL,
	[Opis] [nvarchar](50) NULL,
	[tip] [nvarchar](2) NULL,
	[tipcene] [nvarchar](2) NULL,
	[ObolVSP] [nvarchar](7) NULL,
 CONSTRAINT [aaaaaSifsklad_PK] PRIMARY KEY NONCLUSTERED 
(
	[Skl] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Sklad]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sklad](
	[Skl] [nvarchar](3) NOT NULL,
	[Ident] [nvarchar](15) NOT NULL,
	[Kolicina] [money] NULL,
	[Datumzs] [datetime] NULL,
	[Cena] [money] NULL,
	[Vpcena] [money] NULL,
	[Mposnova] [money] NULL,
	[Mpcena] [money] NULL,
	[sprememba] [bit] NOT NULL CONSTRAINT [DF__Sklad__sprememba__30F848ED]  DEFAULT ((0)),
	[Valcena] [money] NULL,
	[Minkol] [money] NULL,
	[Maxkol] [money] NULL,
	[Optkol] [money] NULL,
	[letniplan] [money] NULL,
 CONSTRAINT [aaaaaSklad_PK] PRIMARY KEY CLUSTERED 
(
	[Skl] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Specifikacija]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Specifikacija](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Serstev] [nvarchar](15) NULL,
	[Paket] [nvarchar](15) NULL,
	[Opis] [nvarchar](50) NULL,
	[Kosov] [money] NULL CONSTRAINT [DF__Specifika__Kosov__4A8310C6]  DEFAULT ((0)),
	[Dolzina] [float] NULL CONSTRAINT [DF__Specifika__Dolzi__4B7734FF]  DEFAULT ((1)),
	[Sirina] [float] NULL CONSTRAINT [DF__Specifika__Sirin__4C6B5938]  DEFAULT ((1)),
	[Debelina] [float] NULL CONSTRAINT [DF__Specifika__Debel__4D5F7D71]  DEFAULT ((1)),
	[dolzinaB] [float] NULL CONSTRAINT [DF__Specifika__dolzi__4E53A1AA]  DEFAULT ((0)),
	[sirinaB] [float] NULL CONSTRAINT [DF__Specifika__sirin__4F47C5E3]  DEFAULT ((0)),
	[debelinaB] [float] NULL CONSTRAINT [DF__Specifika__debel__503BEA1C]  DEFAULT ((0)),
	[m3] [float] NULL CONSTRAINT [DF__Specifikacij__m3__51300E55]  DEFAULT ((0)),
	[m3b] [float] NULL CONSTRAINT [DF__Specifikaci__m3b__5224328E]  DEFAULT ((0)),
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaSpecifikacija_PK] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [serstev] ON [dbo].[Specifikacija] 
(
	[Serstev] ASC,
	[Paket] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TIPNAR]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TIPNAR](
	[Sifra] [nvarchar](2) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](3) NULL CONSTRAINT [DF__TIPNAR__Tip__7F60ED59]  DEFAULT ('DOB'),
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL,
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[Skl] [nvarchar](3) NULL,
	[tipkalk] [smallint] NULL CONSTRAINT [DF__TIPNAR__tipkalk__00551192]  DEFAULT ((1)),
	[VPZ] [smallint] NULL CONSTRAINT [DF__TIPNAR__VPZ__014935CB]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__TIPNAR__MPZ__023D5A04]  DEFAULT ((2)),
	[Serstev] [bit] NOT NULL CONSTRAINT [DF__TIPNAR__Serstev__03317E3D]  DEFAULT ((0)),
	[Ratip] [nvarchar](2) NULL,
	[klavzula] [nvarchar](50) NULL,
 CONSTRAINT [aaaaaTIPNAR_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TipINV]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TipINV](
	[Sifra] [nvarchar](2) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](2) NULL CONSTRAINT [DF__TipINV__Tip__690797E6]  DEFAULT ('VP'),
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL,
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[Skl] [nvarchar](3) NULL,
	[tipkalk] [smallint] NULL CONSTRAINT [DF__TipINV__tipkalk__69FBBC1F]  DEFAULT ((1)),
	[VPZ] [smallint] NULL CONSTRAINT [DF__TipINV__VPZ__6AEFE058]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__TipINV__MPZ__6BE40491]  DEFAULT ((2)),
	[Serstev] [bit] NOT NULL CONSTRAINT [DF__TipINV__Serstev__6CD828CA]  DEFAULT ((0)),
	[Ratip] [nvarchar](2) NULL,
 CONSTRAINT [aaaaaTipINV_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Tipracuna]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Tipracuna](
	[Sifra] [nvarchar](4) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](2) NULL,
	[Davek] [money] NULL CONSTRAINT [DF__Tipracuna__Davek__145C0A3F]  DEFAULT ((1)),
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL CONSTRAINT [DF__Tipracuna__dok__15502E78]  DEFAULT ('RAC'),
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[VPZ] [smallint] NULL CONSTRAINT [DF__Tipracuna__VPZ__164452B1]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__Tipracuna__MPZ__173876EA]  DEFAULT ((2)),
	[RAZ] [smallint] NULL CONSTRAINT [DF__Tipracuna__RAZ__182C9B23]  DEFAULT ((2)),
	[Naslov] [nvarchar](50) NULL CONSTRAINT [DF__Tipracuna__Naslo__1920BF5C]  DEFAULT ('Ra?un'),
	[Klavzula] [nvarchar](50) NULL,
	[Dni] [int] NULL,
	[Skl] [nvarchar](3) NULL,
	[Strm] [nvarchar](15) NULL,
 CONSTRAINT [aaaaaTipracuna_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[UNstevilke]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UNstevilke](
	[stevilka] [nvarchar](50) NOT NULL,
	[Opis] [nvarchar](250) NULL,
	[Razred] [nvarchar](5) NULL,
	[Skupina] [nvarchar](5) NULL,
	[Faktor] [int] NULL,
 CONSTRAINT [aaaaaUNstevilke_PK] PRIMARY KEY NONCLUSTERED 
(
	[stevilka] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Valcenik]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Valcenik](
	[Ident] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
	[Cena] [money] NULL,
	[Valuta] [nvarchar](3) NOT NULL,
 CONSTRAINT [aaaaaValcenik_PK] PRIMARY KEY NONCLUSTERED 
(
	[Valuta] ASC,
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[blagajne]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[blagajne](
	[blagajna] [nvarchar](2) NOT NULL,
	[vp] [nvarchar](2) NULL,
	[zadnji] [int] NULL CONSTRAINT [DF__blagajne__zadnji__6166761E]  DEFAULT ((0)),
	[klavzula] [nvarchar](20) NULL,
	[skl] [nvarchar](3) NULL,
	[tiskalnik] [int] NULL CONSTRAINT [DF__blagajne__tiskal__625A9A57]  DEFAULT ((0)),
	[lcd] [bit] NOT NULL CONSTRAINT [DF__blagajne__lcd__634EBE90]  DEFAULT ((0)),
	[dostisk] [bit] NOT NULL CONSTRAINT [DF__blagajne__dostis__6442E2C9]  DEFAULT ((0)),
	[kodnastran] [nvarchar](4) NULL,
 CONSTRAINT [aaaaablagajne_PK] PRIMARY KEY NONCLUSTERED 
(
	[blagajna] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[blobrac]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[blobrac](
	[SIFRADOK] [nvarchar](3) NULL,
	[DATUM] [datetime] NULL,
	[ZS] [float] NULL,
	[PROMET] [float] NULL,
	[GOT] [float] NULL,
	[NEGOT] [float] NULL,
	[SALDO] [float] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[davki]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[davki](
	[Tarifa] [nvarchar](5) NOT NULL,
	[Opis] [nvarchar](100) NULL,
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[Aop] [nvarchar](3) NULL,
	[Faktor] [money] NULL,
	[Trosarina] [money] NULL,
 CONSTRAINT [aaaaadavki_PK] PRIMARY KEY NONCLUSTERED 
(
	[Tarifa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[enote]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[enote](
	[Emer] [nvarchar](3) NOT NULL,
	[Opis] [nvarchar](30) NULL,
 CONSTRAINT [aaaaaenote_PK] PRIMARY KEY NONCLUSTERED 
(
	[Emer] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[katalog]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[katalog](
	[Ident] [nvarchar](15) NOT NULL,
	[Opis] [ntext] NULL,
	[Emer] [nvarchar](3) NULL,
	[Klas] [nvarchar](12) NULL,
	[Koda] [nvarchar](15) NULL,
	[Cena] [money] NULL,
	[Mpcena] [money] NULL,
	[Vpcena] [money] NULL,
	[DDVTAR] [nvarchar](5) NULL,
	[Akcija] [bit] NOT NULL CONSTRAINT [DF__katalog__Akcija__2A4B4B5E]  DEFAULT ((0)),
	[Slika] [image] NULL,
	[Proizvaja] [nvarchar](30) NULL,
	[Tip] [nvarchar](30) NULL,
	[Teza] [money] NULL,
	[Tezab] [money] NULL,
	[Poreklo] [nvarchar](30) NULL,
	[Uvoznik] [nvarchar](60) NULL,
	[LetoU] [nvarchar](4) NULL,
	[Naziv] [nvarchar](50) NULL,
	[Provizija] [money] NULL,
	[Provskup] [nvarchar](5) NULL,
	[Normativ] [bit] NOT NULL CONSTRAINT [DF__katalog__Normati__2B3F6F97]  DEFAULT ((0)),
	[KSkl] [nvarchar](3) NULL,
	[Flag1] [bit] NOT NULL CONSTRAINT [DF__katalog__Flag1__2C3393D0]  DEFAULT ((0)),
	[Flag2] [bit] NOT NULL CONSTRAINT [DF__katalog__Flag2__2D27B809]  DEFAULT ((0)),
	[Plu] [int] NULL,
	[Plu1] [int] NULL,
	[MINKOL] [money] NULL,
	[Serija] [bit] NOT NULL CONSTRAINT [DF__katalog__Serija__2E1BDC42]  DEFAULT ((0)),
	[Lit] [money] NULL,
	[Alkohol] [money] NULL,
	[Lokacija] [nvarchar](30) NULL,
	[cartarifa] [nvarchar](50) NULL,
	[UNstevilka] [nvarchar](150) NULL,
	[Potslike] [nvarchar](150) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaakatalog_PK] PRIMARY KEY CLUSTERED 
(
	[Ident] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Klas] ON [dbo].[katalog] 
(
	[Klas] ASC,
	[Naziv] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Naziv] ON [dbo].[katalog] 
(
	[Naziv] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Plu] ON [dbo].[katalog] 
(
	[Plu] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Plu1] ON [dbo].[katalog] 
(
	[Plu1] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [sifdob] ON [dbo].[katalog] 
(
	[Koda] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[katdvojnik]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[katdvojnik](
	[Ident] [nvarchar](15) NULL,
	[Koda] [nvarchar](15) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
 CONSTRAINT [aaaaakatdvojnik_PK] PRIMARY KEY NONCLUSTERED 
(
	[Koda] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[klasif]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[klasif](
	[Klas] [nvarchar](12) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[Akcija] [bit] NOT NULL CONSTRAINT [DF__klasif__Akcija__4CA06362]  DEFAULT ((0)),
	[ZadnjiID] [nvarchar](15) NULL,
	[KlasID] [nvarchar](12) NULL,
	[PRENOSID] [nvarchar](15) NULL,
	[PRENOSFAKTOR] [money] NULL,
	[Konto] [nvarchar](8) NULL,
 CONSTRAINT [aaaaaklasif_PK] PRIMARY KEY NONCLUSTERED 
(
	[Klas] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDPRENOS] ON [dbo].[klasif] 
(
	[PRENOSID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [KlasID] ON [dbo].[klasif] 
(
	[KlasID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ZadnjiID] ON [dbo].[klasif] 
(
	[ZadnjiID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[maxdok]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[maxdok](
	[Dok] [nvarchar](3) NOT NULL,
	[Zadnji] [int] NULL,
 CONSTRAINT [aaaaamaxdok_PK] PRIMARY KEY NONCLUSTERED 
(
	[Dok] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[obdobje]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[obdobje](
	[datumod] [datetime] NULL,
	[datumdo] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[porabe]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[porabe](
	[Sifra] [nvarchar](2) NOT NULL,
	[Opis] [nvarchar](30) NULL,
	[Tip] [nvarchar](2) NULL CONSTRAINT [DF__porabe__Tip__74AE54BC]  DEFAULT ('VP'),
	[Davek] [money] NULL,
	[Konto] [nvarchar](7) NULL,
	[dok] [nvarchar](3) NULL,
	[OSNDDV] [nvarchar](2) NULL,
	[Zadnji] [int] NULL,
	[VPstevilci] [nvarchar](2) NULL,
	[Skl] [nvarchar](3) NULL,
	[tipkalk] [smallint] NULL CONSTRAINT [DF__porabe__tipkalk__75A278F5]  DEFAULT ((1)),
	[VPZ] [smallint] NULL CONSTRAINT [DF__porabe__VPZ__76969D2E]  DEFAULT ((2)),
	[MPZ] [smallint] NULL CONSTRAINT [DF__porabe__MPZ__778AC167]  DEFAULT ((2)),
	[Serstev] [bit] NOT NULL CONSTRAINT [DF__porabe__Serstev__787EE5A0]  DEFAULT ((0)),
	[Ratip] [nvarchar](2) NULL,
	[Klavzula] [nvarchar](50) NULL,
	[Popust] [money] NULL,
 CONSTRAINT [aaaaaporabe_PK] PRIMARY KEY NONCLUSTERED 
(
	[Sifra] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[racpost]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[racpost](
	[Ident] [nvarchar](15) NULL,
	[Naziv] [nvarchar](250) NULL,
	[Kolicina] [money] NULL,
	[Vpcena] [float] NULL,
	[Cena] [money] NULL,
	[Valcena] [float] NULL,
	[Mposnova] [float] NULL,
	[Mpcena] [float] NULL,
	[Rabat] [money] NULL,
	[Rabat1] [money] NULL,
	[Tarifa] [nvarchar](5) NULL,
	[Emer] [nvarchar](3) NULL,
	[Tip] [nvarchar](1) NULL,
	[Strm] [nvarchar](12) NULL,
	[Pkonto] [nvarchar](7) NULL,
	[Val] [nvarchar](3) NULL,
	[Tecaj] [money] NULL,
	[Nalog] [nvarchar](12) NULL,
	[Strac] [nvarchar](12) NOT NULL,
	[Tekst] [ntext] NULL,
	[Pozicija] [int] NOT NULL,
	[Davekproc] [money] NULL,
	[Stevdob] [int] NULL,
	[Pozdob] [int] NULL,
	[Vrkol] [money] NULL,
	[ZCENA] [money] NULL,
	[upsize_ts] [timestamp] NULL,
	[rok] [nvarchar](15) NULL,
 CONSTRAINT [aaaaaracpost_PK] PRIMARY KEY CLUSTERED 
(
	[Strac] ASC,
	[Pozicija] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [Stevdob] ON [dbo].[racpost] 
(
	[Stevdob] ASC,
	[Pozdob] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[racuni]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[racuni](
	[Kljuc] [int] IDENTITY(1,1) NOT NULL,
	[Narocilo] [nvarchar](24) NULL,
	[Datnar] [datetime] NULL,
	[Nacnar] [nvarchar](15) NULL,
	[Nacodpreme] [nvarchar](255) NULL,
	[Referent] [nvarchar](8) NULL,
	[Datumdok] [datetime] NULL,
	[Dur] [datetime] NULL,
	[Valuta] [datetime] NULL,
	[Prockasa] [money] NULL,
	[Rabat] [money] NULL,
	[Nabvred] [money] NULL CONSTRAINT [DF__racuni__Nabvred__4316F928]  DEFAULT ((0)),
	[Vpvred] [money] NULL CONSTRAINT [DF__racuni__Vpvred__440B1D61]  DEFAULT ((0)),
	[Mposnova] [money] NULL CONSTRAINT [DF__racuni__Mposnova__44FF419A]  DEFAULT ((0)),
	[Mpvred] [money] NULL CONSTRAINT [DF__racuni__Mpvred__45F365D3]  DEFAULT ((0)),
	[Znesek] [money] NULL,
	[Placano] [money] NULL,
	[Datumdob] [datetime] NULL,
	[Status] [nvarchar](1) NULL,
	[Poraba] [nvarchar](4) NULL,
	[Gk] [nvarchar](1) NULL,
	[Konto] [nvarchar](7) NULL,
	[Stm] [nvarchar](12) NULL,
	[Pkonto] [nvarchar](7) NULL,
	[Tip] [nvarchar](1) NULL,
	[Placanoval] [money] NULL,
	[Znesekval] [money] NULL,
	[Racun] [ntext] NULL,
	[Val] [nvarchar](3) NULL,
	[Tecaj] [money] NULL,
	[Procprib] [money] NULL,
	[Pnaslovnik] [nvarchar](8) NULL,
	[Pnaslov] [nvarchar](250) NULL,
	[Pposta] [nvarchar](12) NULL,
	[Pkraj] [nvarchar](50) NULL,
	[Nalog] [nvarchar](12) NULL,
	[Vrstadok] [nvarchar](3) NULL,
	[Strac] [nvarchar](12) NOT NULL,
	[Nazivkupca] [nvarchar](30) NULL,
	[Dobavnica] [nvarchar](255) NULL,
	[Kupec] [nvarchar](8) NULL,
	[Klavzula] [ntext] NULL,
	[Datumknj] [datetime] NULL,
	[Zakleni] [bit] NOT NULL CONSTRAINT [DF__racuni__Zakleni__46E78A0C]  DEFAULT ((0)),
	[Naslovnik] [bit] NOT NULL CONSTRAINT [DF__racuni__Naslovni__47DBAE45]  DEFAULT ((0)),
	[Avracun] [nvarchar](12) NULL,
	[Pracun] [nvarchar](12) NULL,
	[Vracun] [nvarchar](12) NULL,
	[Zaokrozi] [smallint] NULL,
	[KOLI] [nvarchar](30) NULL,
	[BRUTO] [nvarchar](30) NULL,
	[NETO] [nvarchar](30) NULL,
	[PARITETA] [nvarchar](50) NULL,
	[REGSTEV] [nvarchar](50) NULL,
	[DOBAVNICA1] [ntext] NULL,
	[UPORABNIK] [nvarchar](20) NULL,
	[upsize_ts] [timestamp] NULL,
 CONSTRAINT [aaaaaracuni_PK] PRIMARY KEY CLUSTERED 
(
	[Strac] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [Kljuc] ON [dbo].[racuni] 
(
	[Kljuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[partner]    Script Date: 01/16/2009 07:56:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[partner](
	[Idepa] [nvarchar](8) NOT NULL,
	[Naziv] [nvarchar](50) NULL,
	[Naziv1] [nvarchar](80) NULL,
	[Konos1] [nvarchar](35) NULL,
	[Konos2] [nvarchar](35) NULL,
	[Konos3] [nvarchar](25) NULL,
	[Funkcija1] [nvarchar](20) NULL,
	[Funkcija2] [nvarchar](20) NULL,
	[Funkcija3] [nvarchar](20) NULL,
	[Ulica] [nvarchar](30) NULL,
	[Posta] [nvarchar](8) NULL,
	[Kraj] [nvarchar](30) NULL,
	[Ziro] [nvarchar](60) NULL,
	[Davst] [nvarchar](25) NULL,
	[Telefon1] [nvarchar](20) NULL,
	[Telefon2] [nvarchar](20) NULL,
	[Telefon3] [nvarchar](20) NULL,
	[Fax] [nvarchar](20) NULL,
	[Email] [nvarchar](40) NULL,
	[Nacin] [nvarchar](4) NULL,
	[Valuta] [nvarchar](3) NULL,
	[Skupina] [nvarchar](5) NULL CONSTRAINT [DF__partner__Skupina__03317E3D]  DEFAULT ('0'),
	[Opis] [ntext] NULL,
	[Zavezanec] [bit] NOT NULL CONSTRAINT [DF__partner__Zavezan__0425A276]  DEFAULT ((0)),
	[Drzava] [nvarchar](30) NULL,
	[Oznaka] [nvarchar](20) NULL,
	[TRK2] [nvarchar](150) NULL,
	[Provizija] [money] NULL,
	[Sektor] [nvarchar](50) NULL,
	[oddelki] [ntext] NULL,
	[Iracdavcna] [bit] NOT NULL CONSTRAINT [DF__partner__Iracdav__0519C6AF]  DEFAULT ((0)),
	[DRZ] [nvarchar](3) NULL,
	[WWW] [nvarchar](150) NULL,
	[Objekti] [ntext] NULL,
	[Intra_drzavaN] [nvarchar](2) NULL,
	[Intra_drzavaP] [nvarchar](2) NULL,
	[Intra_Pogoji] [nvarchar](3) NULL,
	[Intra_Lega] [nvarchar](1) NULL,
	[Intra_VrstaPosla] [nvarchar](2) NULL,
	[Intra_Prevoz] [nvarchar](1) NULL,
	[EAN] [nvarchar](35) NULL,
	[upsize_ts] [timestamp] NULL,
	[Opomba] [nvarchar](255) NULL,
 CONSTRAINT [aaaaapartner_PK] PRIMARY KEY CLUSTERED 
(
	[Idepa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ean] ON [dbo].[partner] 
(
	[EAN] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [naziv] ON [dbo].[partner] 
(
	[Naziv] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[BLSALDO]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLSALDO](
	[SIFRADOK] [nvarchar](3) NULL,
	[DATUM] [datetime] NULL,
	[KOLICINA] [float] NULL,
	[CENA] [float] NULL,
	[ZNESEK] [float] NULL,
	[SIFPLA] [nvarchar](6) NULL
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [SIFRADOK] ON [dbo].[BLSALDO] 
(
	[SIFRADOK] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[BLZSALDO]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BLZSALDO](
	[IDENT] [int] IDENTITY(1,1) NOT NULL,
	[SIFRADOK] [nvarchar](3) NULL,
	[DATUM] [datetime] NULL,
	[VSOTA] [int] NULL CONSTRAINT [DF__BLZSALDO__VSOTA__282DF8C2]  DEFAULT ((0)),
 CONSTRAINT [aaaaaBLZSALDO_PK] PRIMARY KEY NONCLUSTERED 
(
	[IDENT] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[CARtarife]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CARtarife](
	[Tarifa] [nvarchar](50) NOT NULL,
	[Opis] [nvarchar](250) NULL,
 CONSTRAINT [aaaaaCARtarife_PK] PRIMARY KEY NONCLUSTERED 
(
	[Tarifa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[CEKI]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CEKI](
	[SIFRADOK] [nvarchar](3) NULL,
	[STEVDOK] [int] NULL,
	[SIFPLACILA] [nvarchar](6) NULL,
	[ZNESEK] [float] NULL,
	[opis] [nvarchar](50) NULL,
	[datumdok] [datetime] NULL,
	[status] [nvarchar](1) NULL,
	[placilaproc] [int] NULL,
	[IDEPA] [nvarchar](8) NULL,
	[VALUTA] [datetime] NULL,
	[VVNOVCITEV] [datetime] NULL,
	[REALIZIRAN] [nvarchar](50) NULL,
	[NAZIV] [nvarchar](150) NULL,
	[IZVOR] [nvarchar](50) NULL
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IDEPA] ON [dbo].[CEKI] 
(
	[IDEPA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [opis] ON [dbo].[CEKI] 
(
	[opis] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [placila] ON [dbo].[CEKI] 
(
	[SIFRADOK] ASC,
	[STEVDOK] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[DENAR]    Script Date: 01/16/2009 07:56:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DENAR](
	[SIFRA] [nvarchar](6) NULL,
	[OPIS] [nvarchar](30) NULL,
	[BANKA] [nvarchar](20) NULL,
	[PROVIZIJA] [float] NULL,
	[TRR] [nvarchar](50) NULL,
	[TIP] [nvarchar](1) NULL,
	[upsize_ts] [timestamp] NULL
) ON [PRIMARY]
GO
