PROCEDURE prinbook

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

PRIVATE lnbook_rec,lcAgent
lnbook_rec = RECN('BOOKING')
= get_pnam('Booking Printing')
SELE booking
set orde to client_no in client
set rela to client_no into client addi
IF ! SEEK(BOOKING.MODELCOLNO,'MODELCOL','MODELCOLNO')
	DO ERR_MSG WITH 'MODEL COLOUR INFO. WAS NOT FOUND'
ELSE
	= SEEK(BOOKING.MODELCOLNO,'MODELCOL','MODELCOLNO')	
	= SEEK(MODELCOL.MODEL_NO,'MODEL','MODEL_NO')
ENDIF
IF SEEK(booking.client_no,'client','client_no')
	IF ! EMPTY(CLIENT.AREACODE)
		IF SEEK(CLIENT.AREACODE,'AREA','AREANAME')
		ENDIF 
	ENDIF 
ENDIF 
lcAgent = ' ' 
if ! empt(booking.agent_no)
	IF SEEK(booking.agent_no,'AGENT','AGENT_NO')
		lcAgent = agent.agent		
	ENDIF 
eNDIF
DO prinrepo WITH 'WPRINBOOK','PRINBOOK','','',1,.F.
GO (lnbook_rec) IN booking
set rela off into client


