You have a grid where you can select the StartDate and the EndDate of the vacation, and you have a field for the calculation of the differnce in days between these two fields:
You can override the method leave and use this code for example to calculate the diffrence:
public boolean leave()
{
Boolean ret;
StartDate inputDate;
EndDate refDate;
ret = super();
inputDate = str2Date(strFmt("%1",TestTable.StartDate), 123);
refDate = str2Date(strFmt("%1",TestTable.EndDate), 123);
TestTable.Hours=intvNo(refDate, inputDate, intvScale::YearMonthDay);
return ret;
}
You can override the method leave and use this code for example to calculate the diffrence:
public boolean leave()
{
Boolean ret;
StartDate inputDate;
EndDate refDate;
ret = super();
inputDate = str2Date(strFmt("%1",TestTable.StartDate), 123);
refDate = str2Date(strFmt("%1",TestTable.EndDate), 123);
TestTable.Hours=intvNo(refDate, inputDate, intvScale::YearMonthDay);
return ret;
}
No comments:
Post a Comment