Skip to content

Commit

Permalink
#4582 Take corectlly the country
Browse files Browse the repository at this point in the history
#4582 Excel Export and SQL for Product Specifications
  • Loading branch information
cristinamghita committed Sep 17, 2018
1 parent 117da8e commit 3830708
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
@@ -1,5 +1,6 @@
-- DROP VIEW "de.metas.fresh".product_specifications_v;


CREATE OR REPLACE VIEW "de.metas.fresh".product_specifications_v AS
select p.Name as productName, p.CustomerLabelName,
p.additional_produktinfos, p.Ingredients, p.Value as productValue,
Expand All @@ -9,6 +10,7 @@ a.Name as allergen, nf.Name as nutritionName, pn.nutritionqty,
bomProduct.Name as componentName, bomLine.qtybatch, bomProduct.ingredients as componentIngredients
from m_product p
left outer join ad_orginfo oi on p.ad_org_id=oi.ad_org_id
left outer join C_BPartner_Location bpl on oi.orgbp_location_id = bpl.c_bpartner_location_id
left outer join c_location l on oi.c_location_id=l.c_location_id
left outer join c_country c on l.c_country_id=c.c_country_id
left outer join M_HU_PI_Item_Product pi on pi.M_product_ID = p.M_product_ID
Expand All @@ -18,4 +20,4 @@ left outer join M_Product_Nutrition pn on pn.M_product_ID = p.M_product_ID
left outer join M_Nutrition_Fact nf on nf.M_Nutrition_Fact_ID = pn.M_Nutrition_Fact_ID
left outer join PP_Product_BOM bom on bom.M_Product_ID = p.m_product_id
left outer join PP_Product_BOMLine bomLine on bomLine.pp_product_bom_id = bom.pp_product_bom_id
left outer join m_product bomProduct on bomLine.m_product_id = bomProduct.m_product_id;
left outer join m_product bomProduct on bomLine.m_product_id = bomProduct.m_product_id;
@@ -1,5 +1,6 @@
-- DROP VIEW "de.metas.fresh".product_specifications_v;


CREATE OR REPLACE VIEW "de.metas.fresh".product_specifications_v AS
select p.Name as productName, p.CustomerLabelName,
p.additional_produktinfos, p.Ingredients, p.Value as productValue,
Expand All @@ -9,6 +10,7 @@ a.Name as allergen, nf.Name as nutritionName, pn.nutritionqty,
bomProduct.Name as componentName, bomLine.qtybatch, bomProduct.ingredients as componentIngredients
from m_product p
left outer join ad_orginfo oi on p.ad_org_id=oi.ad_org_id
left outer join C_BPartner_Location bpl on oi.orgbp_location_id = bpl.c_bpartner_location_id
left outer join c_location l on oi.c_location_id=l.c_location_id
left outer join c_country c on l.c_country_id=c.c_country_id
left outer join M_HU_PI_Item_Product pi on pi.M_product_ID = p.M_product_ID
Expand All @@ -18,4 +20,4 @@ left outer join M_Product_Nutrition pn on pn.M_product_ID = p.M_product_ID
left outer join M_Nutrition_Fact nf on nf.M_Nutrition_Fact_ID = pn.M_Nutrition_Fact_ID
left outer join PP_Product_BOM bom on bom.M_Product_ID = p.m_product_id
left outer join PP_Product_BOMLine bomLine on bomLine.pp_product_bom_id = bom.pp_product_bom_id
left outer join m_product bomProduct on bomLine.m_product_id = bomProduct.m_product_id;
left outer join m_product bomProduct on bomLine.m_product_id = bomProduct.m_product_id;

0 comments on commit 3830708

Please sign in to comment.