--SO 20015567
-------------------------------------------------STOCKROOM----------------------------------
ALTER TABLE STOCKROOM
	ADD (RECEIVESHIPMENTLOCATION_ID NUMBER);

ALTER TABLE STOCKROOM
ADD CONSTRAINT STOCKROOM_STOCKROOMLOCATION FOREIGN KEY (RECEIVESHIPMENTLOCATION_ID) REFERENCES STOCKROOMLOCATION (STOCKROOMLOCATION_ID) ON DELETE SET NULL;

-------------------------------------------------SHIPMENTLIST----------------------------------
ALTER TABLE SHIPMENTLIST
	ADD (RECEIVEONLOCALSTOCK NUMBER  DEFAULT 0 NOT NULL CONSTRAINT RECEIVEONLOCALSTOCK_valid CHECK (RECEIVEONLOCALSTOCK IN (0, 1)));

COMMENT ON COLUMN SHIPMENTLIST.RECEIVEONLOCALSTOCK IS '0 – items shouldn’t be received first in local stockroom.
1-items should be received first in local stockroom.
';
-----------------------------------------------transactiontype--------------------------------------
insert into transactiontype
  (transactiontype_id, factorydescription, systemuser_id, timestamp)
  select 417,
         'Transit-Out via Shipment List',
         getminsystemuser(),
         sysdate
    from dual;
commit;

insert into transactiontype
  (transactiontype_id, factorydescription, systemuser_id, timestamp)
  select 418,
         'Transit-In via Shipment List',
         getminsystemuser(),
         sysdate
    from dual;
commit;

insert into transactiontype
  (transactiontype_id, factorydescription, systemuser_id, timestamp)
  select 419,
         'Emblems TRANSIT Stock via ShipmentList',
         getminsystemuser(),
         sysdate
    from dual;
commit;