diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index b2ca6240fff820f9dfce0a30f1e2b2b1faa4c232..08affbf568cb3cbe6e3c05887afd41b5fb9da9ab 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -75,6 +75,12 @@ <fieldName>Attributes</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>5bcda86a-e56c-4a4a-ac13-c6eb68152200</name> + <entityName>Product_entity</entityName> + <fieldName>Attributes</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index a30ac9f67e395688a8cfc780a01d6a71512c2d5b..d366abbdf45c142912563e0a4972de270623c4f3 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -319,6 +319,26 @@ <onActionProcess>%aditoprj%/entity/Product_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> <iconId>NEON:HISTORY</iconId> </entityActionField> + <entityConsumer> + <name>Attributes</name> + <title>Attributes</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>RelationsForSpecificObject</fieldName> + </dependency> + <children> + <entityParameter> + <name>objectType_param</name> + <code>%aditoprj%/entity/Product_entity/entityfields/attributes/children/objecttype_param/code.js</code> + </entityParameter> + <entityParameter> + <name>objectRowId_param</name> + <code>%aditoprj%/entity/Product_entity/entityfields/attributes/children/objectrowid_param/code.js</code> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Product_entity/entityfields/attributes/children/objectrowid_param/code.js b/entity/Product_entity/entityfields/attributes/children/objectrowid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..9635e2f4c42188cc99b051125cf236560cffe564 --- /dev/null +++ b/entity/Product_entity/entityfields/attributes/children/objectrowid_param/code.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("Context_lib"); + +result.string(vars.get("$field.PRODUCTID")); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/attributes/children/objecttype_param/code.js b/entity/Product_entity/entityfields/attributes/children/objecttype_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2 --- /dev/null +++ b/entity/Product_entity/entityfields/attributes/children/objecttype_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/neonView/ProductMain_view/ProductMain_view.aod b/neonView/ProductMain_view/ProductMain_view.aod index 68c00aaceec3ba5a2590cb09dd787ce1f8aeddb4..25005dcfa6938e48918f89633e84960d21ca7a51 100644 --- a/neonView/ProductMain_view/ProductMain_view.aod +++ b/neonView/ProductMain_view/ProductMain_view.aod @@ -39,5 +39,10 @@ <entityField>Documents</entityField> <view>DocumentFilter_view</view> </neonViewReference> + <neonViewReference> + <name>b069dbb1-fa32-41a7-a40c-918d3d50dd26</name> + <entityField>Attributes</entityField> + <view>AttributeRelationFilter_view</view> + </neonViewReference> </children> </neonView> diff --git a/process/Product_lib/process.js b/process/Product_lib/process.js index 33c29bed91e7e06274fb6acb36c78b445aa03ca3..1d51b694be88511c165cc9ccfd30e80e16657cdf 100644 --- a/process/Product_lib/process.js +++ b/process/Product_lib/process.js @@ -36,7 +36,7 @@ ProductUtils.getCurrentProductPrice = function(pid, buySell) { var actualPriceCondition = SqlCondition.begin() .andPrepare("PRODUCTPRICE.BUYSELL", buySell) .andPrepare("PRODUCTPRICE.PRODUCT_ID", pid) - .andPrepare("PRODUCTPRICE.CURRENCY", 1) // TODO: warum ist Currency hardgecoded auf 1?? --> Einheitliche Währungen einbauen (auch zeichen vor oder nach der zahel, etc.) + .andPrepare("PRODUCTPRICE.CURRENCY", 1) // TODO: warum ist Currency hardgecoded auf 1?? --> Einheitliche Währungen einbauen (auch zeichen vor oder nach der zahel, etc.) 1034949 .andPrepare("PRODUCTPRICE.VALID_FROM", today, "# <= ?") .andSqlCondition(SqlCondition.begin() .orPrepare("PRODUCTPRICE.VALID_TO", today, "# >= ?")