home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a085 / 1.ddi / EXP15_1.PRG < prev    next >
Encoding:
Text File  |  1994-01-13  |  1.3 KB  |  45 lines

  1. *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤ 
  2. *⌐ª      Program: EXP15_1.PRG                                          ⌐ª
  3. *⌐ª     Function: SQL ╡─ SELECT ├ⁿ┴ε╩╣╙├└²                             ⌐ª
  4. *⌐ª   DBF & File: MAN.DBF                                              ⌐ª
  5. *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
  6. SET TALK OFF
  7. CLEAR ALL
  8. CLEAR
  9. SELECT NAME ,;
  10.        china(BIRTHDAY) AS BIRTHDAY,;
  11.        TRANSFORM(SALARY,"$$$,$$$.99") AS SALARY,;
  12.        taxamount(SALARY) AS TAX_AMOUNT,;
  13.        IIF(SEX,"─╨","┼«") AS SEX;
  14.        FROM MAN
  15.  
  16. * ╫¬╗╗│╔╓╨╩╜╚╒╞┌╕±╩╜╡─║»╩² china
  17. FUNCTION china
  18. PARAMETERS mDATE
  19. YY=SUBSTR(DTOC(mDATE),7,2)
  20. MM=SUBSTR(DTOC(mDATE),1,2)
  21. DD=SUBSTR(DTOC(mDATE),4,2)
  22. chinadate=YY+"─Ω"+MM+"╘┬"+DD+"╚╒"
  23. RETURN chinadate
  24.  
  25. * ░┤▓╗═¼╩╒╚δ╡─╦░┬╩╝╞╦π╦∙╙ª╜╗╦░
  26. FUNCTION taxamount
  27. PARAMETERS mSALARY
  28. PRIVATE taxrate
  29.     DO CASE
  30.        CASE mSALARY>=3000
  31.             taxrate=0.35
  32.        CASE mSALARY>=2000
  33.             taxrate=0.3
  34.        CASE mSALARY>=1500
  35.             taxrate=0.25
  36.        CASE mSALARY>=1000
  37.             taxrate=0.2
  38.        CASE mSALARY>=800
  39.             taxrate=0.1
  40.        CASE mSALARY>=0
  41.             taxrate=0.0
  42.     ENDCASE
  43. tax=TRANSFORM(VAL(PADR(SALARY*taxrate,8)),"$$$,$$$.99")
  44. RETURN tax
  45.