-- ABS-155056 D_UBS_2243 Unable to remove email option for del to under bill to account / ABS-155128

UPDATE CUSTOMER C
SET C.SENDINVOICETO = 0
WHERE C.SENDINVOICETO NOT IN (0, 1, 2);
COMMIT;

ALTER TABLE CUSTOMER 
ADD CONSTRAINT CHK_CUSTOMER_SENDINVOICETO
CHECK(SENDINVOICETO IN (0, 1, 2, 3));

COMMENT ON COLUMN CUSTOMER.SENDINVOICETO IS '0 = Del to customer
1 = Bill to customer
2 = Pay-by Customer
3 = Do not send';
