f_getwrkprice.srf 652 B

1234567891011121314151617181920212223242526272829
  1. $PBExportHeader$f_getwrkprice.srf
  2. global type f_getwrkprice from function_object
  3. end type
  4. forward prototypes
  5. global function long f_getwrkprice (string arg_mtrlcode, string arg_procode)
  6. end prototypes
  7. global function long f_getwrkprice (string arg_mtrlcode, string arg_procode);Long rslt = 0
  8. Decimal price
  9. select ISNULL(u_sc_workprice.workPrice,0) into :price
  10. from u_sc_workprice inner join u_mtrldef
  11. on u_sc_workprice.Mtrlid=u_mtrldef.mtrlid
  12. where u_mtrldef.mtrlcode=:arg_mtrlcode
  13. and u_sc_workprice.procode=:arg_procode;
  14. IF sqlca.SQLCode <> 0 THEN
  15. rslt = 0
  16. GOTO ext
  17. END IF
  18. rslt = price
  19. ext:
  20. RETURN rslt
  21. end function