Skip to content
Snippets Groups Projects
Commit 40aa8a39 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

fix contract

parent 7c7be831
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@
<name>CONTRACTTYPE</name>
<title>Type of contract</title>
<consumer>ContractTypes</consumer>
<mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/Contract_entity/entityfields/contracttype/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
......
......@@ -5,5 +5,5 @@ import("Entity_lib");
var cEnd = vars.get("local.value");
var cDue = vars.get("$field.CONTRACTDUE");
if (cDue != "" && cDue > cEnd)
if (cDue && cEnd && cDue > cEnd)
vars.set("$field.CONTRACTDUE", cEnd);
\ No newline at end of file
......@@ -9,7 +9,7 @@ var endDate = vars.get("$field.CONTRACTEND");
var errorMessage = "";
if (!DateUtils.validateBeginnBeforeEnd(startDate, endDate))
if (endDate && !DateUtils.validateBeginnBeforeEnd(startDate, endDate))
errorMessage = DateUtils.getValidationFailString();
// check Duedate
......
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