--ABSN-1984

--changes on WEIGHINGTRANSACTION table
ALTER TABLE WEIGHINGTRANSACTION DROP CONSTRAINT CHK_WEIGHINGTRANSACTION_WEIGHINGTRANSTYPE;

ALTER TABLE WEIGHINGTRANSACTION ADD CONSTRAINT CHK_WEIGHINGTRANSACTION_WEIGHINGTRANSTYPE CHECK (WEIGHINGTRANSACTIONTYPE IN (1, 2, 3, 4));

ALTER TABLE WEIGHINGTRANSACTION MODIFY (WEIGHINGCATEGORY_LINK_ID NULL);

ALTER TABLE WEIGHINGTRANSACTION ADD (EXCHANGECARTUNDELIVERABLE NUMBER DEFAULT 0 NOT NULL CONSTRAINT CHK_WEIGHINGTRANSACTION_EXCHCARTUNDEL CHECK (EXCHANGECARTUNDELIVERABLE IN (0, 1, 2, 3, 4, 5, 6, 7, 8)));

COMMENT ON COLUMN WEIGHINGTRANSACTION.WEIGHINGTRANSACTIONTYPE IS '1 = Soil Weighing 2 = Credit weighing 3 = Extraction weighing 4 = Clean return weighing';
COMMENT ON COLUMN WEIGHINGTRANSACTION.EXCHANGECARTUNDELIVERABLE IS
	'Possible values:
	0 = Deliverable / Not applicable
	1 = Substitute exchange cart
	2 = Delivery stop
	3 = Consumption point not active
	4 = Department not active
	5 = Customer not active
	6 = No delivery note found
	7 = Product without weighing category
	8 = Product without theoretical weight
	Only relevant when weighing transaction type = 4';
	
--WORKSTATIONEXTRAINFO table
ALTER TABLE WORKSTATIONEXTRAINFO ADD (PRINTCLEANRETURNTICKET VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_WRKSTAEXTRAINFO_PRINTCLEANRTRNTCKT CHECK (PRINTCLEANRETURNTICKET IN ('Y', 'N')));

COMMENT ON COLUMN WORKSTATIONEXTRAINFO.PRINTCLEANRETURNTICKET IS 'Setting only used in Clean Return Weighing (Infinity)';


