home *** CD-ROM | disk | FTP | other *** search
- *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤
- *⌐ª Program: EXP15_1.PRG ⌐ª
- *⌐ª Function: SQL ╡─ SELECT ├ⁿ┴ε╩╣╙├└² ⌐ª
- *⌐ª DBF & File: MAN.DBF ⌐ª
- *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
- SET TALK OFF
- CLEAR ALL
- CLEAR
- SELECT NAME ,;
- china(BIRTHDAY) AS BIRTHDAY,;
- TRANSFORM(SALARY,"$$$,$$$.99") AS SALARY,;
- taxamount(SALARY) AS TAX_AMOUNT,;
- IIF(SEX,"─╨","┼«") AS SEX;
- FROM MAN
-
- * ╫¬╗╗│╔╓╨╩╜╚╒╞┌╕±╩╜╡─║»╩² china
- FUNCTION china
- PARAMETERS mDATE
- YY=SUBSTR(DTOC(mDATE),7,2)
- MM=SUBSTR(DTOC(mDATE),1,2)
- DD=SUBSTR(DTOC(mDATE),4,2)
- chinadate=YY+"─Ω"+MM+"╘┬"+DD+"╚╒"
- RETURN chinadate
-
- * ░┤▓╗═¼╩╒╚δ╡─╦░┬╩╝╞╦π╦∙╙ª╜╗╦░
- FUNCTION taxamount
- PARAMETERS mSALARY
- PRIVATE taxrate
- DO CASE
- CASE mSALARY>=3000
- taxrate=0.35
- CASE mSALARY>=2000
- taxrate=0.3
- CASE mSALARY>=1500
- taxrate=0.25
- CASE mSALARY>=1000
- taxrate=0.2
- CASE mSALARY>=800
- taxrate=0.1
- CASE mSALARY>=0
- taxrate=0.0
- ENDCASE
- tax=TRANSFORM(VAL(PADR(SALARY*taxrate,8)),"$$$,$$$.99")
- RETURN tax