7525-devToTest #2542

Merged
alexm merged 231 commits from 7525-devToTest into test 2024-06-04 07:59:34 +00:00
5 changed files with 31 additions and 18 deletions
Showing only changes of commit 599f22a25d - Show all commits

View File

@ -42,8 +42,8 @@ proc:BEGIN
image,
description
)
SELECT i.name,
i.`size`,
SELECT CONCAT(i.name, ' by ',a.nickname),
i.`size` + apc.deliveryCost,
i.id,
vLanded,
vPostalCode,
@ -52,6 +52,11 @@ proc:BEGIN
i.description
FROM vn.item i
JOIN vn.itemType it ON it.id = i.typeFk
JOIN addressPostCode apc
ON apc.dayOfWeek = dayOfWeek(vLanded)
AND NOW() < vLanded - INTERVAL apc.hoursInAdvance HOUR
AND apc.postCode = vPostalCode
JOIN vn.address a ON a.id = apc.addressFk
WHERE it.code IN ('FNR','FNP');
SELECT *

View File

@ -13,8 +13,17 @@ BEGIN
/**
* Set actions for contact request
*
* @param vPostalCode Delivery address postal code
* @param vName Name
* @param vPhone Phone number
* @param vEmail e-mail
* @param vMessage text of the message
*/
CALL vn.mail_insert(
'pako@verdnatura.es',
vEmail,
'Contact request',
CONCAT('Phone: ',vPhone, ' Message: ', vMessage)
);
END$$
DELIMITER ;

View File

@ -21,7 +21,7 @@ BEGIN
apc.dayOfWeek - vCurrentDayOfWeek,
7 - apc.dayOfWeek
) DAY nextDay,
NOW() + INTERVAL apc.hoursInAdvance - 12 HOUR minDeliveryTime
NOW() + INTERVAL apc.hoursInAdvance HOUR minDeliveryTime
FROM addressPostCode apc
WHERE apc.postCode = vPostalCode
HAVING nextDay > minDeliveryTime) sub;

View File

@ -15,6 +15,5 @@ BEGIN
JOIN vn.itemType it ON it.id = i.typeFk
WHERE it.code IN ('FNR','FNP')
LIMIT 3;
END$$
DELIMITER ;