Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count
Message
From
14/05/2004 08:11:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Count
Miscellaneous
Thread ID:
00904014
Message ID:
00904014
Views:
62
hi;

i write this code to compute salarys for emplyees for one year

when i run this code ,take atime,
any new idea.
***********************
CLOSE ALL
SELECT 4
USE tax1 EXCL
ZAP
SELECT 1
USE mstr
m.no=no
m.nam=nam
m.nam2=nam2
m.nam3=nam3
m.nam4=nam4

DO WHILE .T.

	SELECT 2
	USE month1
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (1)jan "
		REPLACE montNO WITH 2
	ENDIF


	SELECT 2
	USE month2
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (2)feb "
		REPLACE montNO WITH 2
	ENDIF

	SELECT 3
	USE month3
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (3)  march "
		REPLACE montNO WITH 3
	ENDIF

	SELECT 5
	USE month4
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (4)  april "
		REPLACE montNO WITH 4
	ENDIF

	SELECT 6
	USE month5
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (5) may "
		REPLACE montNO WITH 5
		REPLACE no WITH m.no
	ENDIF



	SELECT 7
	USE month6
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (6)  june "
		REPLACE montNO WITH 6
	ENDIF

	SELECT 8
	USE month7
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1

		REPLACE MONTHNAM WITH " (7) july"
		REPLACE montNO WITH 7
	ENDIF

	SELECT 2
	USE month8
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (8) august "
		REPLACE montNO WITH 8
	ENDIF



	SELECT 2
	USE month9
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (9) sept "
		REPLACE montNO WITH 9
	ENDIF


	SELECT 2
	USE month10
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (10) oct"
		REPLACE montNO WITH 10
	ENDIF


	SELECT 2
	USE month11
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (11) nov"
		REPLACE montNO WITH 11
	ENDIF

	SELECT 2
	USE month12
	LOCATE FOR no=m.no
	IF FOUND()
		DO APP1
		REPLACE MONTHNAM WITH " (12) dec"
		REPLACE montNO WITH 12
	ENDIF


	SELECT 1

	SKIP
	m.no=no
	m.nam=nam
	m.nam2=nam2
	m.nam3=nam3
	m.nam4=nam4

	IF EOF()
		EXIT
	ENDIF
ENDDO

PROCEDURE APP1
SCATTER MEMVAR
*M.SALA1=SALA1
*M.SETSAL=SETSAL
*m.net=nettot
*m.cut5=cut5
*m.cut4=cut4
*m.cut3=cut3
*m.cut2=cut2
*m.cut1=cut1
*M.TOTCUT=TOTCUT
? no,nettot
*WAIT
SELECT 4
APPEND BLANK
GATHER MEMVAR

*replace no with m.no
*replace nettot with m.net
*replace cut5 with m.cut5
*replace cut4 with m.cut4
*replace cut3 with m.cut3
*replace cut2 with m.cut2
*replace cut1 with m.cut1


*replace SALA1 with m.SALA1
*replace SETSAL with m.SETSAL
*replace no with m.no
*replace nam with m.nam
*replace nam2 with m.nam2
*replace nam3 with m.nam3
*replace nam4 with m.nam4
Next
Reply
Map
View

Click here to load this message in the networking platform