hotfix: ticket 189567
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
46065a983f
commit
d27bbd9a8f
|
@ -11,10 +11,7 @@ BEGIN
|
||||||
*/
|
*/
|
||||||
DECLARE vClient INT DEFAULT NULL;
|
DECLARE vClient INT DEFAULT NULL;
|
||||||
|
|
||||||
-- SET vPhone = vPhone COLLATE 'utf8_unicode_ci';
|
CREATE OR REPLACE TEMPORARY TABLE tClient
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tClient;
|
|
||||||
CREATE TEMPORARY TABLE tClient
|
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT id clientFk
|
SELECT id clientFk
|
||||||
FROM `client`
|
FROM `client`
|
||||||
|
@ -27,13 +24,14 @@ BEGIN
|
||||||
OR mobile = vPhone
|
OR mobile = vPhone
|
||||||
UNION
|
UNION
|
||||||
SELECT clientFk
|
SELECT clientFk
|
||||||
FROM vn.clientContact
|
FROM clientContact
|
||||||
WHERE phone = vPhone;
|
WHERE phone = vPhone;
|
||||||
|
|
||||||
SELECT t.clientFk INTO vClient
|
SELECT t.clientFk INTO vClient
|
||||||
FROM tClient t
|
FROM tClient t
|
||||||
JOIN `client` c ON c.id = t.clientFk
|
JOIN `client` c ON c.id = t.clientFk
|
||||||
WHERE c.isActive
|
WHERE c.isActive
|
||||||
|
AND c.salesPersonFk
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tClient;
|
DROP TEMPORARY TABLE tClient;
|
||||||
|
|
Loading…
Reference in New Issue