uo_asset.sru 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. $PBExportHeader$uo_asset.sru
  2. forward
  3. global type uo_asset from nonvisualobject
  4. end type
  5. type s_attachastmx from structure within uo_asset
  6. end type
  7. end forward
  8. type s_attachastmx from structure
  9. string attachastname
  10. string spectype
  11. string unit
  12. decimal {0} amount
  13. decimal {0} sumcount
  14. datetime startdate
  15. string memo
  16. end type
  17. global type uo_asset from nonvisualobject
  18. end type
  19. global uo_asset uo_asset
  20. type variables
  21. Long assetcardid //固定资产自动增量ID
  22. String assetcardcode //固定资产编号
  23. String assetcardname//固定资产名称
  24. String spectype//规格型号
  25. Long assetypeid//固定资产类别
  26. Long deptid//所属部门
  27. Long incrdecrid//增减方式
  28. String Location//存放位置
  29. Long usedtypeid//使用状况
  30. Long deprediateid//折旧方法
  31. DateTime startdate//入帐日期
  32. Long workload//预计使用月份
  33. Long usedall//已计提月份
  34. String unit//工作量单位
  35. Decimal rawvalue//入帐原值
  36. Decimal usedvalue//累计折旧
  37. Decimal remainrate//预计残值率
  38. Decimal remainvalue//预计剩残值
  39. Decimal deprrate//月折旧率
  40. Decimal deprvalue//月折旧额
  41. String subid //对应折旧科目
  42. Int initflag //初始化标记
  43. String othersubid //对方科目
  44. String dscrp //摘要
  45. String assetsubid //固定资产会计科目
  46. String deprsubid //累计折旧会计科目
  47. Long credid
  48. PRIVATE:
  49. S_attachastmx attachastmx[] //明细结构数组
  50. Long it_MXBT = 0 //明细结构数组末指针
  51. Boolean IT_NEWBEGIN = FALSE //新建标志
  52. Boolean IT_UPDATEBEGIN = FALSE//修改标志
  53. end variables
  54. forward prototypes
  55. public function integer newbegin ()
  56. public function integer p_clearmx ()
  57. public function integer p_reset ()
  58. public function integer acceptmx (string arg_attachastname, string arg_spectype, string arg_unit, decimal arg_amount, decimal arg_sumcount, datetime arg_startdate, string arg_memo, ref string arg_msg)
  59. public function integer getinfo (long arg_assetcardid, ref string arg_msg)
  60. public function integer updatebegin (long arg_assetcardid, string arg_msg)
  61. public function integer del (long arg_assetcardid, ref string arg_msg, boolean arg_ifcommit)
  62. public function integer save (long arg_assetcardid, ref string arg_msg, boolean arg_ifcommit)
  63. public function integer check_data (ref string arg_msg)
  64. public function integer update_clearflag (long arg_assetcardid, int arg_flag, ref string arg_msg, boolean arg_ifcommit)
  65. end prototypes
  66. public function integer newbegin ();//newbegin()
  67. //从置对象,准备建立新凭证
  68. //0 fail 1 success
  69. LONG RSLT=1,CNT=0
  70. p_reset()
  71. it_newbegin=TRUE
  72. it_updatebegin=FALSE
  73. IF RSLT=0 THEN p_reset()
  74. return RSLT
  75. end function
  76. public function integer p_clearmx ();//INT p_clearmx()
  77. //清除明细
  78. it_mxbt=0
  79. RETURN 1
  80. end function
  81. public function integer p_reset ();//INT p_RESET()
  82. //清除对象及其明细
  83. assetcardid=0
  84. it_newbegin=FALSE
  85. it_updatebegin=FALSE
  86. //清除明细
  87. P_CLEARMX()
  88. RETURN 1
  89. end function
  90. public function integer acceptmx (string arg_attachastname, string arg_spectype, string arg_unit, decimal arg_amount, decimal arg_sumcount, datetime arg_startdate, string arg_memo, ref string arg_msg);//acceptmx(arg_attachastname,arg_spectype,arg_unit,arg_amount,
  91. // arg_sumcount,arg_startdate,arg_memo,arg_msg)
  92. //RETURN 0 fail 1 success
  93. // 函数增加固定资产附加设备
  94. long rslt=1,cnt=0
  95. IF it_newbegin=FALSE AND it_updatebegin=FALSE THEN
  96. rslt=0
  97. arG_MSG="非编辑状态不可以使用,操作取消"
  98. goto ext
  99. END IF
  100. //清除空值
  101. IF ISNULL(arg_attachastname) THEN arg_attachastname=''
  102. IF ISNULL(arg_spectype) THEN arg_spectype=''
  103. IF ISNULL(arg_unit) THEN arg_unit=''
  104. IF ISNULL(arg_amount) THEN arg_amount=0
  105. IF ISNULL(arg_sumcount)then arg_sumcount=0
  106. IF ISNULL(arg_memo)THEN arg_memo=''
  107. if arg_attachastname='' then
  108. rslt=0
  109. arg_msg='请输入附属设备名称'
  110. goto ext
  111. end if
  112. if arg_amount=0 then
  113. rslt=0
  114. arg_msg='请输入附属设备数量'
  115. goto ext
  116. end if
  117. if arg_amount=0 then
  118. rslt=0
  119. arg_msg='请输入附属设备金额'
  120. goto ext
  121. end if
  122. //写入内容
  123. it_mxbt++
  124. attachastmx[it_mxbt].attachastname=arg_attachastname
  125. attachastmx[it_mxbt].spectype=arg_spectype
  126. attachastmx[it_mxbt].unit=arg_unit
  127. attachastmx[it_mxbt].amount=arg_amount
  128. attachastmx[it_mxbt].sumcount=arg_sumcount
  129. attachastmx[it_mxbt].startdate=arg_startdate
  130. attachastmx[it_mxbt].memo=arg_memo
  131. ext:
  132. IF rslt=0 THEN p_clearmx()
  133. return(rslt)
  134. end function
  135. public function integer getinfo (long arg_assetcardid, ref string arg_msg);//取固定资产信息
  136. int rslt=1
  137. IF arg_assetcardid<=0 THEN
  138. rslt=0
  139. assetcardid=0
  140. arg_msg='固定资产ID错误'
  141. goto ext
  142. end if
  143. SELECT cw_assetcard.assetcardcode,
  144. cw_assetcard.assetcardname,
  145. cw_assetcard.spectype,
  146. cw_assetcard.assetypeid,
  147. cw_assetcard.deptid,
  148. cw_assetcard.incrdecrid,
  149. cw_assetcard.location,
  150. cw_assetcard.usedtypeid,
  151. cw_assetcard.deprediateid,
  152. cw_assetcard.startdate,
  153. cw_assetcard.workload,
  154. cw_assetcard.usedall,
  155. cw_assetcard.unit,
  156. cw_assetcard.rawvalue,
  157. cw_assetcard.usedvalue,
  158. cw_assetcard.remainrate,
  159. cw_assetcard.remainvalue,
  160. cw_assetcard.deprrate,
  161. cw_assetcard.deprvalue,
  162. cw_assetcard.subid,
  163. cw_assetcard.initflag,
  164. cw_assetcard.othersubid,
  165. cw_assetcard.assetsubid,
  166. cw_assetcard.dscrp
  167. INTO :assetcardcode,
  168. :assetcardname,
  169. :spectype,
  170. :assetypeid,
  171. :deptid,
  172. :incrdecrid,
  173. :location,
  174. :usedtypeid,
  175. :deprediateid,
  176. :startdate,
  177. :workload,
  178. :usedall,
  179. :unit,
  180. :rawvalue,
  181. :usedvalue,
  182. :remainrate,
  183. :remainvalue,
  184. :deprrate,
  185. :deprvalue,
  186. :subid,
  187. :initflag,
  188. :othersubid,
  189. :assetsubid,
  190. :dscrp
  191. FROM cw_assetcard
  192. WHERE cw_assetcard.assetcardid = :arg_assetcardid
  193. and cw_assetcard.accsetid=:sys_accsetid;
  194. if sqlca.sqlcode<>0 then
  195. rslt=0
  196. ARG_MSG='查询数据操作失败,固定资产'
  197. goto ext
  198. end if
  199. it_newbegin=false
  200. it_updatebegin=false
  201. ext:
  202. return rslt
  203. end function
  204. public function integer updatebegin (long arg_assetcardid, string arg_msg);//UPDATEbegin(long arg_ssetcardid,ref string arg_msg)
  205. //从置对象,准备更新固定资产
  206. //0 fail 1 success
  207. int rslt=1
  208. if getinfo(arg_assetcardid,arg_msg)=0 then
  209. rslt=0
  210. goto ext
  211. end if
  212. //if checkflag=1 then
  213. // rslt=0
  214. // ARG_MSG='凭证已经过审核,不可以修改'
  215. // goto ext
  216. //end if
  217. assetcardid=arg_assetcardid
  218. //if checkflag=0 then p_CLEARMX()
  219. it_newbegin=FALSE
  220. it_updatebegin=TRUE
  221. ext:
  222. IF rslt=0 THEN p_RESET()
  223. return rslt
  224. end function
  225. public function integer del (long arg_assetcardid, ref string arg_msg, boolean arg_ifcommit);//del(arg_assetcardid,ref arg_msg,arg_ifcommit)
  226. //如果固定资产还没有对应凭证和还没有计提折旧则删除及其附属设备
  227. //0 FAIL, 1 SUCCESS
  228. Int rslt = 1
  229. IF getinfo(arg_assetcardid,arg_msg) = 0 THEN
  230. rslt = 0
  231. GOTO ext
  232. END IF
  233. DELETE FROM cw_assetcard
  234. WHERE cw_assetcard.assetcardid = :arg_assetcardid
  235. AND cw_assetcard.accsetid = :sys_accsetid;
  236. IF sqlca.SQLCode <> 0 THEN
  237. rslt = 0
  238. arg_msg = "删除固定资产操作失败"+"~n"+sqlca.SQLErrText
  239. GOTO ext
  240. END IF
  241. DELETE FROM cw_attachast
  242. WHERE cw_attachast.assetcardid = :arg_assetcardid
  243. AND cw_attachast.accsetid = :sys_accsetid;
  244. IF sqlca.SQLCode <> 0 THEN
  245. rslt = 0
  246. arg_msg = "删除固定资产附属设备操作失败"+"~n"+sqlca.SQLErrText
  247. GOTO ext
  248. END IF
  249. DELETE FROM cw_astbalance
  250. WHERE cw_astbalance.assetcardid = :arg_assetcardid
  251. AND cw_astbalance.accsetid = :sys_accsetid;
  252. IF sqlca.SQLCode <> 0 THEN
  253. rslt = 0
  254. arg_msg = "删除固定资产累计折旧操作失败"+"~n"+sqlca.SQLErrText
  255. GOTO ext
  256. END IF
  257. it_newbegin = FALSE
  258. it_updatebegin = FALSE
  259. IF rslt = 0 THEN
  260. ROLLBACK;
  261. p_reset()
  262. ELSEIF rslt = 1 AND arg_ifcommit THEN
  263. COMMIT;
  264. END IF
  265. ext:
  266. RETURN (rslt)
  267. end function
  268. public function integer save (long arg_assetcardid, ref string arg_msg, boolean arg_ifcommit);//save(ref string arg_msg,boolean arg_ifcommit)
  269. // 新建(assetcardid=0)\更新(assetcardid>0)
  270. //0 fail 1 success
  271. //
  272. // 函数执行固定资产操作
  273. // 函数在表 cw_assetcard、cw_attachast 记帐
  274. // 1 检查固定资产信息合法性
  275. // 2 新建-新建固定资产\读取固定资产唯一码\插入明细
  276. // 2 修改-更新固定资产\删除旧明细\插入明细
  277. // 3 提交,修改状态标志
  278. Integer rslt = 1,cnt = 0,i
  279. DateTime server_datetime
  280. Long ls_newid
  281. String errmsg = ''
  282. IF it_newbegin = FALSE AND it_updatebegin = FALSE THEN
  283. rslt = 0
  284. arG_MSG = "非编辑状态不可以提交"
  285. GOTO ext
  286. END IF
  287. IF check_data(arG_MSG) = 0 THEN
  288. rslt = 0
  289. GOTO ext
  290. END IF
  291. IF it_newbegin THEN
  292. cnt = 0
  293. SELECT count(assetcardcode) INTO :cnt FROM cw_assetcard
  294. WHERE cw_assetcard.accsetid = :sys_accsetid
  295. AND cw_assetcard.assetcardcode = :assetcardcode;
  296. IF sqlca.SQLCode = -1 THEN
  297. rslt = 0
  298. arG_MSG = '查询固定资产编号失败'
  299. GOTO ext
  300. END IF
  301. IF cnt > 0 THEN
  302. rslt = 0
  303. arG_MSG = '该帐套已经存在该固定资产编号,请重新输入'
  304. GOTO ext
  305. END IF
  306. END IF
  307. //////////////////////////////////////////////////开始区分:新建/更新 处理
  308. IF assetcardid = 0 THEN //新建
  309. ls_newid = arg_assetcardid
  310. IF ls_newid = 0 THEN
  311. ls_newid = f_sys_scidentity(sys_accsetid,"cw_assetcard","assetcardid",arG_MSG,TRUE,id_sqlca)
  312. IF ls_newid <= 0 THEN
  313. rslt = 0
  314. GOTO ext
  315. END IF
  316. END IF
  317. INSERT INTO cw_assetcard (
  318. accsetid,
  319. assetcardid,
  320. assetcardcode,
  321. assetcardname,
  322. spectype,
  323. assetypeid,
  324. deptid,
  325. incrdecrid,
  326. location,
  327. usedtypeid,
  328. deprediateid,
  329. startdate,
  330. workload,
  331. usedall,
  332. unit,
  333. rawvalue,
  334. usedvalue,
  335. remainrate,
  336. remainvalue,
  337. deprrate,
  338. deprvalue,
  339. subid,
  340. initflag,
  341. dscrp,
  342. othersubid,
  343. assetsubid,
  344. deprsubid,
  345. credid)
  346. VALUES ( :sys_accsetid,
  347. :ls_newid,
  348. :assetcardcode,
  349. :assetcardname,
  350. :spectype,
  351. :assetypeid,
  352. :deptid,
  353. :incrdecrid,
  354. :Location,
  355. :usedtypeid,
  356. :deprediateid,
  357. :startdate,
  358. :workload,
  359. :usedall,
  360. :unit,
  361. :rawvalue,
  362. :usedvalue,
  363. :remainrate,
  364. :remainvalue,
  365. :deprrate,
  366. :deprvalue,
  367. :subid,
  368. :initflag,
  369. :dscrp,
  370. :othersubid,
  371. :assetsubid,
  372. :deprsubid,
  373. :credid) ;
  374. IF sqlca.SQLCode <> 0 THEN
  375. rslt = 0
  376. arG_MSG = "因网络或其它原因导致新建固定资产操作失败"+"~n"+sqlca.SQLErrText
  377. ROLLBACK ;
  378. GOTO ext
  379. END IF
  380. IF it_mxbt > 0 THEN
  381. FOR i = 1 TO it_mxbt
  382. INSERT INTO cw_attachast
  383. ( accsetid,
  384. assetcardid,
  385. attachastname,
  386. spectype,
  387. unit,
  388. amount,
  389. sumcount,
  390. startdate)
  391. VALUES (:sys_accsetid,
  392. :ls_newid,
  393. :attachastmx[i].attachastname,
  394. :attachastmx[i].spectype,
  395. :attachastmx[i].unit,
  396. :attachastmx[i].amount,
  397. :attachastmx[i].sumcount,
  398. :attachastmx[i].startdate);
  399. IF sqlca.SQLCode <> 0 THEN
  400. assetcardid = 0 //还原outWAREID
  401. rslt = 0
  402. arG_MSG = "因网络或其它原因导致新建凭证明细操作失败"+"~n"+sqlca.SQLErrText
  403. GOTO ext
  404. END IF
  405. NEXT
  406. END IF
  407. assetcardid = ls_newid
  408. ELSE //////////////////////////////////////////////////更新
  409. UPDATE cw_assetcard
  410. SET assetcardcode = :assetcardcode,
  411. assetcardname = :assetcardname,
  412. spectype = :spectype,
  413. assetypeid = :assetypeid,
  414. deptid = :deptid,
  415. incrdecrid = :incrdecrid,
  416. location = :Location,
  417. usedtypeid = :usedtypeid,
  418. deprediateid = :deprediateid,
  419. startdate = :startdate,
  420. workload = :workload,
  421. usedall = :usedall,
  422. unit = :unit,
  423. rawvalue = :rawvalue,
  424. usedvalue = :usedvalue,
  425. remainrate = :remainrate,
  426. remainvalue = :remainvalue,
  427. deprrate = :deprrate,
  428. deprvalue = :deprvalue,
  429. subid = :subid,
  430. dscrp = :dscrp,
  431. othersubid = :othersubid,
  432. assetsubid = :assetsubid,
  433. deprsubid = :deprsubid,
  434. credid = :credid
  435. WHERE cw_assetcard.accsetid = :sys_accsetid
  436. AND cw_assetcard.assetcardid = :assetcardid ;
  437. IF sqlca.SQLCode <> 0 THEN
  438. rslt = 0
  439. arG_MSG = "因网络或其它原因导致更新固定资产操作失败"+"~n"+sqlca.SQLErrText
  440. GOTO ext
  441. END IF
  442. //删除原有明细
  443. DELETE FROM cw_attachast
  444. Where cw_attachast.accsetid = :sys_accsetid AND assetcardid = :assetcardid;
  445. IF sqlca.SQLCode <> 0 THEN
  446. rslt = 0
  447. arG_MSG = "删除旧有固定资产附属设备操作失败"+"~n"+sqlca.SQLErrText
  448. GOTO ext
  449. END IF
  450. IF it_mxbt > 0 THEN
  451. FOR i = 1 TO it_mxbt
  452. INSERT INTO cw_attachast
  453. ( accsetid,
  454. assetcardid,
  455. attachastname,
  456. spectype,
  457. unit,
  458. amount,
  459. sumcount,
  460. startdate)
  461. VALUES (:sys_accsetid,
  462. :assetcardid,
  463. :attachastmx[i].attachastname,
  464. :attachastmx[i].spectype,
  465. :attachastmx[i].unit,
  466. :attachastmx[i].amount,
  467. :attachastmx[i].sumcount,
  468. :attachastmx[i].startdate);
  469. IF sqlca.SQLCode <> 0 THEN
  470. assetcardid = 0 //还原outWAREID
  471. rslt = 0
  472. arG_MSG = "因网络或其它原因导致新建凭证明细操作失败"+"~n"+sqlca.SQLErrText
  473. GOTO ext
  474. END IF
  475. NEXT
  476. END IF
  477. END IF
  478. it_newbegin = FALSE
  479. it_updatebegin = FALSE
  480. ext:
  481. IF rslt = 0 THEN
  482. ROLLBACK;
  483. assetcardid = 0
  484. p_clearmx()
  485. ELSEIF rslt = 1 AND arg_ifcommit THEN
  486. COMMIT;
  487. END IF
  488. RETURN(rslt)
  489. end function
  490. public function integer check_data (ref string arg_msg);//校验数据
  491. //check_data(arg_msg)
  492. Int rslt = 1
  493. IF IsNull(assetcardcode) THEN assetcardcode = ''
  494. IF IsNull(assetcardname) THEN assetcardname = ''
  495. IF IsNull(spectype) THEN spectype = ''
  496. IF IsNull(assetypeid) THEN assetypeid = 0
  497. IF IsNull(deptid) THEN deptid = 0
  498. IF IsNull(incrdecrid) THEN incrdecrid = 0
  499. IF IsNull(Location) THEN Location = ''
  500. IF IsNull(usedtypeid) THEN usedtypeid = 0
  501. IF IsNull(deprediateid) THEN deprediateid = 0
  502. IF IsNull(workload) THEN workload = 0
  503. IF IsNull(usedall) THEN usedall = 0
  504. IF IsNull(unit) THEN unit = ''
  505. IF IsNull(rawvalue) THEN rawvalue = 0
  506. IF IsNull(usedvalue) THEN usedvalue = 0
  507. IF IsNull(remainrate) THEN remainrate = 0
  508. IF IsNull(remainvalue) THEN remainvalue = 0
  509. IF IsNull(deprrate) THEN deprrate = 0
  510. IF IsNull(deprvalue) THEN deprvalue = 0
  511. IF IsNull(subid) THEN subid = ''
  512. IF Trim(assetcardcode) = '' THEN
  513. rslt = 0
  514. arg_msg = '请输入固定资产编号!'
  515. GOTO ext
  516. END IF
  517. IF Trim(assetcardname) = '' THEN
  518. rslt = 0
  519. arg_msg = '请输入固定资产名称!'
  520. GOTO ext
  521. END IF
  522. IF usedtypeid = 0 THEN
  523. rslt = 0
  524. arg_msg = '请选择使用状况!'
  525. GOTO ext
  526. END IF
  527. IF rawvalue <= 0 THEN
  528. rslt = 0
  529. arg_msg = '入帐原值必须大于0!'
  530. GOTO ext
  531. END IF
  532. IF startdate < DateTime(1900-01-01,Now()) THEN
  533. rslt = 0
  534. arg_msg = '不合理入帐日期!'
  535. GOTO ext
  536. END IF
  537. IF sys_accsetbegin THEN
  538. IF startdate < DateTime(f_rst_mon_1st(1,sys_curyearmon)) THEN
  539. arg_msg = '入帐日期不能在当前会计期间之前!'
  540. rslt = 0
  541. GOTO ext
  542. END IF
  543. IF startdate > DateTime(f_rst_mon_1st(3,sys_curyearmon)) THEN
  544. arg_msg = '入帐日期不能在当前会计期间之后!'
  545. rslt = 0
  546. GOTO ext
  547. END IF
  548. ELSE
  549. IF startdate >= DateTime(f_rst_mon_1st(1,sys_startyearmon)) THEN
  550. arg_msg = '入帐日期不能在启用帐套期间之后或相同的期间!'
  551. rslt = 0
  552. GOTO ext
  553. END IF
  554. END IF
  555. //if deprediateid=0 then
  556. // arg_msg='请选择折旧方法!'
  557. // goto ext
  558. //end if
  559. IF workload <= 0 THEN
  560. rslt = 0
  561. arg_msg = '预计使用月份或工作总量必须大于0!'
  562. GOTO ext
  563. END IF
  564. IF Trim(subid) = '' THEN
  565. rslt = 0
  566. arg_msg = '请输入对应折旧科目!'
  567. GOTO ext
  568. END IF
  569. ext:
  570. RETURN rslt
  571. end function
  572. public function integer update_clearflag (long arg_assetcardid, int arg_flag, ref string arg_msg, boolean arg_ifcommit);//更新固定资产清理标记
  573. Int rslt = 1
  574. UPDATE cw_assetcard
  575. Set clearflag = :arg_flag
  576. Where accsetid = :sys_accsetid
  577. AND assetcardid = :arg_assetcardid;
  578. IF sqlca.SQLCode <> 0 THEN
  579. arg_msg = '更新固定资产清理标记失败'
  580. rslt = 0
  581. GOTO ext
  582. END IF
  583. ext:
  584. IF rslt = 0 THEN
  585. ROLLBACK;
  586. ELSEIF rslt = 1 AND arg_ifcommit THEN
  587. COMMIT;
  588. END IF
  589. RETURN rslt
  590. end function
  591. on uo_asset.create
  592. call super::create
  593. TriggerEvent( this, "constructor" )
  594. end on
  595. on uo_asset.destroy
  596. TriggerEvent( this, "destructor" )
  597. call super::destroy
  598. end on