PROCEDURE SEOD PARAMETER mPass_Reg *TMT Added declaration of ShellExecute to main code. DECLARE LONG ShellExecute in "shell32.dll" long hwnd, string lpszOp, ; string lpszFile, string lpszParams, ; string lpszDir, long nShowCmd mTerm = IIF(TYPE('mPass_reg') = 'C',INT(VAL(mPass_reg)),mPass_reg) IF mTerm = 0 WAIT WINDOW ' Passed Register number is Zero ' ENDIF SET TABLEVALIDATE TO 0 SET STATUS OFF SET TALK OFF SET ECHO OFF SET HISTORY TO 0 SET HISTORY OFF SET SYSMENU OFF SET SAFETY OFF SET DELETED ON SET EXCL OFF SET DEVELOPMENT OFF SET DOHISTORY OFF SET EXACT ON SET PATH TO .\DBF SET ESCAPE OFF SET REPROCESS TO AUTO SET RESOURCE OFF SET HELP OFF SET CENTURY ON SET CPDIAL OFF DO SEOD_B WITH .F. RETURN PROCEDURE SEOD_B PARAMETER mOnLine_2, mP_Prt IF NOT FILE('ALLOW_SEOD.TXT') IF USED('POSCONFG') IF POSCONFG.RX1 ****************************** * CHECK FOR OPEN POS ****************************** ON ERROR DO POSERR WITH ERROR() SELECT INVENTRY USE SELECT 0 USE INVENTRY EXCLUSIVE ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO() IF NOT USED('INVENTRY') =MESSBOX('A POS session is active on another computer. Please exit the session and try again.') SELECT 0 USE INVENTRY RETURN ENDIF ****************************** * CHECK FOR OPEN EZSIGN ****************************** ON ERROR DO POSERR WITH ERROR() SELECT 0 USE \EZSIGN\CC_SALES EXCLUSIVE ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO() IF NOT USED('CC_SALES') =MESSBOX('A Credit Card Processing session is active on another computer. Please exit the session and try again.') RETURN ENDIF SELECT CC_SALES USE ****************************** * CHECK FOR OPEN EZSIGN ****************************** ON ERROR DO POSERR WITH ERROR() SELECT 0 USE \ORDER\DBF\REORDER EXCLUSIVE ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO() IF NOT USED('REORDER') =MESSBOX('An Inventory Control session is active on another computer. Please exit the session and try again.') RETURN ENDIF SELECT REORDER USE ENDIF ENDIF ENDIF PUBLIC mExit_System mExit_System = .f. DO FORM frmseod IF USED('INVENTRY') SELECT INVENTRY USE SELECT 0 USE INVENTRY ENDIF IF mExit_System CLOSE DATABASES CLOSE TABLES ALL RELEASE ALL QUIT ENDIF RETURNYou can see when we calll this from our POPUPS menu, this is the command we give....
ON SELECTION BAR 8 OF ShiftChang DO SEod_B WITH .T. IN SEODSo this calls SEOD_B in SEOD, passes over .T. to mONLINE_2, which is a PARAMETER.
thisform.edtmessage.Value = ; 'The Store End of Day should only be run after all cash reigsters' + CHR(13) + ; 'have been reconciled. Please make sure all other cash registers' + CHR(13) + ; 'are at the Windows Desktop, and the selected printer is Online' + CHR(13) + ; 'with ample paper for the End of Day Reports.' + CHR(13)and the
IF NOT mOnline_2 Thisform.cmdexecute.Click ENDIFand Thisform.cmdexecute.click runs a bunch of other EOD programs....