Heloo Experts, How to block the sales voucher entry for a certain period of time?? For eg., I need to control the entries from eve 8 to morng 8 .....I have tried on basic code given below..whick is working gud for a from time input but how to add that sceduled time of From time and To time.... any experts give me any ideas/suggestions pls..... [#Form:salescolor] Control:$$String:$$MachineTime="18:00"
From Logic Point of view -- I think you need to concatenate the DATE and TIME as a STRING ...... BTW 8:00 pm is 20 Hrs and not 18 Hrs ---- 12/oct/2023 + 20:00 -- as a variable1 or UDf1 13/Oct/2023 + 08:00 -- as a variable2 or UDf2 Then use #FldName between UDF1 and UDF2
Gud morning sir, And am really sry as I couldn't get ur suggestion properly sir....I really got stuck on the code I have used above...and dont have any idea what to do nxt.... Can u plz jst explain me once again how does the scheduled time work....else automatically without using udf's how to control the sales entry between the two times of (evng 8 pm To morning 8 Am ) everyday sir... If the udf's is must if I create two fields one for FROM time another for TO time..thn how to combine the field in [#form:salescolor] sir
use following code for your reference set time as 24 hours clock Code: [#Report:Voucher] Set:vchLockStrTime:"16:00" Set:vchLockEndTime:"20:00" [#Form:Voucher] On:Form Accept:Yes:Form Accept Add:Control:IsintimeCtr:@@IsTimePass [System:Formula] IsTimePass: $$Time:$$MachineTime > ##vchLockStrTime and $$Time:$$MachineTime < ##vchLockEndTime IsintimeCtr:"Not allowed any entries within time from " + $$String:##vchLockStrTime + " to " + $$String:##vchLockEndTime [Variable:vchLockStrTime] Type:Time Persistent : Yes [Variable:vchLockEndTime] Type:Time Persistent : Yes [System:Variable] vchLockStrTime:"21:00" vchLockEndTime:"06:00"