Skip to content
Snippets Groups Projects
Commit dfdd1dab authored by Mohamed Mansour's avatar Mohamed Mansour
Browse files

Fixed delivery and payment terms bug. Updated preview view.

parent 6b50e027
No related branches found
No related tags found
No related merge requests found
......@@ -499,6 +499,7 @@
<name>DUNNINGDATE</name>
<title>Dunning date</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<stateProcess>%aditoprj%/entity/Order_entity/entityfields/dunningdate/stateProcess.js</stateProcess>
</entityField>
<entityField>
......@@ -506,6 +507,7 @@
<title>Dunning level</title>
<consumer>KeywordDunningLevels</consumer>
<stateProcess>%aditoprj%/entity/Order_entity/entityfields/dunninglevel/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/dunninglevel/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>PAYDATE</name>
......@@ -706,6 +708,12 @@
<contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/dunningtext/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>OrderPaymentTerm_param</name>
</entityParameter>
<entityParameter>
<name>OrderDeliveryTerm_param</name>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -904,6 +912,14 @@
<name>DUNNINGTEXT.value</name>
<recordfield>SALESORDER.DUNNINGTEXT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>DELIVERYTERMS.displayValue</name>
<expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/deliveryterms.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PAYMENTADDRESS.displayValue</name>
<expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/paymentaddress.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
<indexRecordContainer>
......
import("system.neon");
import("system.result");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string(KeywordUtils.getViewValue($KeywordRegistry.deliveryTerm(), vars.get("$field.DELIVERYTERMS")));
......@@ -7,11 +7,13 @@ import("system.vars");
import("Attribute_lib");
import("Contact_lib");
if (vars.exists("$param.OfferDeliveryTerm_param") && vars.get("$param.OfferDeliveryTerm_param"))
if (vars.exists("$param.OrderDeliveryTerm_param") && vars.get("$param.OrderDeliveryTerm_param"))
{
result.string(vars.get("$param.OfferDeliveryTerm_param"));
result.string(vars.get("$param.OrderDeliveryTerm_param"));
}
else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
{
var presetValue = "";
var contactIds = ContactUtils.getPersOrgIds(vars.getString("$field.CONTACT_ID"))
......
import("system.result");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string(KeywordUtils.getViewValue($KeywordRegistry.dunningLevel(), vars.get("$field.DUNNINGLEVEL")));
......@@ -8,11 +8,11 @@ import("system.vars");
import("Attribute_lib");
if (vars.get("$this.value") == null) {
if (vars.exists("$param.OfferPaymentTerm_param") && vars.get("$param.OfferPaymentTerm_param"))
if (vars.exists("$param.OrderPaymentTerm_param") && vars.get("$param.OrderPaymentTerm_param"))
{
result.string(vars.get("$param.OfferPaymentTerm_param"));
result.string(vars.get("$param.OrderPaymentTerm_param"));
}
else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
{
var presetValue = "";
var contactIds = ContactUtils.getPersOrgIds(vars.getString("$field.CONTACT_ID"))
......
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.deliveryTerm(), "SALESORDER.DELIVERYTERMS");
result.string(sql);
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.paymentTerm(), "SALESORDER.PAYMENTTERMS");
result.string(sql);
\ No newline at end of file
......@@ -29,8 +29,8 @@
<entityField>ORDERDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>8d780ff6-9ca0-4067-b2b1-6e092c62253e</name>
<entityField>STATUS</entityField>
<name>beb2d15c-6ed9-41fb-b59b-f874568a9896</name>
<entityField>ORDERTYPE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>49e446b5-015e-45ad-9417-c5c50f9756f1</name>
......@@ -45,8 +45,8 @@
<entityField>DUNNINGLEVEL</entityField>
</entityFieldLink>
<entityFieldLink>
<name>f4fa76f2-41c2-48ec-84ee-e901c03a072f</name>
<entityField>SALESORDERDATE</entityField>
<name>22013ee3-0ea1-4830-affd-73429ebd18f5</name>
<entityField>PAYDATE</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
......
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