-- order 20010602.20 (new Lotus Notes order), old order no. 502840


begin    
    execute immediate ('ALTER TRIGGER CUSTOMER_CHECK_CONTRACT_USAGE DISABLE;');
exception
   when others then null;
end;
/

ALTER TABLE CUSTOMER
	ADD (PRINTTAXONAPPENDIX VARCHAR2(1)  DEFAULT 'N' NOT NULL CONSTRAINT YN_ValidationField24 CHECK (PRINTTAXONAPPENDIX IN ('Y', 'N')));

-- If Customer.Taxable = Y THEN PrintTaxOnAppendiX = Y ELSE PrintTaxOnAppendiX = N


UPDATE CUSTOMER C
SET C.PRINTTAXONAPPENDIX ='Y'
WHERE C.TAXABLE='Y';

commit;

begin    
    execute immediate ('ALTER TRIGGER CUSTOMER_CHECK_CONTRACT_USAGE ENABLE;');
exception
   when others then null;
end;
/

