SELECT deliveryMethod, agencyModeFk, addressFk, defaultAgencyFk
FROM myBasketDefaults
SELECT m.code deliveryMethod, o.sent, o.agencyModeFk, o.addressFk
FROM myBasket o
JOIN vn.deliveryMethod m ON m.id = o.deliveryMethodFk
CALL vn.zoneGetAgency(#address, #date);
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
JOIN vn.deliveryMethod d
ON d.id = a.deliveryMethodFk
WHERE d.code IN ('AGENCY', 'DELIVERY')
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
CALL vn.zoneGetAgency(#address, #date);
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
JOIN vn.deliveryMethod d
ON d.id = a.deliveryMethodFk
WHERE d.code IN ('PICKUP')
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
ConfigureOrder