Is it possible to make a Read Only element writable if the Invoice_Date element falls within the current month?
What I'm trying to do is "lock in" invoice values once the month changes, so no one can go back and muck with the sales figures once they've been booked to our accounting system. During the current month they can do whatever they like.
I have no problem with the ReadOnly() command, it's the test against this month that has me puzzled.
I tried this with no success:
// Sets the breakout elements to writable for Admin, and other users within the current month
IF ( ( @MONTH(Invoice_Date) = @MONTH(@Date)) AND (@YEAR(Invoice_Date) = @YEAR(@Date) ) OR (@Group = "Admin") )
THEN
{
ReadOnly(Portion_Rigging, 0)
ReadOnly(Portion_Trans, 0)
ReadOnly(Portion_Crane, 0)
ReadOnly(Portion_Storage, 0)
ReadOnly(Portion_Heli, 0)
}
Thanks in advance for any pointers.