-- ABS-83167 / ABS-85884
ALTER TABLE CUSTOMER ADD (DIRECTINVSALESNOTESTYPE NUMBER DEFAULT 0 NOT NULL
			CONSTRAINT CHK_CUSTOMER_DIRINVSN CHECK (DIRECTINVSALESNOTESTYPE IN (0,1,2)));

COMMENT ON COLUMN CUSTOMER.DIRECTINVSALESNOTESTYPE IS 'Only used for TRADE module and US Direct Invoicing
0 (default) = Delivery notes invoiced in Sales Order dialog or Route Status Control dialog, which ever gets the delivery note first
1 = Delivery notes invoiced in Sales Order dialog only
2 = Delivery notes invoiced in Route Status Control dialog only';