/*==============================================================*/
/* Table: PRDAJUSTE                                            */
/*==============================================================*/
create table PRDAJUSTE  (
   CIA                  CHAR(3)                         not null,
   ORDEN                NUMBER(10)                      not null,
   COD_ARTICULO         VARCHAR2(25)                    not null,
   COD_BODEGA           VARCHAR2(3)			not null,
   MEDIDA               VARCHAR2(5)			not null,
   TIPO			CHAR(1)				not null
      constraint PRDAJUSTRE_TIPO_CK check (TIPO in ('E','S')),
   CANTIDAD             NUMBER(14,4)                    not null,
   constraint PRDAJUSTE_PK primary key (CIA, ORDEN, COD_ARTICULO,COD_BODEGA)
)
initrans 1
storage
(
    initial 10K
    next 10K
);

alter table PRDAJUSTE
   add constraint PRDORDEN_AJUSTE_FK foreign key (CIA, ORDEN)
      references PRDORDEN (CIA, ORDEN);
