f_outware_savelock_cancel.srf 728 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. $PBExportHeader$f_outware_savelock_cancel.srf
  2. global type f_outware_savelock_cancel from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_outware_savelock_cancel (long arg_storageid, ref string arg_msg)
  6. end prototypes
  7. global function integer f_outware_savelock_cancel (long arg_storageid, ref string arg_msg);Int rslt = 1
  8. IF sys_option_outware_save_lock = 0 THEN
  9. rslt = 1
  10. GOTO ext
  11. END IF
  12. UPDATE u_outware_save_lock
  13. SET iflock = 0
  14. Where storageid = :arg_storageid;
  15. IF sqlca.SQLCode <> 0 THEN
  16. arg_msg = '出仓单仓库保存锁定标记解除失败,'+sqlca.SQLErrText
  17. rslt = 0
  18. GOTO ext
  19. END IF
  20. ext:
  21. IF rslt = 0 THEN
  22. ROLLBACK;
  23. ELSE
  24. COMMIT;
  25. END IF
  26. RETURN rslt
  27. end function