-- P5-5822/5832 Add new shipping option DHL Economy

INSERT INTO "delivery-methods" (id, name) VALUES
    (15, 'dhlEconomyEU'),
    (16, 'dhlEconomyWorld');

-- Add DHL Economy World everywhere DHL is used with DHL's current price
INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory) 
    SELECT 16, '', '', currency, price, territory
    FROM "delivery-methods_prices"
    WHERE method = 10
;

-- Add DHL Economy EU everywhere DHL Express is used (EU) with DHL Express' current price (zero)
INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory) 
    SELECT 15, '', '', currency, price, territory
    FROM "delivery-methods_prices"
    WHERE method = 14
;

-- Add 7 to price of all USD and EUR DHL entries
UPDATE "delivery-methods_prices"
    SET price = price + 7
    WHERE method = 10 AND currency in ('EUR','USD');
;

-- Add 7 to price of all EUR and GBP DHL Express entries
UPDATE "delivery-methods_prices"
    SET price = price + 7
    WHERE method = 14 AND currency in ('EUR', 'GBP')
;
