Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
So I think that you are saying that the if the client was there all of December, say arrived in November and has not left yet, then December has 31 days so the answer should be 31. But the formula is giving 30, I suspect. So I think that we need to add 1 unless the client discharges during the period.
So we will not break the existing formula, just build on it. That so that is nice thing about using formula variable.
The very last line just says
$DaysStoredPriorMonth
ie, it says to just put put out that value previously calculated.
So let's change that to be
IF(
IsNull($ShipDate), $DaysStoredPriorMonth + Days(1), // still //here, so count Last Day of the month
$ShipDate > $LastDayofPriorMonth,
$DaysStoredPriorMonth + Days(1), //left after EOM, so //count last day
$DaysStoredPriorMonth) // else left during month so don't //charge last day
So we will not break the existing formula, just build on it. That so that is nice thing about using formula variable.
The very last line just says
$DaysStoredPriorMonth
ie, it says to just put put out that value previously calculated.
So let's change that to be
IF(
IsNull($ShipDate), $DaysStoredPriorMonth + Days(1), // still //here, so count Last Day of the month
$ShipDate > $LastDayofPriorMonth,
$DaysStoredPriorMonth + Days(1), //left after EOM, so //count last day
$DaysStoredPriorMonth) // else left during month so don't //charge last day