Merge pull request 'feat(priceDelta): refs #8030 new field zoneGeoFk' (!3032) from 8030-newPriceComponent into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3032 Reviewed-by: Pablo Natek <pablone@verdnatura.es>
This commit is contained in:
commit
c2aa33bf3c
|
@ -41,8 +41,10 @@ BEGIN
|
||||||
AND (pd.originFk IS NULL OR pd.originFk = i.originFk)
|
AND (pd.originFk IS NULL OR pd.originFk = i.originFk)
|
||||||
AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk)
|
AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk)
|
||||||
AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk)
|
AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk)
|
||||||
|
LEFT JOIN zoneGeo zg ON zg.id = pd.zoneGeoFk
|
||||||
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
|
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
|
||||||
AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
|
AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
|
||||||
|
AND (pd.zoneGeoFk IS NULL OR address_getGeo(vAddressFk) BETWEEN zg.lft AND zg.rgt)
|
||||||
GROUP BY i.id;
|
GROUP BY i.id;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice
|
CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL COMMENT 'Application area for the bonus component';
|
||||||
|
ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
Loading…
Reference in New Issue