
= GET_PDT('SUPPLYER PAYMENT SLIP REPORT')


WAIT WIND '!!! WAIT !!! GATHERING DATA USING SQL ...' NOWA

SELECT SUPLPAY.ENTRY_NO,SUPLPAY.ENTRY_DT,SUPLPAY.PAY_MODE,SUPLPAY.CHEQUE_NO,;
		SUPLPAYBDY.AMOUNT, CLIENT.CLIENT, CLIENT.MODELCOLNO, CLIENT.ENGINE_NO,;
		CLIENT.CHASIS_NO,LEDGER.ACCOUNT,LEDGER.ADD1,LEDGER.ADD2,LEDGER.ADD3,;
		LEDGER.CITY,LEDGER.PIN,A.ACCOUNT CRACCOUN;
	FROM SUPLPAY, SUPLPAYBDY,CLIENT,LEDGER,LEDGER A;
	WHERE BETWEEN(SUPLPAY.ENTRY_DT,DATE1,DATE2);
		AND SUPLPAY.ENTRY_NO = SUPLPAYBDY.ENTRY_NO ;
		AND SUPLPAYBDY.CHASIS_NO = CLIENT.CHASIS_NO;	
		AND SUPLPAY.SUPPLIERNO = LEDGER.ACCOUNT_NO;
		AND SUPLPAY.CREDIT_AC = A.ACCOUNT_NO;
	ORDER BY SUPLPAY.ENTRY_NO;
	INTO CURSOR QUERY
SELECT QUERY
		
		
*!*	INDEX ON DEALER_COD TAG DEALER_COD ADDI
*!*	SET ORDER TO DEALER_COD IN DEALER
*!*	SET RELATION TO DEALER_COD INTO DEALER ADDI 


IF _TALLY > 0
	WAIT WINDOW 'GENERATING REPORT.........' NOWAIT
	DO PRINREPO WITH 'WNSUPLPA','NSUPLPAY','','',0,.F.
ENDIF
USE IN QUERY

DO CLS_MENU