f_getstringformat.srf 558 B

123456789101112131415161718192021222324252627
  1. $PBExportHeader$f_getstringformat.srf
  2. global type f_getstringformat from function_object
  3. end type
  4. forward prototypes
  5. global function string f_getstringformat (integer arg_type, decimal arg_qty)
  6. end prototypes
  7. global function string f_getstringformat (integer arg_type, decimal arg_qty);String rst_format
  8. IF Mod(arg_qty,1) = 0 THEN
  9. IF arg_type = 0 THEN
  10. rst_format = '#####0'
  11. ELSE
  12. rst_format = '#,##0'
  13. END IF
  14. ELSE
  15. IF arg_type = 0 THEN
  16. rst_format = '#####0.####'
  17. ELSE
  18. rst_format = '#,##0.####'
  19. END IF
  20. END IF
  21. return rst_format
  22. end function