IF noyes('No other user Must be working in this year' + CHR(13) + 'while you are runing this option' + CHR(13) + 'Are you sure ?') = 'NO'
	RETURN .F.
ENDIF
DO ADDFIELD WITH 'job_mast','oldbillno','c(7)'	&& DT. 12/07/06  && PRITEN
SELECT job_mast
SET ORDER TO bill_dt
REPLACE ALL oldbillno WITH bill_no
SELECT dist LEFT(job_mast.bill_no,2) as billseries ;
	FROM job_mast ;
	GROUP BY 1 ;
	INTO CURSOR billlist
SELECT billlist
SCAN FOR ! EMPTY(billseries)
	PRIVATE lcBillSeries 
	lcBillSeries = billseries
	SELECT job_mast
	lnsr_no = 0
	SCAN FOR oldbill_no = lcBillSeries
		lnsr_no = lnsr_no + 1
		lcbill_no = ALLTRIM(lcBillSeries) + PADL(ALLTRIM(STR(lnsr_no)),LEN(bill_no) - LEN(lcBillSeries),'0')
		REPLACE bill_no WITH lcbill_no
	ENDSCAN 
ENDSCAN 
