w_musttake.srw 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368
  1. $PBExportHeader$w_musttake.srw
  2. forward
  3. global type w_musttake from w_publ_pageretr
  4. end type
  5. type dw_msttake from u_dw_rbtnfilter within w_musttake
  6. end type
  7. type cbx_ifshowall from checkbox within w_musttake
  8. end type
  9. type st_3 from statictext within w_musttake
  10. end type
  11. type em_firstday from editmask within w_musttake
  12. end type
  13. type st_4 from statictext within w_musttake
  14. end type
  15. type em_endday from editmask within w_musttake
  16. end type
  17. type cb_retrieve from uo_imflatbutton within w_musttake
  18. end type
  19. type cb_add from uo_imflatbutton within w_musttake
  20. end type
  21. type cb_delete from uo_imflatbutton within w_musttake
  22. end type
  23. type dw_msttakemx from u_dw_rbtnfilter within w_musttake
  24. end type
  25. type ddlb_1 from uo_ddlb_scid within w_musttake
  26. end type
  27. type cb_1 from uo_imflatbutton within w_musttake
  28. end type
  29. type cb_4 from uo_imflatbutton within w_musttake
  30. end type
  31. type ddlb_2 from dropdownlistbox within w_musttake
  32. end type
  33. type ln_bar from line within w_musttake
  34. end type
  35. type ln_bar2 from line within w_musttake
  36. end type
  37. type r_bar from rectangle within w_musttake
  38. end type
  39. type ln_1 from line within w_musttake
  40. end type
  41. type ln_2 from line within w_musttake
  42. end type
  43. type ln_5 from line within w_musttake
  44. end type
  45. type ln_6 from line within w_musttake
  46. end type
  47. type st_amtdisp from statictext within w_musttake
  48. end type
  49. type st_msttakeamt from statictext within w_musttake
  50. end type
  51. type st_takeamt from statictext within w_musttake
  52. end type
  53. type st_balcamt from statictext within w_musttake
  54. end type
  55. type cb_salebill from uo_imflatbutton within w_musttake
  56. end type
  57. type ddlb_3 from dropdownlistbox within w_musttake
  58. end type
  59. type st_2 from statictext within w_musttake
  60. end type
  61. type st_5 from statictext within w_musttake
  62. end type
  63. type st_6 from statictext within w_musttake
  64. end type
  65. type cbx_ifuse from checkbox within w_musttake
  66. end type
  67. type cb_3 from uo_imflatbutton within w_musttake
  68. end type
  69. type cbx_all from checkbox within w_musttake
  70. end type
  71. type pb_em1 from picturebutton within w_musttake
  72. end type
  73. type pb_em2 from picturebutton within w_musttake
  74. end type
  75. type pb_2 from picturebutton within w_musttake
  76. end type
  77. type cb_take from uo_imflatbutton within w_musttake
  78. end type
  79. type cbx_1 from checkbox within w_musttake
  80. end type
  81. type ln_3 from line within w_musttake
  82. end type
  83. type ln_4 from line within w_musttake
  84. end type
  85. end forward
  86. global type w_musttake from w_publ_pageretr
  87. integer width = 3621
  88. integer height = 2444
  89. string title = "应收帐"
  90. boolean maxbox = true
  91. windowstate windowstate = maximized!
  92. event retrieve_pay ( )
  93. event retrieve_paymx ( )
  94. event ue_add ( )
  95. event ue_del ( )
  96. event ue_view_bill ( )
  97. event ue_take ( )
  98. event ue_salebill_auto ( )
  99. event ue_rbbutton ( )
  100. event ue_dwchild_filter ( )
  101. event ue_create_salebill ( )
  102. event ue_create_cusamt ( )
  103. event ue_create_reissue ( )
  104. event ue_salebill_auto_p ( )
  105. event ue_date1 ( )
  106. event ue_date2 ( )
  107. event ue_date3 ( )
  108. event ue_date4 ( )
  109. dw_msttake dw_msttake
  110. cbx_ifshowall cbx_ifshowall
  111. st_3 st_3
  112. em_firstday em_firstday
  113. st_4 st_4
  114. em_endday em_endday
  115. cb_retrieve cb_retrieve
  116. cb_add cb_add
  117. cb_delete cb_delete
  118. dw_msttakemx dw_msttakemx
  119. ddlb_1 ddlb_1
  120. cb_1 cb_1
  121. cb_4 cb_4
  122. ddlb_2 ddlb_2
  123. ln_bar ln_bar
  124. ln_bar2 ln_bar2
  125. r_bar r_bar
  126. ln_1 ln_1
  127. ln_2 ln_2
  128. ln_5 ln_5
  129. ln_6 ln_6
  130. st_amtdisp st_amtdisp
  131. st_msttakeamt st_msttakeamt
  132. st_takeamt st_takeamt
  133. st_balcamt st_balcamt
  134. cb_salebill cb_salebill
  135. ddlb_3 ddlb_3
  136. st_2 st_2
  137. st_5 st_5
  138. st_6 st_6
  139. cbx_ifuse cbx_ifuse
  140. cb_3 cb_3
  141. cbx_all cbx_all
  142. pb_em1 pb_em1
  143. pb_em2 pb_em2
  144. pb_2 pb_2
  145. cb_take cb_take
  146. cbx_1 cbx_1
  147. ln_3 ln_3
  148. ln_4 ln_4
  149. end type
  150. global w_musttake w_musttake
  151. type variables
  152. uo_musttake uo_take
  153. Long cur_id,cur_takeid
  154. Long cur_scid = 0
  155. long cur_moneyid=0
  156. Long cur_scid_arr[]
  157. dec ins_msttakeamt=0
  158. dec ins_takeamt=0
  159. Int finishflag = -1
  160. long ins_moneyid = -1
  161. end variables
  162. forward prototypes
  163. public subroutine wf_refresh_balc ()
  164. public function integer wf_dispamt ()
  165. public subroutine wf_initdisp ()
  166. public function integer days_in_month (integer month, integer year)
  167. end prototypes
  168. event retrieve_pay();Long row,uc_relid,uc_moneyid,uc_scid
  169. String ls_cusname,ls_name
  170. DateTime firstdate,enddate
  171. row = dw_pageretr.GetRow()
  172. IF row > 0 THEN
  173. uc_relid = dw_pageretr.Object.cusid[row]
  174. uc_moneyid = dw_pageretr.Object.v_cus_balcamt_moneyid[row]
  175. IF sys_option_scid_msttake_mstpay = 1 THEN
  176. uc_scid = dw_pageretr.Object.v_cus_balcamt_scid[row]
  177. ELSE
  178. uc_scid = cur_scid
  179. END IF
  180. ls_cusname = dw_pageretr.Object.Name[row]
  181. ls_name = dw_pageretr.Object.cw_currency_name[row]
  182. dw_msttake.Title = ls_cusname+','+ls_name+'-应收帐(已结清明细不能选择)'
  183. dw_msttakemx.Title = ls_cusname+','+ls_name+'-应收帐明细'
  184. firstdate = DateTime(Date(em_firstday.Text),Time('00:00:00'))
  185. enddate = DateTime(Date(em_endday.Text),Time('23:59:59'))
  186. dw_msttake.SetRedraw (FALSE)
  187. dw_msttake.Retrieve(uc_scid,uc_relid,firstdate,enddate,finishflag,uc_moneyid)
  188. IF dw_msttake.RowCount() > 0 THEN
  189. dw_msttake.SelectRow(0,FALSE)
  190. dw_msttake.ScrollToRow(1)
  191. dw_msttake.SelectRow(1,TRUE)
  192. END IF
  193. dw_msttake.SetRedraw (TRUE)
  194. ELSE
  195. dw_msttake.Reset()
  196. END IF
  197. cur_id = uc_relid
  198. cur_moneyid = uc_moneyid
  199. end event
  200. event retrieve_paymx();long row,uc_relid=0
  201. row=dw_msttake.getrow()
  202. if row>0 then
  203. uc_relid=dw_msttake.object.takeid[row]
  204. dw_msttakemx.SetRedraw (false)
  205. dw_msttakemx.retrieve(uc_relid)
  206. dw_msttakemx.SetRedraw (true)
  207. else
  208. dw_msttakemx.reset()
  209. end if
  210. cur_takeid=uc_relid
  211. end event
  212. event ue_add();IF Not f_power_ind(132) THEN
  213. MessageBox('提示','你没有使用权限!',information!,ok!)
  214. RETURN
  215. END IF
  216. IF cur_id <= 0 THEN
  217. MessageBox('提示','请选择客户',information!,ok!)
  218. RETURN
  219. END IF
  220. IF cur_scid < 0 THEN
  221. MessageBox('提示','请选择分部',information!,ok!)
  222. RETURN
  223. END IF
  224. s_edit_index_tran s_open_tran
  225. s_open_tran.b_long = cur_id
  226. s_open_tran.b_string = ''
  227. s_open_tran.b_decimal = 0
  228. s_open_tran.c_long = cur_scid
  229. s_open_tran.d_long = cur_moneyid
  230. OpenWithParm(w_musttake_mod,s_open_tran)
  231. wf_refresh_balc()
  232. This.TriggerEvent('retrieve_pay')
  233. end event
  234. event ue_del();IF NOT f_power_ind(132) THEN
  235. MessageBox('提示','你没有使用权限!',information!,ok!)
  236. RETURN
  237. END IF
  238. Long takeid,lirow
  239. String arg_msg
  240. lirow = dw_msttake.GetRow()
  241. IF lirow = 0 THEN
  242. MessageBox('提示','请选定要删除的应收帐',information!,ok!)
  243. RETURN
  244. END IF
  245. IF MessageBox ("询问","是否确定要删除当前应收帐记录?",Question!,YesNo! ) = 2 THEN
  246. RETURN
  247. END IF
  248. //IF dw_msttake.Object.finishflag[lirow] = 1 THEN
  249. // MessageBox('提示','选定的应收帐已结清,不能删除',information!,ok!)
  250. // RETURN
  251. //END IF
  252. takeid = dw_msttake.Object.takeid[lirow]
  253. IF uo_take.del_takerec (cur_scid,0,takeid, cur_id, arg_msg,TRUE) = 0 THEN
  254. MessageBox("错误",arg_msg,stopsign!,ok!)
  255. RETURN
  256. END IF
  257. //日志
  258. Long ls_id,ls_curid
  259. String ls_code,ls_opemp
  260. ls_id = takeid
  261. ls_curid = cur_id
  262. ls_code = dw_msttake.Object.billcode[lirow]
  263. ls_opemp = dw_msttake.Object.opemp[lirow]
  264. f_setsysoplog('应收帐','应收帐删除,ID:'+String(ls_id)+',客户ID:'+String(ls_curid)+',code:'+ls_code+',建立人:'+ls_opemp,arg_msg,TRUE)
  265. //--
  266. dw_msttake.DeleteRow(lirow)
  267. dw_msttake.TriggerEvent(RowFocusChanged!)
  268. wf_refresh_balc()
  269. THIS.TriggerEvent('retrieve_pay')
  270. MessageBox('提示','删除应收帐操作成功!',information!,ok!)
  271. end event
  272. event ue_view_bill();Long row
  273. row = dw_msttake.GetRow()
  274. IF row <= 0 THEN RETURN
  275. IF row > 0 THEN
  276. String ls_code
  277. Long ll_scid
  278. Int li_buildtype
  279. Decimal ld_mstamt
  280. ll_scid = dw_msttake.Object.u_bmsttake_scid[row]
  281. ls_code = dw_msttake.Object.billcode[row]
  282. // ld_mstamt = dw_msttake.Object.msttakeamt[row]
  283. li_buildtype = dw_msttake.Object.buildtype[row]
  284. IF li_buildtype = 0 THEN RETURN
  285. f_open_win(ll_scid,ls_code)
  286. END IF
  287. end event
  288. event ue_take();if not f_power_ind(132) then
  289. messagebox('提示','你没有使用权限!',information!,ok!)
  290. return
  291. end if
  292. if cur_id <= 0 then
  293. messagebox('提示','请选择客户',information!,ok!)
  294. return
  295. end if
  296. long ll_row
  297. ll_row = dw_msttake.getrow()
  298. if ll_row <= 0 then
  299. messagebox('提示','请选择付款单据',information!,ok!)
  300. return
  301. end if
  302. s_edit_index_tran s_open_tran
  303. s_open_tran.b_long = cur_id
  304. s_open_tran.c_long =cur_scid
  305. s_open_tran.b_string = dw_msttake.object.billcode[ll_row]
  306. s_open_tran.b_decimal = dw_msttake.object.balcamt[ll_row]
  307. s_open_tran.d_long=cur_moneyid
  308. openwithparm(w_musttake_mod,s_open_tran)
  309. wf_refresh_balc()
  310. this.triggerevent('retrieve_pay')
  311. end event
  312. event ue_salebill_auto();Long ll_rowcount
  313. Long ll_banktypeid
  314. DateTime ld_mxtakedate
  315. long ll_takeid
  316. Int j
  317. ld_mxtakedate = DateTime(Today(),Time(0))
  318. dw_msttake.AcceptText()
  319. ll_rowcount = dw_msttake.RowCount()
  320. IF ll_rowcount <= 0 THEN RETURN
  321. datastore ds_msttakemx
  322. ds_msttakemx = CREATE datastore
  323. ds_msttakemx.DataObject = "dw_salebillmx_index"
  324. ds_msttakemx.SetTransObject(sqlca)
  325. ds_msttakemx.Retrieve(0.1)
  326. //IF ds_msttakemx.RowCount() > 0 THEN
  327. // FOR j = 1 TO ds_msttakemx.RowCount()
  328. // ds_msttakemx.DeleteRow(j)
  329. // NEXT
  330. //END IF
  331. ds_msttakemx.AcceptText()
  332. Int i
  333. Long ll_row
  334. Long ll_takeamtcount
  335. FOR i = 1 TO ll_rowcount
  336. IF dw_msttake.Object.checkdata[i] = 0 THEN
  337. CONTINUE;
  338. END IF
  339. IF dw_msttake.Object.balcamt[i] < 0 And (dw_msttake.Object.takeamt[i] > 0 OR dw_msttake.Object.msttakeamt[i] < 0 ) THEN
  340. ll_takeamtcount++
  341. ld_mxtakedate = dw_msttake.Object.takedate[i]
  342. ll_banktypeid = dw_msttake.Object.u_bmsttake_banktypeid[i]
  343. END IF
  344. // IF ll_takeamtcount > 1 THEN
  345. // MessageBox('提示','预收款或已收款限制只能有一条',information!,ok!)
  346. // RETURN
  347. // END IF
  348. ll_row = ds_msttakemx.InsertRow(0)
  349. ds_msttakemx.Object.billcode[ll_row] = dw_msttake.Object.billcode[i]
  350. ds_msttakemx.Object.takedate[ll_row] = dw_msttake.Object.takedate[i]
  351. ds_msttakemx.Object.oriamt[ll_row] = dw_msttake.Object.oriamt[i]
  352. ds_msttakemx.Object.mainmsttakeamt[ll_row] = dw_msttake.Object.msttakeamt[i]
  353. ds_msttakemx.Object.maintakeamt[ll_row] = dw_msttake.Object.takeamt[i]
  354. ds_msttakemx.Object.takeid[ll_row] = dw_msttake.Object.takeid[i]
  355. NEXT
  356. ds_msttakemx.AcceptText()
  357. //生成相关号
  358. Long ll_take_i
  359. String ls_take_i_billcode,ls_not_take_i_billcode
  360. FOR i = 1 TO ds_msttakemx.RowCount()
  361. IF ds_msttakemx.Object.mainmsttakeamt[i] = 0 AND ds_msttakemx.Object.maintakeamt[i] <> 0 THEN
  362. ll_take_i = i
  363. ls_take_i_billcode = ds_msttakemx.Object.billcode[i]
  364. ELSE
  365. ls_not_take_i_billcode = ls_not_take_i_billcode + Trim(ds_msttakemx.Object.billcode[i])+','
  366. END IF
  367. NEXT
  368. ls_not_take_i_billcode = Left(ls_not_take_i_billcode,Len(ls_not_take_i_billcode) - 1 )
  369. ls_not_take_i_billcode = Left(ls_not_take_i_billcode, 255)
  370. FOR i = 1 TO ds_msttakemx.RowCount()
  371. IF i = ll_take_i THEN
  372. ds_msttakemx.Object.relbillcode[i] = ls_not_take_i_billcode
  373. ELSE
  374. ds_msttakemx.Object.relbillcode[i] = ls_take_i_billcode
  375. END IF
  376. NEXT
  377. //
  378. //第一次
  379. Decimal msttakeamt = 0,takeamt = 0
  380. FOR i = 1 TO ds_msttakemx.RowCount()
  381. IF msttakeamt > 0 THEN
  382. IF ds_msttakemx.Object.mainmsttakeamt[i] <= msttakeamt THEN
  383. ds_msttakemx.Object.msttakeamt[i] = ds_msttakemx.Object.mainmsttakeamt[i]
  384. msttakeamt = msttakeamt - ds_msttakemx.Object.mainmsttakeamt[i]
  385. ELSE
  386. ds_msttakemx.Object.msttakeamt[i] = msttakeamt
  387. msttakeamt = 0
  388. END IF
  389. END IF
  390. takeamt = takeamt - (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  391. ds_msttakemx.Object.takeamt[i] = (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  392. // dec ld
  393. // ld=ds_msttakemx.Object.takeamt[i]
  394. NEXT
  395. ds_msttakemx.AcceptText()
  396. //第二次循环:根据可分配判断正负,修正相关结余(正-负、负-正)
  397. IF takeamt < 0 THEN //不够分配 ds_msttakemx.Object.takeamt[i] 相当于单据金额变化
  398. FOR i = ds_msttakemx.RowCount() TO 1 STEP - 1
  399. If (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i]) <= 0 THEN CONTINUE
  400. IF ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i] + takeamt < 0 THEN
  401. ds_msttakemx.Object.takeamt[i] = 0
  402. takeamt = takeamt + (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  403. ELSE
  404. ds_msttakemx.Object.takeamt[i] = takeamt + (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  405. takeamt = 0
  406. END IF
  407. NEXT
  408. ELSE // 分配有剩
  409. FOR i = ds_msttakemx.RowCount() TO 1 STEP - 1
  410. If (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i]) >= 0 THEN CONTINUE //or ds_msttakemx.Object.maintakeamt[i]=0
  411. //if ds_msttakemx.Object.u_bmsttake_takeamt[i]=0 then continue
  412. IF ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i] + takeamt > 0 THEN
  413. ds_msttakemx.Object.takeamt[i] =0
  414. takeamt = takeamt + (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  415. //ds_msttakemx.Object.takeamt[i] = takeamt// + (ds_msttakemx.Object.u_bmsttake_msttakeamt[i] - ds_msttakemx.Object.u_bmsttake_takeamt[i])
  416. ELSE
  417. ds_msttakemx.Object.takeamt[i] = takeamt + (ds_msttakemx.Object.mainmsttakeamt[i] - ds_msttakemx.Object.maintakeamt[i])
  418. takeamt = 0
  419. // ld=ds_msttakemx.Object.takeamt[i]
  420. END IF
  421. NEXT
  422. END IF
  423. ds_msttakemx.AcceptText()
  424. uo_salebill uo_bill
  425. uo_bill = CREATE uo_salebill
  426. String arg_msg = ''
  427. IF uo_bill.newbegin() = 0 THEN
  428. MessageBox('错误',arg_msg,stopsign!,ok!)
  429. RETURN
  430. END IF
  431. uo_bill.opemp = publ_operator
  432. uo_bill.takedate = ld_mxtakedate
  433. uo_bill.relcode = ''
  434. uo_bill.inrep = publ_operator
  435. uo_bill.banktypeid = ll_banktypeid
  436. uo_bill.dscrp = ''
  437. uo_bill.cusid = cur_id
  438. uo_bill.msttakeamt = 0
  439. uo_bill.takeamt = 0
  440. uo_bill.accountsid = 0
  441. uo_bill.itemid = 0
  442. uo_bill.buildtype = 1
  443. uo_bill.moneyid = ins_moneyid
  444. FOR i = 1 TO ds_msttakemx.RowCount()
  445. IF ds_msttakemx.Object.mainmsttakeamt[i] <> 0 OR ds_msttakemx.Object.maintakeamt[i] <> 0 THEN
  446. IF uo_bill.acceptmx(ds_msttakemx.Object.takeid[i],&
  447. ds_msttakemx.Object.billcode[i],&
  448. ds_msttakemx.Object.msttakeamt[i],&
  449. ds_msttakemx.Object.takeamt[i],&
  450. ds_msttakemx.Object.oriamt[i],&
  451. ds_msttakemx.Object.mainmsttakeamt[i],&
  452. ds_msttakemx.Object.maintakeamt[i],&
  453. ds_msttakemx.Object.relbillcode[i],&
  454. arg_msg) = 0 THEN
  455. MessageBox('错误',arg_msg,stopsign!,ok!)
  456. RETURN
  457. END IF
  458. END IF
  459. NEXT
  460. IF uo_bill.Save_ds(arg_msg,TRUE) = 0 THEN
  461. MessageBox('错误',arg_msg,stopsign!,ok!)
  462. RETURN
  463. ELSE
  464. FOR I = 1 TO ds_msttakemx.RowCount() //直接更新 应收账的销售单的预收款日期
  465. If ds_msttakemx.Object.maintakeamt[i] > 0 THEN CONTINUE
  466. ll_takeid = ds_msttakemx.Object.takeid[I]
  467. UPDATE u_bmsttake
  468. SET viewdate = :ld_mxtakedate
  469. Where takeid = :ll_takeid;
  470. IF sqlca.SQLCode <> 0 THEN
  471. ROLLBACK;
  472. messagebox('错误','更新预计收款日期失败')
  473. RETURN
  474. ELSE
  475. COMMIT;
  476. END IF
  477. NEXT
  478. END IF
  479. IF sys_option_musttake_auditing = 1 THEN
  480. IF uo_bill.auditing(uo_bill.salebillid,publ_operator,arg_msg,TRUE)=0 THEN
  481. messagebox('错误',arg_msg,stopsign!,ok!)
  482. RETURN
  483. END IF
  484. END IF
  485. MessageBox('提示','自动生成销售收入单成功,单据编号为'+uo_bill.salebillcode,information!,ok!)
  486. DESTROY uo_bill
  487. cb_retrieve.TriggerEvent(Clicked!)
  488. RETURN
  489. //dw_msttake
  490. end event
  491. event ue_rbbutton();dw_msttake.event rbbutton( dw_msttake.arg_ins_dwtype,dw_msttake.arg_ins_dwname,dw_msttake.arg_ins_dwdata,dw_msttake.arg_ins_dwrow )
  492. end event
  493. event ue_dwchild_filter();dw_msttake.setfilter('')
  494. dw_msttake.filter()
  495. end event
  496. event ue_create_salebill();//辅助建立客户对数单
  497. if not f_power_ind(640) then
  498. messagebox('提示','你没有使用权限!',information!,ok!)
  499. return
  500. end if
  501. if cur_id <= 0 then
  502. messagebox('提示','请选择客户',information!,ok!)
  503. return
  504. end if
  505. if cur_scid < 0 then
  506. messagebox('提示','请选择分部',information!,ok!)
  507. return
  508. end if
  509. s_edit_index_tran s_open_tran
  510. s_open_tran.b_long = cur_id
  511. s_open_tran.b_string = ''
  512. s_open_tran.b_decimal = 0
  513. s_open_tran.c_long = cur_scid
  514. openwithparm(w_salebill_response,s_open_tran)
  515. wf_refresh_balc()
  516. this.triggerevent('retrieve_pay')
  517. end event
  518. event ue_create_cusamt();//辅助建立客户收款单
  519. IF Not f_power_ind(919) THEN
  520. MessageBox(publ_operator,"你没有权限")
  521. RETURN
  522. END IF
  523. IF cur_id <= 0 THEN
  524. MessageBox(publ_operator,'请选择供应商')
  525. RETURN
  526. END IF
  527. IF cur_scid < 0 THEN
  528. MessageBox(publ_operator,'请选择分部')
  529. RETURN
  530. END IF
  531. String ls_scname
  532. SELECT scname
  533. INTO :ls_scname
  534. FROM u_scdef
  535. Where scid = :cur_scid;
  536. IF sqlca.SQLCode <> 0 THEN
  537. MessageBox('系统提示','查询分部名称失败')
  538. RETURN
  539. END IF
  540. s_edit_index_tran s_open_tran
  541. s_open_tran.d_long = 1
  542. s_open_tran.c_long = cur_scid
  543. s_open_tran.d_string = ls_scname
  544. s_open_tran.e_long = cur_id
  545. OpenWithParm(w_cusamt_edit_response,s_open_tran)
  546. wf_refresh_balc()
  547. This.TriggerEvent('retrieve_pay')
  548. end event
  549. event ue_create_reissue();//辅助建立客户费用单
  550. IF Not f_power_ind(1020) THEN
  551. MessageBox(publ_operator,"你没有权限")
  552. RETURN
  553. END IF
  554. IF cur_id <= 0 THEN
  555. MessageBox(publ_operator,'请选择供应商')
  556. RETURN
  557. END IF
  558. IF cur_scid < 0 THEN
  559. MessageBox(publ_operator,'请选择分部')
  560. RETURN
  561. END IF
  562. String ls_scname
  563. SELECT scname
  564. INTO :ls_scname
  565. FROM u_scdef
  566. Where scid = :cur_scid;
  567. IF sqlca.SQLCode <> 0 THEN
  568. MessageBox('系统提示','查询分部名称失败')
  569. RETURN
  570. END IF
  571. s_edit_index_tran s_open_tran
  572. s_open_tran.d_long = 1
  573. s_open_tran.c_long = cur_scid
  574. s_open_tran.d_string = ls_scname
  575. s_open_tran.e_long = cur_id
  576. OpenWithParm(w_reissue_response,s_open_tran)
  577. wf_refresh_balc()
  578. This.TriggerEvent('retrieve_pay')
  579. end event
  580. event ue_salebill_auto_p();IF Not f_power_ind(1545) THEN
  581. MessageBox(publ_operator,"你没有权限")
  582. RETURN
  583. END IF
  584. IF MessageBox('确认','是否对当前选择客户自动对单?',question!,yesno!) = 2 THEN RETURN
  585. Long ll_i,ll_j,ll_k, row, i, j
  586. Long ll_row, ll_printid
  587. String arg_msg = ''
  588. String arg_msg_auditing = ''
  589. Long uc_scid,uc_moneyid,uc_cusid
  590. DateTime enddate
  591. Decimal ld_takeamt
  592. //Decimal msttakeamt = 0,takeamt = 0
  593. Long ll_take_i
  594. String ls_take_i_billcode,ls_not_take_i_billcode
  595. Long ll_banktypeid
  596. DateTime ldt_mstakedate
  597. String ls_mxdscrp
  598. Long ll_accountsid, ll_itemid
  599. String arg_msg_all = ''
  600. String ls_cusname
  601. Decimal lde_msttakeamt_tolbill, lde_takeamt_tolbill, lde_takeamt_mx
  602. uo_salebill uo_bill
  603. uo_bill = Create uo_salebill
  604. datastore ds_take,ds_msttake
  605. ds_take = Create datastore
  606. ds_take.DataObject = 'ds_msttake_index_autobill'
  607. ds_take.SetTransObject(sqlca)
  608. ds_msttake = Create datastore
  609. ds_msttake.DataObject = 'ds_msttake_index_autobill_mst'
  610. ds_msttake.SetTransObject(sqlca)
  611. datastore ds_msttakemx
  612. ds_msttakemx = Create datastore
  613. ds_msttakemx.DataObject = "dw_salebillmx_index"
  614. row = dw_pageretr.Find('ch = 1',1,dw_pageretr.RowCount())
  615. IF row <= 0 THEN
  616. MessageBox('系统提示','请先选择客户')
  617. RETURN
  618. END IF
  619. Open(w_autobill_date_ch)
  620. s_edit_index_tran s_tran_date
  621. s_tran_date = Message.PowerObjectParm
  622. IF s_tran_date.b_long = 0 THEN RETURN
  623. enddate = s_tran_date.b_datetime
  624. FOR ll_i = 1 To dw_pageretr.RowCount()
  625. IF dw_pageretr.Object.ch[ll_i] = 0 THEN CONTINUE
  626. uc_cusid = dw_pageretr.Object.cusid[ll_i]
  627. uc_moneyid = dw_pageretr.Object.v_cus_balcamt_moneyid[ll_i]
  628. ls_cusname = dw_pageretr.Object.Name[ll_i]
  629. IF sys_option_scid_msttake_mstpay = 1 THEN
  630. uc_scid = dw_pageretr.Object.v_cus_balcamt_scid[ll_i]
  631. ELSE
  632. uc_scid = cur_scid
  633. END IF
  634. ds_take.Retrieve(uc_scid,uc_cusid,enddate,uc_moneyid)
  635. ll_row = 0
  636. j = 0
  637. FOR ll_j = 1 To ds_take.RowCount()
  638. IF ds_take.Object.takeamt[ll_j] - ds_take.Object.msttakeamt[ll_j] = 0 THEN CONTINUE
  639. ls_take_i_billcode = ''
  640. ls_not_take_i_billcode = ''
  641. lde_msttakeamt_tolbill = 0
  642. lde_takeamt_tolbill = 0
  643. //ld_takeamt = 0
  644. //本次已收款
  645. ld_takeamt = ds_take.Object.takeamt[ll_j] - ds_take.Object.msttakeamt[ll_j]
  646. ldt_mstakedate = ds_take.Object.takedate[ll_j]
  647. ll_banktypeid = ds_take.Object.u_bmsttake_banktypeid[ll_j]
  648. ls_mxdscrp = ds_take.Object.dscrp[ll_j]
  649. ll_accountsid = ds_take.Object.u_bmsttake_accountsid[ll_j]
  650. ll_itemid = ds_take.Object.u_bmsttake_itemid[ll_j]
  651. // IF ds_take.Object.buildtype[ll_j] = 1 THEN //只有手动生成才建订单收款单
  652. // lb_newtaskdamt = False
  653. // ELSE
  654. // lb_newtaskdamt = True
  655. // END IF
  656. ls_take_i_billcode = ds_take.Object.billcode[ll_j]
  657. ds_msttakemx.Reset()
  658. ll_row = ds_msttakemx.InsertRow(0)
  659. ll_take_i = ll_row
  660. ds_msttakemx.Object.billcode[ll_row] = ds_take.Object.billcode[ll_j]
  661. ds_msttakemx.Object.takedate[ll_row] = ds_take.Object.takedate[ll_j]
  662. ds_msttakemx.Object.oriamt[ll_row] = ds_take.Object.oriamt[ll_j]
  663. ds_msttakemx.Object.mainmsttakeamt[ll_row] = ds_take.Object.msttakeamt[ll_j]
  664. ds_msttakemx.Object.maintakeamt[ll_row] = ds_take.Object.takeamt[ll_j]
  665. ds_msttakemx.Object.takeid[ll_row] = ds_take.Object.takeid[ll_j]
  666. // ds_msttakemx.Object.moneyid[ll_row] = ds_take.Object.u_bmsttake_moneyid[ll_j]
  667. ds_msttake.Retrieve(uc_scid,uc_cusid,enddate,uc_moneyid)
  668. FOR ll_k = 1 To ds_msttake.RowCount()
  669. IF ld_takeamt <= 0 THEN EXIT
  670. IF ds_msttake.Object.msttakeamt[ll_k] - ds_msttake.Object.takeamt[ll_k] <= 0 THEN CONTINUE
  671. IF ld_takeamt > ds_msttake.Object.msttakeamt[ll_k] - ds_msttake.Object.takeamt[ll_k] THEN
  672. lde_takeamt_mx = ds_msttake.Object.msttakeamt[ll_k] - ds_msttake.Object.takeamt[ll_k]
  673. ld_takeamt = ld_takeamt - lde_takeamt_mx
  674. ELSE
  675. lde_takeamt_mx = ld_takeamt
  676. ld_takeamt = 0
  677. END IF
  678. ll_row = ds_msttakemx.InsertRow(0)
  679. ds_msttakemx.Object.billcode[ll_row] = ds_msttake.Object.billcode[ll_k]
  680. ds_msttakemx.Object.takedate[ll_row] = ds_msttake.Object.takedate[ll_k]
  681. ds_msttakemx.Object.oriamt[ll_row] = ds_msttake.Object.oriamt[ll_k]
  682. ds_msttakemx.Object.mainmsttakeamt[ll_row] = ds_msttake.Object.msttakeamt[ll_k]
  683. ds_msttakemx.Object.maintakeamt[ll_row] = ds_msttake.Object.takeamt[ll_k]
  684. ds_msttakemx.Object.takeid[ll_row] = ds_msttake.Object.takeid[ll_k]
  685. // ds_msttakemx.Object.moneyid[ll_row] = ds_msttake.Object.u_bmsttake_moneyid[ll_k]
  686. ds_msttakemx.Object.msttakeamt[ll_row] = 0
  687. //明细分配已收
  688. ds_msttakemx.Object.takeamt[ll_row] = lde_takeamt_mx
  689. ls_not_take_i_billcode += ds_msttake.Object.billcode[ll_k] + ','
  690. lde_takeamt_tolbill += lde_takeamt_mx
  691. NEXT
  692. //总分配已收
  693. lde_msttakeamt_tolbill = ds_msttakemx.Object.maintakeamt[ll_take_i] - ds_msttakemx.Object.mainmsttakeamt[ll_take_i] - ld_takeamt
  694. ds_msttakemx.Object.takeamt[ll_take_i] = 0 - lde_msttakeamt_tolbill
  695. ls_not_take_i_billcode = Left(ls_not_take_i_billcode,Len(ls_not_take_i_billcode) - 1 )
  696. ls_not_take_i_billcode = Left(ls_not_take_i_billcode,250)
  697. ls_take_i_billcode = Left(ls_take_i_billcode,250)
  698. FOR i = 1 To ds_msttakemx.RowCount()
  699. IF i = ll_take_i THEN
  700. ds_msttakemx.Object.relbillcode[i] = ls_not_take_i_billcode
  701. // lde_msttakeamt_tolbill = ds_msttakemx.Object.msttakeamt[i] - ds_msttakemx.Object.takeamt[i]
  702. ELSE
  703. ds_msttakemx.Object.relbillcode[i] = ls_take_i_billcode
  704. // lde_takeamt_tolbill = ds_msttakemx.Object.msttakeamt[i] - ds_msttakemx.Object.takeamt[i]
  705. END IF
  706. NEXT
  707. ds_msttakemx.AcceptText()
  708. IF uo_bill.newbegin() = 0 THEN
  709. arg_msg_all = arg_msg_all + '客户:'+ls_cusname+'对数失败,' +'~r~n'
  710. GOTO _next_cust
  711. END IF
  712. uo_bill.opemp = publ_operator
  713. uo_bill.takedate = ldt_mstakedate
  714. uo_bill.relcode = ''
  715. uo_bill.inrep = publ_operator
  716. uo_bill.banktypeid = ll_banktypeid
  717. uo_bill.dscrp = ''
  718. uo_bill.cusid = uc_cusid
  719. uo_bill.msttakeamt = lde_msttakeamt_tolbill
  720. uo_bill.takeamt = lde_takeamt_tolbill
  721. uo_bill.accountsid = ll_accountsid
  722. uo_bill.itemid = ll_itemid
  723. uo_bill.buildtype = 1
  724. uo_bill.moneyid = uc_moneyid
  725. //
  726. ll_printid = 0
  727. FOR i = 1 To ds_msttakemx.RowCount()
  728. IF ds_msttakemx.Object.msttakeamt[i] <> 0 Or ds_msttakemx.Object.takeamt[i] <> 0 THEN
  729. ll_printid++
  730. IF uo_bill.acceptmx(ds_msttakemx.Object.takeid[i],&
  731. ds_msttakemx.Object.billcode[i],&
  732. ds_msttakemx.Object.msttakeamt[i],&
  733. ds_msttakemx.Object.takeamt[i],&
  734. ds_msttakemx.Object.oriamt[i],&
  735. ds_msttakemx.Object.msttakeamt[i],&
  736. ds_msttakemx.Object.takeamt[i],&
  737. ds_msttakemx.Object.relbillcode[i],&
  738. arg_msg) = 0 THEN
  739. arg_msg_all = arg_msg_all + '客户:'+ls_cusname+'对数失败,'+arg_msg +'~r~n'
  740. GOTO _next_cust
  741. END IF
  742. END IF
  743. NEXT
  744. IF ll_printid > 0 THEN
  745. IF uo_bill.save_ds(arg_msg,True) = 0 THEN
  746. arg_msg_all = arg_msg_all + '客户:'+ls_cusname+'对数失败,'+arg_msg +'~r~n'
  747. GOTO _next_cust
  748. END IF
  749. IF sys_option_musttake_auditing = 1 then
  750. IF uo_bill.auditing(uo_bill.salebillid,publ_operator,arg_msg,true)=0 then
  751. arg_msg_all = arg_msg_all + '客户:'+ls_cusname+'审核失败,'+arg_msg +'~r~n'
  752. GOTO _next_cust
  753. END IF
  754. END IF
  755. END IF
  756. //COMMIT;
  757. //已收款没有被对完,即代表没有应收款再对,跳出功能.
  758. IF ld_takeamt > 0 THEN EXIT
  759. NEXT
  760. _next_cust:
  761. NEXT
  762. Destroy uo_bill
  763. Destroy ds_take
  764. Destroy ds_msttake
  765. IF Trim(arg_msg_all) <> '' THEN
  766. OpenWithParm(w_message_err,arg_msg_all)
  767. ELSE
  768. MessageBox('系统提示','自动对数操作完成')
  769. END IF
  770. cb_retrieve.TriggerEvent(Clicked!)
  771. end event
  772. event ue_date1();//IF THIS.Text = "本日" THEN
  773. em_firstday.text = string(today(),"yyyy-mm-dd")
  774. em_endday.text = string(today(),"yyyy-mm-dd")
  775. //ELSEIF THIS.Text = "本周" THEN
  776. // int li_DayNum
  777. // li_DayNum = DayNumber(today())
  778. // em_firstday.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  779. // em_endday.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  780. //ELSEIF THIS.Text = "本月" THEN
  781. // int li_Month, li_Year, li_Days
  782. // li_Month = Month(today())
  783. // li_Year = Year(today())
  784. // li_Days = days_in_month(li_Month, li_Year)
  785. // em_firstday.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  786. // em_endday.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  787. //END IF
  788. end event
  789. event ue_date2();//IF THIS.Text = "本日" THEN
  790. // em_firstday.text = string(today(),"yyyy-mm-dd")
  791. // em_endday.text = string(today(),"yyyy-mm-dd")
  792. //ELSEIF THIS.Text = "本周" THEN
  793. int li_DayNum
  794. li_DayNum = DayNumber(today())
  795. em_firstday.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  796. em_endday.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  797. //ELSEIF THIS.Text = "本月" THEN
  798. // int li_Month, li_Year, li_Days
  799. // li_Month = Month(today())
  800. // li_Year = Year(today())
  801. // li_Days = days_in_month(li_Month, li_Year)
  802. // em_firstday.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  803. // em_endday.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  804. //END IF
  805. end event
  806. event ue_date3();//IF THIS.Text = "本日" THEN
  807. // em_firstday.text = string(today(),"yyyy-mm-dd")
  808. // em_endday.text = string(today(),"yyyy-mm-dd")
  809. //ELSEIF THIS.Text = "本周" THEN
  810. // int li_DayNum
  811. // li_DayNum = DayNumber(today())
  812. // em_firstday.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  813. // em_endday.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  814. //ELSEIF THIS.Text = "本月" THEN
  815. int li_Month, li_Year, li_Days
  816. li_Month = Month(today())
  817. li_Year = Year(today())
  818. li_Days = days_in_month(li_Month, li_Year)
  819. em_firstday.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  820. em_endday.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  821. //END IF
  822. end event
  823. event ue_date4();//IF THIS.Text = "本日" THEN
  824. // em_firstday.text = string(today(),"yyyy-mm-dd")
  825. // em_endday.text = string(today(),"yyyy-mm-dd")
  826. //ELSEIF THIS.Text = "本周" THEN
  827. // int li_DayNum
  828. // li_DayNum = DayNumber(today())
  829. // em_firstday.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  830. // em_endday.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  831. //ELSEIF THIS.Text = "本月" THEN
  832. Int li_Month, li_Year, li_Days
  833. li_Month = Month(Today())
  834. li_Year = Year(Today())
  835. IF li_Month = 1 THEN
  836. li_Month = 12
  837. li_Year = li_Year - 1
  838. ELSE
  839. li_Month -= 1
  840. END IF
  841. li_Days = days_in_month(li_Month, li_Year)
  842. em_firstday.Text = String(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  843. em_endday.Text = String(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  844. //END IF
  845. end event
  846. public subroutine wf_refresh_balc ();Long li_row
  847. Long li_id,ll_moneyid,ll_scid
  848. Decimal li_new_balc
  849. dw_pageretr.accepttext()
  850. li_row = dw_pageretr.GetRow()
  851. IF li_row <= 0 THEN RETURN
  852. li_id = dw_pageretr.Object.cusid[li_row]
  853. ll_moneyid = dw_pageretr.Object.v_cus_balcamt_moneyid[li_row]
  854. IF sys_option_scid_msttake_mstpay = 1 THEN
  855. ll_scid = dw_pageretr.Object.v_cus_balcamt_scid[li_row]
  856. ELSE
  857. ll_scid = -1
  858. END IF
  859. SELECT sum(v_cus_balcamt.cus_balcamt)
  860. INTO :li_new_balc
  861. FROM v_cus_balcamt
  862. WHERE ( v_cus_balcamt.cusid = :li_id )
  863. And ( v_cus_balcamt.moneyid = :ll_moneyid )
  864. And ( v_cus_balcamt.scid = :ll_scid or :ll_scid = -1 );
  865. IF sqlca.SQLCode <> 0 THEN RETURN
  866. IF IsNull(li_new_balc) THEN li_new_balc = 0.00
  867. dw_pageretr.Object.v_cus_balcamt_cus_balcamt[li_row] = li_new_balc
  868. dw_pageretr.Object.amt[li_row] = round(li_new_balc * dw_pageretr.Object.rate[li_row],2)
  869. end subroutine
  870. public function integer wf_dispamt ();Int rslt = 0
  871. Long row
  872. dw_msttake.AcceptText()
  873. row = dw_msttake.GetRow()
  874. IF row > 0 And dw_msttake.GetColumnName( ) = 'checkdata' THEN
  875. IF dw_msttake.Object.checkdata[row] = 0 THEN
  876. ins_msttakeamt = ins_msttakeamt+dw_msttake.Object.msttakeamt[row]
  877. ins_takeamt = ins_takeamt+dw_msttake.Object.takeamt[row]
  878. ELSE
  879. ins_msttakeamt = ins_msttakeamt - dw_msttake.Object.msttakeamt[row]
  880. ins_takeamt = ins_takeamt - dw_msttake.Object.takeamt[row]
  881. END IF
  882. st_msttakeamt.Text = '应收金额:'+String(ins_msttakeamt,'####0.##')
  883. st_takeamt.Text = '已收金额:'+String(ins_takeamt,'####0.##')
  884. st_balcamt.Text = '结余金额:'+String(ins_msttakeamt - ins_takeamt,'####0.##')
  885. IF ins_msttakeamt > ins_takeamt THEN
  886. st_balcamt.TextColor = RGB(253,13,31)
  887. ELSE
  888. st_balcamt.TextColor = RGB(0,0,0)
  889. END IF
  890. ELSE
  891. wf_initdisp()
  892. END IF
  893. RETURN rslt
  894. end function
  895. public subroutine wf_initdisp ();ins_msttakeamt = 0
  896. ins_takeamt = 0
  897. st_msttakeamt.Text = '应收金额:0'
  898. st_takeamt.Text = '已收金额:0'
  899. st_balcamt.Text = '结余金额:0'
  900. end subroutine
  901. public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  902. //days in 11 of the 12 months. February is, of course, the problem.
  903. //In a leap year February has 29 days, otherwise 28.
  904. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  905. // Get the number of days per month for a non leap year.
  906. li_DaysInMonth = li_Days[Month]
  907. // Check for a leap year.
  908. If Month = 2 Then
  909. // If the year is a leap year, change the number of days.
  910. // Leap Year Calculation:
  911. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  912. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  913. li_DaysInMonth = 29
  914. End If
  915. End If
  916. //Return the number of days in the relevant month
  917. Return li_DaysInMonth
  918. end function
  919. on w_musttake.create
  920. int iCurrent
  921. call super::create
  922. this.dw_msttake=create dw_msttake
  923. this.cbx_ifshowall=create cbx_ifshowall
  924. this.st_3=create st_3
  925. this.em_firstday=create em_firstday
  926. this.st_4=create st_4
  927. this.em_endday=create em_endday
  928. this.cb_retrieve=create cb_retrieve
  929. this.cb_add=create cb_add
  930. this.cb_delete=create cb_delete
  931. this.dw_msttakemx=create dw_msttakemx
  932. this.ddlb_1=create ddlb_1
  933. this.cb_1=create cb_1
  934. this.cb_4=create cb_4
  935. this.ddlb_2=create ddlb_2
  936. this.ln_bar=create ln_bar
  937. this.ln_bar2=create ln_bar2
  938. this.r_bar=create r_bar
  939. this.ln_1=create ln_1
  940. this.ln_2=create ln_2
  941. this.ln_5=create ln_5
  942. this.ln_6=create ln_6
  943. this.st_amtdisp=create st_amtdisp
  944. this.st_msttakeamt=create st_msttakeamt
  945. this.st_takeamt=create st_takeamt
  946. this.st_balcamt=create st_balcamt
  947. this.cb_salebill=create cb_salebill
  948. this.ddlb_3=create ddlb_3
  949. this.st_2=create st_2
  950. this.st_5=create st_5
  951. this.st_6=create st_6
  952. this.cbx_ifuse=create cbx_ifuse
  953. this.cb_3=create cb_3
  954. this.cbx_all=create cbx_all
  955. this.pb_em1=create pb_em1
  956. this.pb_em2=create pb_em2
  957. this.pb_2=create pb_2
  958. this.cb_take=create cb_take
  959. this.cbx_1=create cbx_1
  960. this.ln_3=create ln_3
  961. this.ln_4=create ln_4
  962. iCurrent=UpperBound(this.Control)
  963. this.Control[iCurrent+1]=this.dw_msttake
  964. this.Control[iCurrent+2]=this.cbx_ifshowall
  965. this.Control[iCurrent+3]=this.st_3
  966. this.Control[iCurrent+4]=this.em_firstday
  967. this.Control[iCurrent+5]=this.st_4
  968. this.Control[iCurrent+6]=this.em_endday
  969. this.Control[iCurrent+7]=this.cb_retrieve
  970. this.Control[iCurrent+8]=this.cb_add
  971. this.Control[iCurrent+9]=this.cb_delete
  972. this.Control[iCurrent+10]=this.dw_msttakemx
  973. this.Control[iCurrent+11]=this.ddlb_1
  974. this.Control[iCurrent+12]=this.cb_1
  975. this.Control[iCurrent+13]=this.cb_4
  976. this.Control[iCurrent+14]=this.ddlb_2
  977. this.Control[iCurrent+15]=this.ln_bar
  978. this.Control[iCurrent+16]=this.ln_bar2
  979. this.Control[iCurrent+17]=this.r_bar
  980. this.Control[iCurrent+18]=this.ln_1
  981. this.Control[iCurrent+19]=this.ln_2
  982. this.Control[iCurrent+20]=this.ln_5
  983. this.Control[iCurrent+21]=this.ln_6
  984. this.Control[iCurrent+22]=this.st_amtdisp
  985. this.Control[iCurrent+23]=this.st_msttakeamt
  986. this.Control[iCurrent+24]=this.st_takeamt
  987. this.Control[iCurrent+25]=this.st_balcamt
  988. this.Control[iCurrent+26]=this.cb_salebill
  989. this.Control[iCurrent+27]=this.ddlb_3
  990. this.Control[iCurrent+28]=this.st_2
  991. this.Control[iCurrent+29]=this.st_5
  992. this.Control[iCurrent+30]=this.st_6
  993. this.Control[iCurrent+31]=this.cbx_ifuse
  994. this.Control[iCurrent+32]=this.cb_3
  995. this.Control[iCurrent+33]=this.cbx_all
  996. this.Control[iCurrent+34]=this.pb_em1
  997. this.Control[iCurrent+35]=this.pb_em2
  998. this.Control[iCurrent+36]=this.pb_2
  999. this.Control[iCurrent+37]=this.cb_take
  1000. this.Control[iCurrent+38]=this.cbx_1
  1001. this.Control[iCurrent+39]=this.ln_3
  1002. this.Control[iCurrent+40]=this.ln_4
  1003. end on
  1004. on w_musttake.destroy
  1005. call super::destroy
  1006. destroy(this.dw_msttake)
  1007. destroy(this.cbx_ifshowall)
  1008. destroy(this.st_3)
  1009. destroy(this.em_firstday)
  1010. destroy(this.st_4)
  1011. destroy(this.em_endday)
  1012. destroy(this.cb_retrieve)
  1013. destroy(this.cb_add)
  1014. destroy(this.cb_delete)
  1015. destroy(this.dw_msttakemx)
  1016. destroy(this.ddlb_1)
  1017. destroy(this.cb_1)
  1018. destroy(this.cb_4)
  1019. destroy(this.ddlb_2)
  1020. destroy(this.ln_bar)
  1021. destroy(this.ln_bar2)
  1022. destroy(this.r_bar)
  1023. destroy(this.ln_1)
  1024. destroy(this.ln_2)
  1025. destroy(this.ln_5)
  1026. destroy(this.ln_6)
  1027. destroy(this.st_amtdisp)
  1028. destroy(this.st_msttakeamt)
  1029. destroy(this.st_takeamt)
  1030. destroy(this.st_balcamt)
  1031. destroy(this.cb_salebill)
  1032. destroy(this.ddlb_3)
  1033. destroy(this.st_2)
  1034. destroy(this.st_5)
  1035. destroy(this.st_6)
  1036. destroy(this.cbx_ifuse)
  1037. destroy(this.cb_3)
  1038. destroy(this.cbx_all)
  1039. destroy(this.pb_em1)
  1040. destroy(this.pb_em2)
  1041. destroy(this.pb_2)
  1042. destroy(this.cb_take)
  1043. destroy(this.cbx_1)
  1044. destroy(this.ln_3)
  1045. destroy(this.ln_4)
  1046. end on
  1047. event resize;call super::resize;ln_bar.endx = this.width
  1048. ln_bar2.endx = this.width
  1049. ln_1.endx = this.width
  1050. ln_2.endx = this.width
  1051. r_bar.width = this.width
  1052. long w_width,w_height
  1053. w_width = 3600
  1054. w_height = 2300
  1055. if newwidth < w_width then this.width = w_width
  1056. if newheight < w_height then this.height = w_height
  1057. dw_pageretr.height=this.height - (w_height - 1745)
  1058. dw_msttake.height=this.height - (w_height - 1104)
  1059. dw_msttake.width=this.width - (w_width - 2082)
  1060. dw_msttakemx.width=this.width - (w_width - 2082)
  1061. dw_msttakemx.y=this.height - (w_height - 1500)
  1062. end event
  1063. event open;call super::open;uo_take = CREATE uo_musttake
  1064. em_firstday.Text = String(Today(),'yyyy-mm')+'-01'
  1065. em_endday.Text = String(Today(),'yyyy-mm-dd')
  1066. cb_retrieve.TriggerEvent(Clicked!)
  1067. end event
  1068. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  1069. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  1070. cb_nextpage_enabled = cb_nextpage.Enabled
  1071. cb_retrieveall_enabled = cb_retrieveall.Enabled
  1072. cb_func_enabled = cb_func.Enabled
  1073. cb_nextpage.Enabled = FALSE
  1074. cb_retrieveall.Enabled = FALSE
  1075. cb_func.Enabled = FALSE
  1076. SetPointer(HourGlass!)
  1077. Int ls_ifshowall
  1078. Int ls_ifuse
  1079. IF cbx_ifshowall.Checked THEN
  1080. ls_ifshowall = 0
  1081. ELSE
  1082. ls_ifshowall = 1
  1083. END IF
  1084. IF cbx_ifuse.Checked THEN
  1085. ls_ifuse = 1
  1086. ELSE
  1087. ls_ifuse = -1
  1088. END IF
  1089. IF sys_option_scid_msttake_mstpay = 1 THEN
  1090. dw_pageretr.Retrieve(ls_ifshowall,cur_scid_arr,sys_option_msttake_cusarea,sys_areaid,ls_ifuse,ins_moneyid)
  1091. ELSE
  1092. dw_pageretr.Retrieve(ls_ifshowall,sys_option_msttake_cusarea,sys_areaid,ls_ifuse,ins_moneyid)
  1093. END IF
  1094. IF dw_pageretr.RowCount() > 0 AND dw_pageretr.GetRow() = 0 THEN dw_pageretr.SetRow(1)
  1095. SetPointer(Arrow!)
  1096. THIS.TriggerEvent('retrieve_pay')
  1097. THIS.TriggerEvent("retrieve_paymx")
  1098. wf_refresh_balc()
  1099. cb_nextpage.Enabled = cb_nextpage_enabled
  1100. cb_retrieveall.Enabled = cb_retrieveall_enabled
  1101. cb_func.Enabled = cb_func_enabled
  1102. end event
  1103. event ue_before_open;call super::ue_before_open;IF sys_option_scid_msttake_mstpay = 1 THEN
  1104. dw_pageretr.DataObject = 'dw_msttake_cust_index'
  1105. ELSE
  1106. dw_pageretr.DataObject = 'dw_msttake_cust_index_not_scid'
  1107. END IF
  1108. dw_pageretr.TriggerEvent(Constructor!)
  1109. em_pagerowno.TriggerEvent(Constructor!)
  1110. dw_msttake.SetTransObject(sqlca)
  1111. dw_msttakemx.SetTransObject(sqlca)
  1112. if_ue_retr = TRUE
  1113. if_ue_filter = TRUE
  1114. if_ue_sort = TRUE
  1115. end event
  1116. event ue_usual_query_retr;String ls_querystrpart = ''
  1117. ls_newselect = Lower(ori_oldselect)
  1118. IF Trim(sle_usual_query.Text) <> '' THEN
  1119. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  1120. ls_querystrpart = "(u_cust.cuscode like '%"+Trim(sle_usual_query.Text)+"%') or (u_cust.name like '%"+Trim(sle_usual_query.Text)+"%') "
  1121. ELSE
  1122. ls_querystrpart = "(u_cust.cuscode like '"+Trim(sle_usual_query.Text)+"') or (u_cust.name like '"+Trim(sle_usual_query.Text)+"')"
  1123. END IF
  1124. //
  1125. IF Pos(ls_newselect," where ") > 0 THEN
  1126. IF Pos(ls_newselect," group by ") > 0 THEN
  1127. ls_newselect = left(ls_newselect, Pos(ls_newselect," group by ") - 1) + " and ("+ls_querystrpart+')' + mid(ls_newselect, Pos(ls_newselect," group by "))
  1128. else
  1129. ls_newselect = ls_newselect+" and ("+ls_querystrpart+')'
  1130. end if
  1131. ELSE
  1132. ls_newselect = ls_newselect+" where ("+ls_querystrpart+')'
  1133. END IF
  1134. END IF
  1135. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  1136. THIS.TriggerEvent('retrieve_pageretr')
  1137. end event
  1138. event ue_usual_query_filt;call super::ue_usual_query_filt;String obj_expr = ''
  1139. IF Trim(sle_usual_query.Text) <> '' THEN
  1140. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  1141. obj_expr = obj_expr+'( cuscode like "%'+Trim(sle_usual_query.Text)+'%" ) or ( name like "%'+Trim(sle_usual_query.Text)+'%" ) '
  1142. ELSE
  1143. obj_expr = obj_expr+'( cuscode like "'+Trim(sle_usual_query.Text)+'" ) or ( cuscode like "'+Trim(sle_usual_query.Text)+'" )'
  1144. END IF
  1145. END IF
  1146. dw_pageretr.SetFilter(obj_expr)
  1147. dw_pageretr.SetRedraw(FALSE)
  1148. dw_pageretr.Filter()
  1149. IF dw_pageretr.RowCount() >= 1 THEN
  1150. dw_pageretr.SelectRow(0,FALSE)
  1151. dw_pageretr.SelectRow(1,TRUE)
  1152. END IF
  1153. dw_pageretr.SetRedraw(TRUE)
  1154. end event
  1155. event user_key;call super::user_key;IF KeyDown(KeyF1!) THEN
  1156. this.TriggerEvent("ue_help")
  1157. end if
  1158. end event
  1159. type cb_func from w_publ_pageretr`cb_func within w_musttake
  1160. integer x = 151
  1161. integer y = 0
  1162. integer width = 151
  1163. integer height = 164
  1164. end type
  1165. type cb_exit from w_publ_pageretr`cb_exit within w_musttake
  1166. integer x = 1344
  1167. integer y = 0
  1168. integer width = 151
  1169. integer height = 164
  1170. integer picsize = 16
  1171. toolbaralignment pic_align = alignattop!
  1172. boolean border = false
  1173. end type
  1174. type sle_usual_query from w_publ_pageretr`sle_usual_query within w_musttake
  1175. integer x = 347
  1176. integer y = 192
  1177. integer width = 553
  1178. end type
  1179. type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_musttake
  1180. integer x = 1865
  1181. integer width = 142
  1182. integer height = 164
  1183. string normalpicname = "p1.ico"
  1184. integer picsize = 16
  1185. toolbaralignment pic_align = alignattop!
  1186. boolean border = false
  1187. end type
  1188. type em_pagerowno from w_publ_pageretr`em_pagerowno within w_musttake
  1189. integer x = 1586
  1190. integer y = 44
  1191. integer width = 279
  1192. end type
  1193. type dw_pageretr from w_publ_pageretr`dw_pageretr within w_musttake
  1194. integer y = 400
  1195. integer width = 1467
  1196. integer height = 1740
  1197. string title = "客户摘要"
  1198. string dataobject = "dw_msttake_cust_index"
  1199. end type
  1200. event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;cb_retrieve.triggerevent(clicked!)
  1201. wf_initdisp()
  1202. end event
  1203. event dw_pageretr::clicked;call super::clicked;IF dwo.Name = "ch" THEN
  1204. THIS.SetTabOrder("ch" , 10)
  1205. ELSE
  1206. THIS.SetTabOrder("ch" , 0)
  1207. END IF
  1208. end event
  1209. type st_1 from w_publ_pageretr`st_1 within w_musttake
  1210. integer x = 14
  1211. integer y = 212
  1212. integer width = 343
  1213. string text = "编号/名称含"
  1214. alignment alignment = center!
  1215. end type
  1216. type cb_nextpage from w_publ_pageretr`cb_nextpage within w_musttake
  1217. integer x = 2007
  1218. integer width = 64
  1219. integer height = 164
  1220. integer picsize = 16
  1221. toolbaralignment pic_align = alignattop!
  1222. boolean border = false
  1223. end type
  1224. type dw_msttake from u_dw_rbtnfilter within w_musttake
  1225. integer x = 1472
  1226. integer y = 400
  1227. integer width = 2075
  1228. integer height = 1100
  1229. integer taborder = 20
  1230. boolean bringtotop = true
  1231. boolean titlebar = true
  1232. string title = "客户应收帐"
  1233. string dataobject = "dw_msttake_index"
  1234. boolean maxbox = true
  1235. boolean hscrollbar = true
  1236. boolean vscrollbar = true
  1237. boolean resizable = true
  1238. boolean border = false
  1239. boolean livescroll = false
  1240. borderstyle borderstyle = stylebox!
  1241. boolean rbutton_filter_use = true
  1242. boolean titleclick_sort_use = true
  1243. end type
  1244. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  1245. THIS.SelectRow(0,FALSE)
  1246. THIS.SelectRow(currentrow,TRUE)
  1247. PARENT.TriggerEvent("retrieve_paymx")
  1248. end event
  1249. event rbuttondown;call super::rbuttondown;//String str_clickedobjecttype
  1250. //String column_name,column_text_name
  1251. //Long FindRow, FindPage
  1252. //boolean lb_title = false
  1253. //IF titleclick_sort_use THEN
  1254. // str_clickedobjecttype = Left(dwo.TYPE,4)
  1255. //
  1256. // IF str_clickedobjecttype = 'text' THEN
  1257. // column_text_name = dwo.Name
  1258. //
  1259. // IF Len(column_text_name) >= 3 AND Right(column_text_name,2) = '_t' THEN
  1260. // column_name = Left(column_text_name,Len(column_text_name) - 2)
  1261. // ELSE
  1262. // GOTO cend
  1263. // END IF
  1264. //
  1265. // IF Left(Describe(column_name+'.type'),4) <> 'colu' AND &
  1266. // Left(Describe(column_name+'.type'),4) <> 'comp' THEN
  1267. // RETURN
  1268. // END IF
  1269. // IF curDW_sortstr = column_name+' A ' THEN
  1270. // curDW_sortstr = column_name+' D '
  1271. // ELSE
  1272. // curDW_sortstr = column_name+' A '
  1273. // END IF
  1274. // lb_title = true
  1275. // ELSE
  1276. // curDW_sortstr = ''
  1277. // END IF
  1278. //
  1279. // IF curDW_sortstr <> '' THEN
  1280. // THIS.SetSort(curDW_sortstr)
  1281. // THIS.SetRedraw (FALSE)
  1282. // THIS.Sort()
  1283. // THIS.SetRedraw (TRUE)
  1284. // END IF
  1285. //END IF
  1286. //cend:
  1287. //if lb_title then return
  1288. //IF row > 0 THEN THIS.SetRow(row)
  1289. //
  1290. //arg_ins_xpos = xpos
  1291. //arg_ins_ypos = ypos +50
  1292. //arg_ins_dwname = dwo.Name
  1293. //arg_ins_dwrow = row
  1294. //arg_ins_dwtype = dwo.TYPE
  1295. //String ls_name
  1296. //ls_name = THIS.GetColumnName( )
  1297. //IF row > 0 AND arg_ins_dwtype <> 'datawindow' THEN
  1298. // arg_ins_dwdata = String(dwo.primary[row])
  1299. //END IF
  1300. //
  1301. //m_msttake m_print
  1302. //m_print = CREATE m_msttake
  1303. //m_print.m_0.PopMenu(THIS.X + THIS.PointerX() + 50,THIS.Y + THIS.PointerY() + 50)
  1304. end event
  1305. event clicked;IF row > 0 THEN
  1306. This.SelectRow(0,False)
  1307. This.SetRow(row)
  1308. This.SelectRow(row,True)
  1309. END IF
  1310. IF dwo.Name = "checkdata" THEN
  1311. This.SetTabOrder("checkdata", 10)
  1312. ELSE
  1313. This.SetTabOrder("checkdata", 0)
  1314. END IF
  1315. end event
  1316. event dwnkey;call super::dwnkey;parent.postevent('user_key')
  1317. end event
  1318. event doubleclicked;call super::doubleclicked;parent.triggerevent('ue_view_bill')
  1319. end event
  1320. event itemchanged;call super::itemchanged;wf_dispamt()
  1321. end event
  1322. type cbx_ifshowall from checkbox within w_musttake
  1323. integer x = 946
  1324. integer y = 304
  1325. integer width = 553
  1326. integer height = 60
  1327. boolean bringtotop = true
  1328. integer textsize = -9
  1329. integer weight = 400
  1330. fontcharset fontcharset = gb2312charset!
  1331. fontpitch fontpitch = variable!
  1332. string facename = "宋体"
  1333. long textcolor = 33554432
  1334. long backcolor = 134217739
  1335. string text = "只显示有欠款客户"
  1336. boolean checked = true
  1337. end type
  1338. event clicked;parent.triggerevent('retrieve_pageretr')
  1339. end event
  1340. type st_3 from statictext within w_musttake
  1341. integer x = 2240
  1342. integer y = 304
  1343. integer width = 197
  1344. integer height = 48
  1345. boolean bringtotop = true
  1346. integer textsize = -9
  1347. integer weight = 400
  1348. fontcharset fontcharset = gb2312charset!
  1349. fontpitch fontpitch = variable!
  1350. string facename = "宋体"
  1351. long textcolor = 33554432
  1352. long backcolor = 134217739
  1353. boolean enabled = false
  1354. string text = "日期从:"
  1355. alignment alignment = right!
  1356. boolean focusrectangle = false
  1357. end type
  1358. type em_firstday from editmask within w_musttake
  1359. integer x = 2418
  1360. integer y = 288
  1361. integer width = 384
  1362. integer height = 92
  1363. integer taborder = 110
  1364. boolean bringtotop = true
  1365. integer textsize = -9
  1366. integer weight = 400
  1367. fontcharset fontcharset = gb2312charset!
  1368. fontpitch fontpitch = variable!
  1369. string facename = "宋体"
  1370. long textcolor = 33554432
  1371. borderstyle borderstyle = stylelowered!
  1372. maskdatatype maskdatatype = datemask!
  1373. string mask = "yyyy-mm-dd"
  1374. boolean spin = true
  1375. end type
  1376. event rbuttondown;s_calender_arg s_calender
  1377. s_calender.PointerX = THIS.PointerX()
  1378. s_calender.PointerY = THIS.PointerY()
  1379. s_calender.X = THIS.X
  1380. s_calender.Y = THIS.Y
  1381. OpenWithParm(w_calendar,s_calender)
  1382. THIS.Text = String(id_date_selected)
  1383. end event
  1384. type st_4 from statictext within w_musttake
  1385. integer x = 2903
  1386. integer y = 304
  1387. integer width = 105
  1388. integer height = 60
  1389. boolean bringtotop = true
  1390. integer textsize = -9
  1391. integer weight = 400
  1392. fontcharset fontcharset = gb2312charset!
  1393. fontpitch fontpitch = variable!
  1394. string facename = "宋体"
  1395. long textcolor = 33554432
  1396. long backcolor = 134217739
  1397. boolean enabled = false
  1398. string text = "到:"
  1399. alignment alignment = right!
  1400. boolean focusrectangle = false
  1401. end type
  1402. type em_endday from editmask within w_musttake
  1403. integer x = 3008
  1404. integer y = 288
  1405. integer width = 384
  1406. integer height = 92
  1407. integer taborder = 120
  1408. boolean bringtotop = true
  1409. integer textsize = -9
  1410. integer weight = 400
  1411. fontcharset fontcharset = gb2312charset!
  1412. fontpitch fontpitch = variable!
  1413. string facename = "宋体"
  1414. long textcolor = 33554432
  1415. borderstyle borderstyle = stylelowered!
  1416. maskdatatype maskdatatype = datemask!
  1417. string mask = "yyyy-mm-dd"
  1418. boolean spin = true
  1419. end type
  1420. event rbuttondown;s_calender_arg s_calender
  1421. s_calender.PointerX = THIS.PointerX()
  1422. s_calender.PointerY = THIS.PointerY()
  1423. s_calender.X = THIS.X
  1424. s_calender.Y = THIS.Y
  1425. OpenWithParm(w_calendar,s_calender)
  1426. THIS.Text = String(id_date_selected)
  1427. end event
  1428. type cb_retrieve from uo_imflatbutton within w_musttake
  1429. integer width = 151
  1430. integer height = 164
  1431. integer taborder = 50
  1432. boolean bringtotop = true
  1433. string text = "刷新"
  1434. string normalpicname = "refresh.bmp"
  1435. integer picsize = 16
  1436. toolbaralignment pic_align = alignattop!
  1437. boolean border = false
  1438. end type
  1439. event clicked;call super::clicked;parent.triggerevent('retrieve_pay')
  1440. parent.triggerevent("retrieve_paymx")
  1441. wf_refresh_balc()
  1442. wf_initdisp()
  1443. //wf_dispamt()
  1444. end event
  1445. type cb_add from uo_imflatbutton within w_musttake
  1446. integer x = 306
  1447. integer width = 192
  1448. integer height = 164
  1449. integer taborder = 60
  1450. boolean bringtotop = true
  1451. string text = "新建&S"
  1452. string normalpicname = "new.bmp"
  1453. integer picsize = 16
  1454. toolbaralignment pic_align = alignattop!
  1455. boolean border = false
  1456. end type
  1457. event clicked;call super::clicked;parent.triggerevent('ue_add')
  1458. end event
  1459. type cb_delete from uo_imflatbutton within w_musttake
  1460. integer x = 494
  1461. integer width = 192
  1462. integer height = 164
  1463. integer taborder = 60
  1464. boolean bringtotop = true
  1465. string text = "删除&D"
  1466. string normalpicname = "delete.bmp"
  1467. integer picsize = 16
  1468. toolbaralignment pic_align = alignattop!
  1469. boolean border = false
  1470. end type
  1471. event clicked;call super::clicked;parent.triggerevent('ue_del')
  1472. end event
  1473. type dw_msttakemx from u_dw_rbtnfilter within w_musttake
  1474. integer x = 1472
  1475. integer y = 1500
  1476. integer width = 2080
  1477. integer height = 644
  1478. integer taborder = 50
  1479. boolean bringtotop = true
  1480. boolean titlebar = true
  1481. string title = "应收帐明细帐"
  1482. string dataobject = "dw_msttakemx_index"
  1483. boolean maxbox = true
  1484. boolean hscrollbar = true
  1485. boolean vscrollbar = true
  1486. boolean resizable = true
  1487. boolean border = false
  1488. borderstyle borderstyle = stylebox!
  1489. end type
  1490. type ddlb_1 from uo_ddlb_scid within w_musttake
  1491. integer x = 347
  1492. integer y = 288
  1493. integer width = 553
  1494. integer height = 1356
  1495. integer taborder = 20
  1496. boolean bringtotop = true
  1497. end type
  1498. event constructor;call super::constructor;cur_scid=this.uo_scid
  1499. cur_scid_arr = THIS.uo_scid_arr
  1500. //this.text='[0]总部'
  1501. end event
  1502. event selectionchanged;call super::selectionchanged;cur_scid = THIS.uo_scid
  1503. cur_scid_arr = THIS.uo_scid_arr
  1504. IF sys_option_scid_msttake_mstpay = 1 THEN
  1505. PARENT.TriggerEvent('retrieve_pageretr')
  1506. END IF
  1507. cb_retrieve.TriggerEvent(Clicked!)
  1508. end event
  1509. type cb_1 from uo_imflatbutton within w_musttake
  1510. integer x = 1152
  1511. integer width = 192
  1512. integer height = 164
  1513. integer taborder = 30
  1514. boolean bringtotop = true
  1515. string text = "对单&F"
  1516. string normalpicname = "update.bmp"
  1517. integer picsize = 16
  1518. toolbaralignment pic_align = alignattop!
  1519. boolean border = false
  1520. end type
  1521. event clicked;call super::clicked;parent.triggerevent('ue_salebill_auto')
  1522. end event
  1523. type cb_4 from uo_imflatbutton within w_musttake
  1524. boolean visible = false
  1525. integer x = 1152
  1526. integer width = 192
  1527. integer height = 164
  1528. integer taborder = 40
  1529. boolean bringtotop = true
  1530. string text = "查单据"
  1531. string normalpicname = "find2.bmp"
  1532. integer picsize = 16
  1533. toolbaralignment pic_align = alignattop!
  1534. boolean border = false
  1535. end type
  1536. event clicked;call super::clicked;parent.triggerevent('ue_view_bill')
  1537. end event
  1538. type ddlb_2 from dropdownlistbox within w_musttake
  1539. integer x = 1696
  1540. integer y = 288
  1541. integer width = 526
  1542. integer height = 1124
  1543. integer taborder = 30
  1544. boolean bringtotop = true
  1545. integer textsize = -9
  1546. integer weight = 400
  1547. fontcharset fontcharset = gb2312charset!
  1548. fontpitch fontpitch = variable!
  1549. string facename = "宋体"
  1550. long textcolor = 33554432
  1551. string text = "[全部]"
  1552. boolean sorted = false
  1553. string item[] = {"[全部]","未结清","已结清"}
  1554. borderstyle borderstyle = stylelowered!
  1555. end type
  1556. event selectionchanged;IF Index = 1 THEN
  1557. finishflag = -1
  1558. ELSEIF Index = 2 THEN
  1559. finishflag = 0
  1560. ELSEIF Index = 3 THEN
  1561. finishflag = 1
  1562. END IF
  1563. cb_retrieve.TriggerEvent(Clicked!)
  1564. end event
  1565. type ln_bar from line within w_musttake
  1566. long linecolor = 268435456
  1567. integer linethickness = 4
  1568. integer beginy = 172
  1569. integer endx = 3429
  1570. integer endy = 172
  1571. end type
  1572. type ln_bar2 from line within w_musttake
  1573. long linecolor = 16777215
  1574. integer linethickness = 4
  1575. integer beginy = 176
  1576. integer endx = 3429
  1577. integer endy = 176
  1578. end type
  1579. type r_bar from rectangle within w_musttake
  1580. long linecolor = 16777215
  1581. long fillcolor = 1073741824
  1582. integer x = 2866
  1583. integer width = 73
  1584. integer height = 172
  1585. end type
  1586. event constructor;this.fillcolor = 14215660
  1587. this.linecolor = 14215660
  1588. this.x = -1
  1589. this.y = -1
  1590. this.height = ln_bar2.beginy - 5
  1591. end event
  1592. type ln_1 from line within w_musttake
  1593. long linecolor = 268435456
  1594. integer linethickness = 4
  1595. integer beginy = 388
  1596. integer endx = 3429
  1597. integer endy = 388
  1598. end type
  1599. type ln_2 from line within w_musttake
  1600. long linecolor = 16777215
  1601. integer linethickness = 4
  1602. integer beginy = 396
  1603. integer endx = 3429
  1604. integer endy = 396
  1605. end type
  1606. type ln_5 from line within w_musttake
  1607. long linecolor = 268435456
  1608. integer beginx = 1518
  1609. integer endx = 1518
  1610. integer endy = 176
  1611. end type
  1612. type ln_6 from line within w_musttake
  1613. long linecolor = 16777215
  1614. integer beginx = 1522
  1615. integer endx = 1522
  1616. integer endy = 180
  1617. end type
  1618. type st_amtdisp from statictext within w_musttake
  1619. integer x = 2085
  1620. integer y = 12
  1621. integer width = 1157
  1622. integer height = 160
  1623. boolean bringtotop = true
  1624. integer textsize = -9
  1625. integer weight = 400
  1626. fontcharset fontcharset = gb2312charset!
  1627. fontpitch fontpitch = variable!
  1628. string facename = "宋体"
  1629. long textcolor = 33554432
  1630. boolean border = true
  1631. boolean focusrectangle = false
  1632. end type
  1633. event constructor;this.backcolor = 14215660
  1634. end event
  1635. type st_msttakeamt from statictext within w_musttake
  1636. integer x = 2098
  1637. integer y = 20
  1638. integer width = 562
  1639. integer height = 60
  1640. boolean bringtotop = true
  1641. integer textsize = -9
  1642. integer weight = 400
  1643. fontcharset fontcharset = gb2312charset!
  1644. fontpitch fontpitch = variable!
  1645. string facename = "宋体"
  1646. string text = "应收金额:12345678.90"
  1647. boolean focusrectangle = false
  1648. end type
  1649. event constructor;this.backcolor = 14215660
  1650. end event
  1651. type st_takeamt from statictext within w_musttake
  1652. integer x = 2674
  1653. integer y = 20
  1654. integer width = 562
  1655. integer height = 60
  1656. boolean bringtotop = true
  1657. integer textsize = -9
  1658. integer weight = 400
  1659. fontcharset fontcharset = gb2312charset!
  1660. fontpitch fontpitch = variable!
  1661. string facename = "宋体"
  1662. string text = "已收金额:12345678.90"
  1663. boolean focusrectangle = false
  1664. end type
  1665. event constructor;this.backcolor = 14215660
  1666. end event
  1667. type st_balcamt from statictext within w_musttake
  1668. integer x = 2103
  1669. integer y = 96
  1670. integer width = 869
  1671. integer height = 60
  1672. boolean bringtotop = true
  1673. integer textsize = -9
  1674. integer weight = 700
  1675. fontcharset fontcharset = gb2312charset!
  1676. fontpitch fontpitch = variable!
  1677. string facename = "宋体"
  1678. string text = "结余金额:12345678.90"
  1679. boolean focusrectangle = false
  1680. end type
  1681. event constructor;this.backcolor = 14215660
  1682. end event
  1683. type cb_salebill from uo_imflatbutton within w_musttake
  1684. boolean visible = false
  1685. integer x = 1344
  1686. integer width = 242
  1687. integer height = 164
  1688. integer taborder = 40
  1689. boolean bringtotop = true
  1690. string text = "收入单&R"
  1691. string normalpicname = "update.bmp"
  1692. integer picsize = 16
  1693. toolbaralignment pic_align = alignattop!
  1694. boolean border = false
  1695. end type
  1696. event clicked;call super::clicked;parent.triggerevent('ue_create_salebill')
  1697. //if not f_power_ind(640) then
  1698. // messagebox('提示','你没有使用权限!',information!,ok!)
  1699. // return
  1700. //end if
  1701. //if cur_id <= 0 then
  1702. // messagebox('提示','请选择客户',information!,ok!)
  1703. // return
  1704. //end if
  1705. //if cur_scid < 0 then
  1706. // messagebox('提示','请选择分部',information!,ok!)
  1707. // return
  1708. //end if
  1709. //s_edit_index_tran s_open_tran
  1710. //s_open_tran.b_long = cur_id
  1711. //s_open_tran.b_string = ''
  1712. //s_open_tran.b_decimal = 0
  1713. // s_open_tran.c_long = cur_scid
  1714. //openwithparm(w_salebill,s_open_tran)
  1715. //
  1716. //wf_refresh_balc()
  1717. //parent.triggerevent('retrieve_pay')
  1718. end event
  1719. type ddlb_3 from dropdownlistbox within w_musttake
  1720. integer x = 1696
  1721. integer y = 192
  1722. integer width = 526
  1723. integer height = 1808
  1724. integer taborder = 40
  1725. boolean bringtotop = true
  1726. integer textsize = -9
  1727. integer weight = 400
  1728. fontcharset fontcharset = gb2312charset!
  1729. fontpitch fontpitch = variable!
  1730. string facename = "宋体"
  1731. long textcolor = 33554432
  1732. boolean sorted = false
  1733. borderstyle borderstyle = stylelowered!
  1734. end type
  1735. event constructor;Long ll_moneyid,i
  1736. String ls_name
  1737. DECLARE getmx CURSOR FOR
  1738. SELECT moneyid,Name FROM cw_currency Order By moneyid ;
  1739. OPEN getmx;
  1740. DO WHILE sqlca.SQLCode = 0
  1741. FETCH getmx INTO :ll_moneyid,:ls_name ;
  1742. IF sqlca.SQLCode <> 0 THEN EXIT
  1743. THIS.AddItem(ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']')
  1744. i++
  1745. if i=1 then
  1746. this.text=ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']'
  1747. ins_moneyid=ll_moneyid
  1748. end if
  1749. LOOP
  1750. CLOSE getmx;
  1751. THIS.AddItem('全部'+Fill(' ',50)+'['+String(-1)+']')
  1752. end event
  1753. event selectionchanged; ins_moneyid=Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  1754. parent.triggerevent('retrieve_pageretr')
  1755. cb_retrieve.triggerevent(clicked!)
  1756. end event
  1757. type st_2 from statictext within w_musttake
  1758. integer x = 210
  1759. integer y = 304
  1760. integer width = 133
  1761. integer height = 48
  1762. boolean bringtotop = true
  1763. integer textsize = -9
  1764. integer weight = 400
  1765. fontcharset fontcharset = gb2312charset!
  1766. fontpitch fontpitch = variable!
  1767. string facename = "宋体"
  1768. long textcolor = 33554432
  1769. long backcolor = 134217739
  1770. string text = "分部"
  1771. alignment alignment = right!
  1772. boolean focusrectangle = false
  1773. end type
  1774. type st_5 from statictext within w_musttake
  1775. integer x = 1545
  1776. integer y = 304
  1777. integer width = 133
  1778. integer height = 48
  1779. boolean bringtotop = true
  1780. integer textsize = -9
  1781. integer weight = 400
  1782. fontcharset fontcharset = gb2312charset!
  1783. fontpitch fontpitch = variable!
  1784. string facename = "宋体"
  1785. long textcolor = 33554432
  1786. long backcolor = 134217739
  1787. string text = "状态"
  1788. alignment alignment = right!
  1789. boolean focusrectangle = false
  1790. end type
  1791. type st_6 from statictext within w_musttake
  1792. integer x = 1554
  1793. integer y = 212
  1794. integer width = 133
  1795. integer height = 48
  1796. boolean bringtotop = true
  1797. integer textsize = -9
  1798. integer weight = 400
  1799. fontcharset fontcharset = gb2312charset!
  1800. fontpitch fontpitch = variable!
  1801. string facename = "宋体"
  1802. long textcolor = 33554432
  1803. long backcolor = 134217739
  1804. string text = "币种"
  1805. alignment alignment = center!
  1806. boolean focusrectangle = false
  1807. end type
  1808. type cbx_ifuse from checkbox within w_musttake
  1809. integer x = 946
  1810. integer y = 212
  1811. integer width = 466
  1812. integer height = 60
  1813. boolean bringtotop = true
  1814. integer textsize = -9
  1815. integer weight = 400
  1816. fontcharset fontcharset = gb2312charset!
  1817. fontpitch fontpitch = variable!
  1818. string facename = "宋体"
  1819. long textcolor = 33554432
  1820. long backcolor = 134217739
  1821. string text = "只显示有效客户"
  1822. boolean checked = true
  1823. end type
  1824. event clicked;parent.triggerevent('retrieve_pageretr')
  1825. end event
  1826. type cb_3 from uo_imflatbutton within w_musttake
  1827. integer x = 878
  1828. integer width = 274
  1829. integer height = 164
  1830. integer taborder = 30
  1831. boolean bringtotop = true
  1832. string text = "辅助功能"
  1833. string normalpicname = "other.bmp"
  1834. integer picsize = 16
  1835. toolbaralignment pic_align = alignattop!
  1836. boolean border = false
  1837. end type
  1838. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  1839. String menustr
  1840. menustr = "Text=查单据~tEvent=ue_view_bill"
  1841. menustr = menustr + "|" + "Text=-"
  1842. menustr = menustr + "|" + "Text=对单~tEvent=ue_salebill_auto"
  1843. menustr = menustr + "|" + "Text=自动对单~tEvent=ue_salebill_auto_p"
  1844. menustr = menustr + "|" + "Text=-"
  1845. menustr = menustr + "|" + "Text=辅助建立客户对数单~tEvent=ue_create_salebill"
  1846. menustr = menustr + "|" + "Text=辅助建立客户收款单~tEvent=ue_create_cusamt"
  1847. menustr = menustr + "|" + "Text=辅助建立客户费用单~tEvent=ue_create_reissue"
  1848. IF Len(Trim(menustr)) <> 0 THEN
  1849. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  1850. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  1851. dmPopupMenu.mf_PopMenu()
  1852. DESTROY dmPopupMenu
  1853. END IF
  1854. end event
  1855. type cbx_all from checkbox within w_musttake
  1856. integer y = 300
  1857. integer width = 229
  1858. integer height = 60
  1859. boolean bringtotop = true
  1860. integer textsize = -9
  1861. integer weight = 400
  1862. fontcharset fontcharset = gb2312charset!
  1863. fontpitch fontpitch = variable!
  1864. string facename = "宋体"
  1865. long textcolor = 33554432
  1866. long backcolor = 134217739
  1867. string text = "全选"
  1868. end type
  1869. event clicked;Long i
  1870. dw_pageretr.SetRedraw(FALSE)
  1871. IF THIS.Checked THEN
  1872. FOR i = 1 TO dw_pageretr.RowCount()
  1873. dw_pageretr.Object.ch[i] = 1
  1874. NEXT
  1875. ELSE
  1876. FOR i = 1 TO dw_pageretr.RowCount()
  1877. dw_pageretr.Object.ch[i] = 0
  1878. NEXT
  1879. END IF
  1880. dw_pageretr.SetRedraw(TRUE)
  1881. end event
  1882. type pb_em1 from picturebutton within w_musttake
  1883. integer x = 2802
  1884. integer y = 288
  1885. integer width = 101
  1886. integer height = 92
  1887. integer taborder = 20
  1888. boolean bringtotop = true
  1889. integer textsize = -9
  1890. integer weight = 400
  1891. fontcharset fontcharset = gb2312charset!
  1892. fontpitch fontpitch = variable!
  1893. string facename = "宋体"
  1894. string picturename = "date.BMP"
  1895. alignment htextalign = left!
  1896. end type
  1897. event clicked;em_firstday.triggerevent(rbuttondown!)
  1898. end event
  1899. type pb_em2 from picturebutton within w_musttake
  1900. integer x = 3392
  1901. integer y = 288
  1902. integer width = 101
  1903. integer height = 92
  1904. integer taborder = 30
  1905. boolean bringtotop = true
  1906. integer textsize = -9
  1907. integer weight = 400
  1908. fontcharset fontcharset = gb2312charset!
  1909. fontpitch fontpitch = variable!
  1910. string facename = "宋体"
  1911. string picturename = "date.BMP"
  1912. alignment htextalign = left!
  1913. end type
  1914. event clicked;em_endday.triggerevent(rbuttondown!)
  1915. end event
  1916. type pb_2 from picturebutton within w_musttake
  1917. integer x = 3493
  1918. integer y = 288
  1919. integer width = 101
  1920. integer height = 92
  1921. integer taborder = 40
  1922. boolean bringtotop = true
  1923. integer textsize = -9
  1924. integer weight = 400
  1925. fontcharset fontcharset = gb2312charset!
  1926. fontpitch fontpitch = variable!
  1927. string facename = "宋体"
  1928. string picturename = "date1.BMP"
  1929. alignment htextalign = left!
  1930. end type
  1931. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  1932. string menustr
  1933. menustr="Text=本日~tEvent=ue_date1"
  1934. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  1935. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  1936. menustr = menustr + "|" + "Text=上月~tEvent=ue_date4"
  1937. if len(trim(menustr))<>0 then
  1938. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  1939. dmPopupMenu.mf_BuildMenu(This, menustr)
  1940. dmPopupMenu.mf_PopMenu()
  1941. Destroy dmPopupMenu
  1942. end if
  1943. end event
  1944. type cb_take from uo_imflatbutton within w_musttake
  1945. integer x = 690
  1946. integer width = 192
  1947. integer height = 164
  1948. integer taborder = 70
  1949. boolean bringtotop = true
  1950. string text = "收款&A"
  1951. string normalpicname = "audit.bmp"
  1952. integer picsize = 16
  1953. toolbaralignment pic_align = alignattop!
  1954. boolean border = false
  1955. end type
  1956. event clicked;call super::clicked;parent.triggerevent('ue_take')
  1957. end event
  1958. type cbx_1 from checkbox within w_musttake
  1959. integer x = 2245
  1960. integer y = 204
  1961. integer width = 229
  1962. integer height = 60
  1963. boolean bringtotop = true
  1964. integer textsize = -9
  1965. integer weight = 400
  1966. fontcharset fontcharset = gb2312charset!
  1967. fontpitch fontpitch = variable!
  1968. string facename = "宋体"
  1969. long textcolor = 33554432
  1970. long backcolor = 134217739
  1971. string text = "全选"
  1972. end type
  1973. event clicked;Long i
  1974. dw_msttake.SetRedraw(FALSE)
  1975. IF THIS.Checked THEN
  1976. FOR i = 1 TO dw_msttake.RowCount()
  1977. IF dw_msttake.Object.finishflag[i]=0 then
  1978. dw_msttake.Object.checkdata[i] = 1
  1979. end if
  1980. NEXT
  1981. ELSE
  1982. FOR i = 1 TO dw_msttake.RowCount()
  1983. dw_msttake.Object.checkdata[i] = 0
  1984. NEXT
  1985. END IF
  1986. dw_msttake.SetRedraw(TRUE)
  1987. end event
  1988. type ln_3 from line within w_musttake
  1989. long linecolor = 16777215
  1990. integer linethickness = 4
  1991. integer beginx = 1522
  1992. integer beginy = 188
  1993. integer endx = 1522
  1994. integer endy = 384
  1995. end type
  1996. type ln_4 from line within w_musttake
  1997. long linecolor = 268435456
  1998. integer linethickness = 4
  1999. integer beginx = 1518
  2000. integer beginy = 180
  2001. integer endx = 1518
  2002. integer endy = 380
  2003. end type