Skip to content
Snippets Groups Projects
Commit dcb496e3 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1034878][Bei Auswahl eines...

[Projekt: Entwicklung - Neon][TicketNr.: 1034878][Bei Auswahl eines Angebotsposten soll nur der Artikel und die Menge, Preis und Rabatt eingegeben werden]
parent d7101b16
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
</entityField>
<entityField>
<name>DISCOUNT</name>
<title>Discount</title>
<title>Discount %</title>
</entityField>
<entityField>
<name>GROUPCODEID</name>
......@@ -85,6 +85,7 @@
<title>Unit</title>
<consumer>KeywordQuantityUnits</consumer>
<state>READONLY</state>
<displayValueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/unit/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>VAT</name>
......@@ -166,7 +167,7 @@
<documentation>%aditoprj%/entity/Offeritem_entity/entityfields/info/documentation.adoc</documentation>
<title>Note</title>
<contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/info/valueProcess.js</valueProcess>
<state>READONLY</state>
</entityField>
<entityConsumer>
<name>KeywordProductGroupcodes</name>
......
import("system.db");
import("system.result");
import("system.vars");
import("system.neon");
import("Sql_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
// TODO: loading from db until loading from Consumer is possible.
var productId = vars.get("$field.PRODUCT_ID");
result.string(db.cell(SqlCondition.begin().andPrepareVars("PRODUCT.PRODUCTID", "$field.PRODUCT_ID").buildSql("select INFO from PRODUCT", "1=2")));
}
\ No newline at end of file
......@@ -2,5 +2,5 @@ import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && (vars.get("$this.value") == null || vars.get("$this.value") == ""))
result.string("0");
\ No newline at end of file
......@@ -12,13 +12,15 @@ if(pid != "")
var PriceListFilter = { currency: curr, quantity: vars.get("$field.QUANTITY"), relationId: contactid };
var ProductDetails = ProductUtils.getProductDetails(pid, PriceListFilter);
//TODO: loading from db until loading from Consumer is possible.
var ProductDetails = ProductUtils.getProductDetails(pid, PriceListFilter, ["INFO"]);
if(ProductDetails.productId != undefined)
{
neon.setFieldValue("$field.GROUPCODEID", ProductDetails.groupCode);
neon.setFieldValue("$field.UNIT", ProductDetails.unit);
neon.setFieldValue("$field.ITEMNAME", ProductDetails.productName);
neon.setFieldValue("$field.INFO", ProductDetails.INFO);
if(ProductDetails.PriceListToUse != null)
{
......
import("system.result");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
var unit = vars.get("$field.UNIT");
var viewValue = "";
if (unit)
viewValue = KeywordUtils.getViewValue($KeywordRegistry.quantityUnit(), unit);
result.string(viewValue);
\ No newline at end of file
......@@ -22,6 +22,10 @@
<key>Days</key>
<value>Tage</value>
</entry>
<entry>
<key>Discount %</key>
<value>Rabatt %</value>
</entry>
<entry>
<key>E-Mail</key>
<value>E-Mail</value>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment