/*
--Order 20012212.110


---DELIVEREDQTYPERINVENTORY table---


ALTER TABLE DELIVEREDQTYPERINVENTORY
	ADD (DELIVEREDINVOICEHEADER_ID NUMBER);

ALTER TABLE DELIVEREDQTYPERINVENTORY
ADD CONSTRAINT DELIVEREDINVOICEHEADER_INVHEAD FOREIGN KEY (DELIVEREDINVOICEHEADER_ID) REFERENCES INVOICEHEADER (INVOICEHEADER_ID) ON DELETE CASCADE;


CREATE INDEX XIF1DELIVEREDINVOICEHEADER_ID ON DELIVEREDQTYPERINVENTORY
(DELIVEREDINVOICEHEADER_ID  ASC);

------------PACKINGNOTELINE table-----

ALTER TABLE PACKINGNOTELINE
	ADD (DELIVEREDINVOICEHEADER_ID NUMBER);

COMMENT ON COLUMN PACKINGNOTELINE.DELIVEREDINVOICEHEADER_ID IS 'Link to invoice the items have been delivered on (but not invoiced). This is only applicable for US direct invoicing in case the wash charges may only be shown on the invoice of a billing day. Not a foreign key.';

CREATE INDEX XIE14PACKINGNOTELINE ON PACKINGNOTELINE
(DELIVEREDINVOICEHEADER_ID   ASC);
*/