Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable=thisform.text1.value
Message
From
03/12/2004 15:28:07
 
 
To
03/12/2004 15:00:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00966809
Message ID:
00966819
Views:
7
hi,
thank you for reply,

this is my program under ,just fetch at "&&" under
PARAMETERS lncurrency

LOCAL lcnothing
LOCAL lcten,lchundred,lcthousand,lcthousand1,lcmillion
LOCAL lnlenstr,lccurrency,lccurdaci,lcriyal
LOCAL lctentxt,lchundredtxt,lcthousandtxt,lcmilliontxt,lcthousandtxt1
LOCAL lctensep,lchundredsep,lcthousandsep,lcthousandsep1,lcmillionsep
LOCAL lcallstr,lchundredver
lcnothing=' ÝÞØ áÇ ÛíÑ'
STORE '' TO lctentxt,lchundredtxt,lcthousandtxt,lcmilliontxt,lcthousandtxt1,lcriyal
STORE '' TO lctensep,lchundredsep,lcthousandsep,lcthousand1sep,lcmillionsep
STORE '0' TO lchundredver,lcthousand1ver,lcthousand1
STORE '00' TO lcten,lcthousand
lccurrency=ALLTRIM(STR(INT(lncurrency))) && will display like 14
lccurdaci=RIGHT(ALLTRIM(STR(lncurrency,11,2)),2)&& will display only decimal side
lnlenstr=LEN(ALLTRIM(STR(INT(lncurrency)))) && will caculate str lenght
IF lnlenstr<1
RETURN .f.
ENDIF

SELECT arver 
*use arver
SET ORDER TO no


IF lccurdaci!='00'
SEEK lccurdaci
lccurdacitxt=ALLTRIM(arvalue)+'  ÓäÊ'
lccurdacisep=' æ'
ELSE
lccurdacitxt=''
lccurdacisep=''
endif
lccurrency=PADL(lccurrency,8,'0')
lcten=lccurrency
lcten=SUBSTR(lccurrency,7,2)
lchundredver=SUBSTR(lccurrency,6,1)
*!*	IF !USED('arver')
*!*	USE arver IN 0
*!*	SET ORDER TO no
*!*	endif
 IF lcten!='00'
  SEEK lcten
  lctentxt=ALLTRIM(arvalue)
 lctensep='æ'
 endif
 lchundred=lchundredver
 IF lchundred!='0'
 lchundred=lchundred+'00'
 SEEK lchundred
 lchundredtxt=ALLTRIM(arvalue)
 lchundredsep=' æ '
 endif
 IF lcten='00'
 lchundredsep=''
 ENDIF
 lcthousand1ver=SUBSTR(lccurrency,3,1)
 lcthousand1=lcthousand1ver
 IF lcthousand1!='0'
  lcthousand1=lcthousand1+'00' 
 SEEK lcthousand1
 lcthousandtxt1=ALLTRIM(arvalue)
 lcthousand1sep=' æ '
 IF lcthousand1='0' AND VAL(SUBSTR(lccurrency,4,2))<3 AND VAL(SUBSTR(lccurrency,4,2))>0
 lcthousandtxt1=ALLTRIM(arvalue)+' ÇáÝ'
 ENDIF
endif 
  lcthousandver=SUBSTR(lccurrency,4,2)
 lcthousand=lcthousandver
 IF lcthousand!='00'
	 IF VAL(SUBSTR(lcthousand,1,2))>10
	  SEEK lcthousand
	    		lcthousandtxt=ALLTRIM(arvalue)+ ' ÃáÝ'
*  		lcthousandtxt=ALLTRIM(arvalue)+ ' ÃáÝÇð'
  		lcthousandsep=' æ'
 	 ENDIF
 	 IF VAL(SUBSTR(lcthousand,1,2))=10
		 lcthousand=lcthousand+'000'
		  SEEK lcthousand
		  lcthousandtxt=ALLTRIM(arvalue)
		  lcthousandsep=' æ'
	ENDIF
	IF VAL(SUBSTR(lcthousand,1,2))<10 
 		lcthousand=SUBSTR(lcthousand,1,2)&&+'00' &&
		 SEEK lcthousand
  		lcthousandtxt=ALLTRIM(arvalue)+' ÇáÝ'
  		lcthousandsep=' æ'
  		IF VAL(SUBSTR(lcthousand,1,2))<10 AND SUBSTR(lccurrency,4,1)='0' AND SUBSTR(lccurrency,3,1)='0'
  		lcthousand=SUBSTR(lcthousand,2,1)+'000' &&
		 SEEK lcthousand
  		lcthousandtxt=ALLTRIM(arvalue)
  		lcthousandsep=' æ'
  		endif
	endif
  ENDIF
  IF lcthousand='00' AND SUBSTR(lccurrency,3,1)!='0'
  		lcthousandtxt=' ÇáÝ'
  		lcthousandsep=' æ'
  ENDIF
  
  IF lcten='00' AND lchundred='0'
  lcthousandsep=''
  endif
 IF lcthousand='00'
 lcthousand1sep=''
 endif
 
 lcmillion=SUBSTR(lccurrency,1,2)
 IF lcmillion!='00'
 IF SUBSTR(lccurrency,2,1)!='0' AND SUBSTR(lccurrency,1,1)='0'
 lcmillion=SUBSTR(lccurrency,2,1)+'000000'
 ENDIF
 IF SUBSTR(lccurrency,1,1)!='0'
   lcmillion=SUBSTR(lccurrency,1,2)
 endif
 SEEK lcmillion
IF SUBSTR(lccurrency,1,1)!='0'
lcmilliontxt=ALLTRIM(arvalue)+' ãáíæä'
ELSE
lcmilliontxt=ALLTRIM(arvalue)
endif
lcmillionsep=' æ '
ENDIF

 IF lcten='00' AND lchundredver='0' AND SUBSTR(lccurrency,4,2)='00'
 lcthousandsep=''
 ENDIF
  IF lcten='00' AND lchundredver='0'
  lchundredsep=''
  ENDIF
 IF lcten='00' AND lchundredver='0' AND lcthousand='00' AND lcthousand1='0'
 lcmillionsep=''
 ENDIF
lccurdacisep1=alLTRIM(lcmilliontxt+lcmillionsep+lcthousandtxt1+lcthousand1sep+lcthousandtxt+lcthousandsep+;
lchundredtxt+lctentxt)
lccurdacisep1=ALLTRIM(lccurdacisep1)
IF LEN(lccurdacisep1)=0 
lccurdacisep=''
IF LEN(lccurdacisep1)=0 AND LEN(lccurdacitxt)=0
lcnothing='  ÕÝÑ ÝÞØ áÇ ÛíÑ '
endif
ENDIF
IF LEN(lccurdacisep1)>0 
*lcriyal='DOLLAR'&&& I NEED SOME TIMES TO CHOICE MARK OR DENAR.
*lcriyal=THISFORM.TEXT26.VALUE&&&&&& THIS WHAT I NEED ELSE
lcriyal=''
endif
lcallstr=ALLTRIM(lcmilliontxt+lcmillionsep+lcthousandtxt1+lcthousand1sep+lcthousandtxt+lcthousandsep+;
lchundredtxt+lchundredsep+lctentxt+lcriyal+lccurdacisep+lccurdacitxt+lcnothing)
select temp
RETURN lcallstr
thank you
m.qasem
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform