--ABS-116376 / ABS-116626

UPDATE CONTRACTPRODUCTORDERDELIVERY CPOD
SET CPOD.AUTOSOILPERCENTAGE = 0
WHERE CPOD.CONTRACTPRODUCT_ID IN (SELECT CP.CONTRACTPRODUCT_ID FROM CONTRACTPRODUCT CP WHERE CP.PRODUCT_ID IN (SELECT P.PRODUCT_ID FROM PRODUCT P WHERE P.TYPEOFMERCHANDISE = 2 AND P.AUTOSOIL = 'Y'));

COMMIT;

UPDATE PRODUCTLISTPERCUSTOMER PLPC
SET PLPC.AUTOSOIL = 0, PLPC.AUTOSOILPERCENTAGE = 0
WHERE PLPC.PRODUCT_ID IN (SELECT P.PRODUCT_ID FROM PRODUCT P WHERE P.TYPEOFMERCHANDISE = 2 AND P.AUTOSOIL = 'Y');

COMMIT;

UPDATE PRODUCT P
SET P.AUTOSOIL = 'N'
WHERE P.TYPEOFMERCHANDISE = 2
AND P.AUTOSOIL = 'Y';

COMMIT;