COMPILE ROUTINE MOVE_QUOTE_PRICE(Dummy)
ROWDEF (CHARSTR)

DECLARE SUBROUTINE SEND_INFO, SEND_DYN, Utility, msg

$INSERT QUOTE_EQU
$INSERT QUOTE_DET_EQU

EQU CRLF$ TO \0D0A\

OPEN 'QUOTE' TO FileIn ELSE
	DEBUG
	GOTO Bail
END

OPEN 'QUOTE_DET' TO FileOut ELSE
	DEBUG
	GOTO Bail
END


SELECT FileIn



RecCnt = 0
Done = 0
ManualList = ''
LOOP
	ReadNext QuoteNo ELSE Done = 1
UNTIL Done
	READ QuoteRec FROM FileIn,QuoteNo THEN
		RecCnt += 1
		IF QuoteRec<QUOTE_QUOTE_DET_KEY$,1> NE '' THEN
			
			READ QuoteDetRec FROM FileOut,QuoteNo:'*1' THEN
				
				Delta = 0
				
				IF QuoteRec<QUOTE_DETAIL$> NE QuoteDetRec<QUOTE_DET_CHG_DESC$>					THEN Delta = 1
				IF QuoteRec<QUOTE_SETUP_CHARGE$> NE QuoteDetRec<QUOTE_DET_CHG_SETUP$>			THEN Delta = 1
				IF QuoteRec<QUOTE_SRP_CHARGE$> NE QuoteDetRec<QUOTE_DET_CHG_SRP$>				THEN Delta = 1
				IF QuoteRec<QUOTE_QUANTITY$> NE QuoteDetRec<QUOTE_DET_CHG_QTY$>					THEN Delta = 1
				IF QuoteRec<QUOTE_PRICE$> NE QuoteDetRec<QUOTE_DET_CHG_PRICE$>					THEN Delta = 1
				
				IF QuoteRec<QUOTE_PROC_STEP$> NE QuoteDetRec<QUOTE_DET_PROC_STEP$> AND QuoteRec<QUOTE_PROC_STEP$> = ''				THEN Delta = 1
				IF QuoteRec<QUOTE_PROC_STEP_PSN$> NE QuoteDetRec<QUOTE_DET_PROC_PSN$> AND QuoteRec<QUOTE_PROC_STEP_PSN$> = ''		THEN Delta = 1
				IF QuoteRec<QUOTE_PROC_STEP_DESC$> NE QuoteDetRec<QUOTE_DET_PROC_DESC$> AND QuoteRec<QUOTE_PROC_STEP_DESC$> = ''	THEN Delta = 1
				
			
				IF Delta THEN
					QuoteRec<QUOTE_DETAIL$>			= QuoteDetRec<QUOTE_DET_CHG_DESC$>
					QuoteRec<QUOTE_SETUP_CHARGE$>	= QuoteDetRec<QUOTE_DET_CHG_SETUP$>
					QuoteRec<QUOTE_SRP_CHARGE$>		= QuoteDetRec<QUOTE_DET_CHG_SRP$>
					QuoteRec<QUOTE_QUANTITY$>		= QuoteDetRec<QUOTE_DET_CHG_QTY$>
					QuoteRec<QUOTE_PRICE$>			= QuoteDetRec<QUOTE_DET_CHG_PRICE$>
					
					QuoteRec<QUOTE_PROC_STEP$>		= QuoteDetRec<QUOTE_DET_PROC_STEP$>
					QuoteRec<QUOTE_PROC_STEP_PSN$>	= QuoteDetRec<QUOTE_DET_PROC_PSN$>
					QuoteRec<QUOTE_PROC_STEP_DESC$>	= QuoteDetRec<QUOTE_DET_PROC_DESC$>
					
				END
				
				ItemNotes = QuoteDetRec<QUOTE_DET_ITEM_NOTES$>
				
				Test = ItemNotes[1,15]
				
				Notes = QuoteRec<QUOTE_NOTES$>
				
				IF INDEX(Notes,Test,1) = 0 THEN
					
					QuoteRec<QUOTE_NOTES$> = QuoteRec<QUOTE_NOTES$>:CRLF$:ItemNotes
					Delta = 1
				END
					
				IF Delta THEN
					WRITE QuoteRec ON FileIn,QuoteNo THEN Send_Info(RecCnt)
				END
				
			END

		END	;* End of check for Quote Det Keys
	END	;* End of Quote Record Read
REPEAT



*UNLOCK All

* * * * * * *
Bail:
* * * * * * *

END
