SELECT delivery_method, agency_id, address_id FROM basket_defaults SELECT v.code delivery_method, o.date_send, o.agency_id, o.address_id FROM basket o JOIN vn2008.Vistas v ON o.delivery_method_id = v.vista_id CALL vn.agencyListAvailable (#date, #address); SELECT DISTINCT m.id, m.description FROM tmp.agencyAvailable a JOIN vn.agencyMode m ON m.agencyFk = a.agencyFk JOIN vn.deliveryMethod d ON d.id = m.deliveryMethodFk WHERE d.code IN ('AGENCY', 'DELIVERY') ORDER BY m.description; DROP TEMPORARY TABLE tmp.agencyAvailable; CALL vn.agencyListAvailable (#date, #address); SELECT DISTINCT m.id, m.description FROM tmp.agencyAvailable a JOIN vn.agencyMode m ON m.agencyFk = a.agencyFk JOIN vn.deliveryMethod d ON d.id = m.deliveryMethodFk WHERE d.code IN ('PICKUP') ORDER BY m.description; DROP TEMPORARY TABLE tmp.agencyAvailable;

ConfigureOrder

DeliveryOrPickupQuestion

SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country FROM myAddress a LEFT JOIN vn.province p ON p.id = a.provinceFk JOIN vn.country c ON c.id = p.countryFk WHERE a.isActive

AgencyQuestion

PickupWarehouseQuestion

ConfirmToAccessCatalog

Arrival

Agency

ConfirmToAccessCatalog

Arrival

ReceiveThroughtRoute

ConfirmToAccessCatalog

Pickup

Warehouse