= profseek(job_mast.client_no,'CLIENT','CLIENT_NO')
if job_mast.servicetyp = 'F'
	do case
		case betw((job_mast.job_dt - client.sale_dt),211,270)
			ldnext_dt = client.sale_dt + 330
			lnnxt_kms = 11000
			lcsrvtype = 'FREE'
			lcsrvseq = '06'
		case betw((job_mast.job_dt - client.sale_dt),151,210)
			ldnext_dt = client.sale_dt + 270
			lnnxt_kms = 9000
			lcsrvtype = 'FREE'
			lcsrvseq = '05'
		case betw((job_mast.job_dt - client.sale_dt),91,150)
			ldnext_dt = client.sale_dt + 210
			lnnxt_kms = 7000
			lcsrvtype = 'FREE'
			lcsrvseq = '04'
		case betw((job_mast.job_dt - client.sale_dt),21,90)
			ldnext_dt = client.sale_dt + 150
			lnnxt_kms = 5000
			lcsrvtype = 'FREE'
			lcsrvseq = '03'
		case betw((job_mast.job_dt - client.sale_dt),0,20)
			ldnext_dt = client.sale_dt + 90
			lnnxt_kms = 2500
			lcsrvtype = 'FREE'
			lcsrvseq = '02'
	endcase			
endif

if job_mast.servicetyp = 'R'
	do case
		case betw((job_mast.job_dt - client.sale_dt),751,810)
			ldnext_dt = client.sale_dt + 870
			lnnxt_kms = 29000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),691,750)
			ldnext_dt = client.sale_dt + 810
			lnnxt_kms = 27000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),631,690)
			ldnext_dt = client.sale_dt + 750
			lnnxt_kms = 25000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),571,630)
			ldnext_dt = client.sale_dt + 690
			lnnxt_kms = 23000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),511,570)
			ldnext_dt = client.sale_dt + 630
			lnnxt_kms = 21000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),451,510)
			ldnext_dt = client.sale_dt + 570
			lnnxt_kms = 19000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),391,450)
			ldnext_dt = client.sale_dt + 510
			lnnxt_kms = 17000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),331,390)
			ldnext_dt = client.sale_dt + 450
			lnnxt_kms = 15000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
		case betw((job_mast.job_dt - client.sale_dt),271,330)
			ldnext_dt = client.sale_dt + 390
			lnnxt_kms = 13000
			lcsrvtype = 'PAID WAR.'
			lcsrvseq = ''
			
		other
			ldnext_dt = job_mast.job_dt + 60
			lnnxt_kms = job_mast.kms + 2000
			lcsrvtype = 'REGULAR'
			lcsrvseq = ''
	endcase			
endif