Forum Discussion
ChayceDuncan2
7 years agoQrew Cadet
The extensions as its written above will go on in perpetuity. I don't know what field you would use in particular to 'close' the contract to stop that from happening - but you would add a piece in the numberOfRenewals bit to have it stop if you have a 'Termination Date' or equivalent.
So something like:
var number numberOfRenewals = ToDays(Today()-$initialExpiration endInitial) / [Renewal (Days)];
would become instead:
var number numberOfRenewals =
ToDays(
if( not isnull([Termination Date]), [Termination Date], Today()) - $initialExpiration endInitial) / [Renewal (Days)]);
So in the event that you have actually closed the contract - the # of Renewals would calculate up to when you decided to close it - and set the expiration date up to that point instead of going on endlessly.
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
So something like:
var number numberOfRenewals = ToDays(Today()-$initialExpiration endInitial) / [Renewal (Days)];
would become instead:
var number numberOfRenewals =
ToDays(
if( not isnull([Termination Date]), [Termination Date], Today()) - $initialExpiration endInitial) / [Renewal (Days)]);
So in the event that you have actually closed the contract - the # of Renewals would calculate up to when you decided to close it - and set the expiration date up to that point instead of going on endlessly.
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base