PROCEDURE prinrecp

IF BOF() OR EOF()
	DO err_beep
	DO alert WITH '!!! ERROR !!!;No receipt found for printing;;Pressed key has no menaning here'
	RETU
ENDIF

PRIVATE lnrecpt_rec,lcalias
lcalias = ALIAS()
lnrecpt_rec = RECN('RECEIPT')
= get_pnam('Receipt Printing')
SELE receipt
lnamt_recvd = getrecpt(receipt.client_no)
GO lnrecpt_rec IN receipt
IF SEEK(ALLTRIM(client.modelcolno),'MODELCOL','MODELCOLNO')
	IF SEEK(MODELCOL.MODEL_NO,'MODEL','MODEL_NO')
	ENDIF 
ENDIF
IF SEEK(client.client_no,'SALEMAST','CLIENT_NO')
ENDIF
IF EMPTY(gcsrname)
	DO prinrepo WITH 'wsalesreceipt','recept_1','','',1
ELSE
	lcrepnam = gcsrname + '.FRX'
	IF ! FILE(lcrepnam)			
		MESSAGEBOX("Please copy REPORT file and try again ...","AUTOSOFT",0+64)
	ELSE 			
		DO prinrepo WITH '',gcsrname,'','',1
	ENDIF 			
ENDIF 
GO (lnrecpt_rec) IN receipt
IF ! EMPTY(lcalias)
	SELECT (lcalias)
ENDIF
*DO out_repo WITH .T.,'RECEIPT PRINTING;80'