PROCEDURE prinrecpt

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,lcrepnam
lnrecpt_rec = RECN('RECEIPT')
= get_oprin('Receipt Printing')
SELE receipt
lnamt_recvd = getrecpt(receipt.client_no)
GO lnrecpt_rec IN receipt
*!*	IF SEEK(client_no,'CLIENT','CLIENT_NO')
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 ! SEEK(receipt.client_no,'BOOKING','CLIENT_NO')
	DO err_msg WITH 'Booking was not found'
ENDIF 
*!*	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

