1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
CREATE TABLE [dbo].[MOUVSTK01](
ID_LIGNE int IDENTITY(1,1),
[CODE_ORIGINE] char(10) NULL,
[DATE] [smalldatetime] NULL,
[CODE_CLIFOUR] char(8) default '' NULL,
[CODE_MAGASIN] [numeric] NULL,
[REFERENCE] char(13) NULL,
[QTE_ENTREE] [numeric] default 0 NULL,
[QTE_SORTIE] [numeric] default 0 NULL,
[PUHT] decimal(11,5) default 0 NULL,
[PUHTNET] decimal(11,5) default 0 NULL,
[PUTTC] decimal(11,5) default 0 NULL,
[PUTTCNET] decimal(11,5) default 0 NULL,
[TAUX_REMISE] [decimal] default 0 NULL,
[PRHT] decimal(11,5) default 0 NULL,
[TYPE_VENTE] [numeric] default 0 NULL,
[CODE_TARIF] [numeric] default 0 NULL,
ACH_TOTALHT as (QTE_ENTREE)*PUHT,
ACH_TOTALHTNET as (QTE_ENTREE)*PUHTNET,
ACH_TOTALTTC as (QTE_ENTREE)*PUTTC,
ACH_TOTALTTCNET as (QTE_ENTREE)*PUTTCNET,
ACH_TOTALPRHT as (QTE_ENTREE)*PRHT,
VTE_TOTALHT as (QTE_SORTIE)*PUHT,
VTE_TOTALTTC as (QTE_SORTIE)*PUTTC,
VTE_TOTALTTCNET as (QTE_SORTIE)*PUTTCNET,
VTE_TOTALPRHT as (QTE_SORTIE)*PRHT,
VTE_TOTALMARGE as ((QTE_SORTIE*PUHTNET)-(QTE_SORTIE*PRHT)),
[STOCK] [numeric] default 0 NULL
constraint pk_presence1
primary key (ID_LIGNE)
) |
Partager