12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955 |
- $PBExportHeader$w_salebill.srw
- forward
- global type w_salebill from w_publ_pageretr
- end type
- type dw_uc from datawindow within w_salebill
- end type
- type dw_child from u_dw_rbtnfilter within w_salebill
- end type
- type cb_delet from uo_imflatbutton within w_salebill
- end type
- type cb_addzy from uo_imflatbutton within w_salebill
- end type
- type cb_auditing from uo_imflatbutton within w_salebill
- end type
- type cb_cauditing from uo_imflatbutton within w_salebill
- end type
- type cb_print from uo_imflatbutton within w_salebill
- end type
- type cb_retrieve from uo_imflatbutton within w_salebill
- end type
- type st_3 from statictext within w_salebill
- end type
- type ddlb_status from dropdownlistbox within w_salebill
- end type
- type cb_help from uo_imflatbutton within w_salebill
- end type
- type cb_add from uo_imflatbutton within w_salebill
- end type
- type cb_edit from uo_imflatbutton within w_salebill
- end type
- type cb_reset from uo_imflatbutton within w_salebill
- end type
- type ln_bar from line within w_salebill
- end type
- type ln_bar2 from line within w_salebill
- end type
- type r_bar from rectangle within w_salebill
- end type
- type ln_1 from line within w_salebill
- end type
- type ln_2 from line within w_salebill
- end type
- end forward
- global type w_salebill from w_publ_pageretr
- integer width = 3602
- integer height = 2300
- string title = "客户对数单"
- boolean maxbox = true
- windowstate windowstate = maximized!
- event retrieve_childdw ( )
- event retrieve_childdw_uc ( )
- event refresh_interface ( )
- event ue_f7 ( )
- event ue_f8 ( )
- event ue_f9 ( )
- event ue_f10 ( )
- event ue_f6 ( )
- event ue_f11 ( )
- event ue_f12 ( )
- event ue_addzy ( )
- dw_uc dw_uc
- dw_child dw_child
- cb_delet cb_delet
- cb_addzy cb_addzy
- cb_auditing cb_auditing
- cb_cauditing cb_cauditing
- cb_print cb_print
- cb_retrieve cb_retrieve
- st_3 st_3
- ddlb_status ddlb_status
- cb_help cb_help
- cb_add cb_add
- cb_edit cb_edit
- cb_reset cb_reset
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- ln_1 ln_1
- ln_2 ln_2
- end type
- global w_salebill w_salebill
- type variables
- int child_column_int=1,uc_column_int=1
- uo_salebill uo_bill
- int cur_flag = -1
- long dw_child_w,dw_child_h,dw_pageretr_w,dw_pageretr_h
- String ls_newname = ''
- Long ll_prownum
- Long ls_powerid
- Int li_auditprint
- String ls_rpname = ''
- end variables
- forward prototypes
- public function integer wf_refresh_interface ()
- public function integer wf_lock_child ()
- public function integer wf_lock_uc ()
- public subroutine wf_autoadd_mx ()
- public function integer wf_refresh_curuc (long arg_salebillid)
- public subroutine wf_addnew (long arg_scid, long arg_id)
- end prototypes
- event retrieve_childdw;long row,uc_relid
- row=dw_pageretr.getrow()
- if row>0 then
- uc_relid=dw_pageretr.object.u_salebill_salebillid[row]
- dw_child.SetRedraw (false)
- dw_child.retrieve(uc_relid)
- dw_child.SetRedraw (true)
- else
- dw_child.reset()
- end if
- end event
- event retrieve_childdw_uc;IF NOT dw_edit_mode THEN
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- END IF
- end event
- event refresh_interface;//被 wf_refresh_interface() 调用,用于界面刷新
- end event
- event ue_f7;//cb_add_xm.triggerevent(clicked!)
- end event
- event ue_f8;////用于选择明细内容,被F8[默认]\dw_child.doubleclicked调用
- //long child_row
- //if child_row=0 then
- // messagebox('系统提示','请选定目标明细行!')
- // return
- //end if
- //
- //s_edit_index_tran s_ch_tran //传递参数使用
- //s_ch_tran.if_retrieve_all=false //是否一次RETRIEVE所有行
- //s_ch_tran.work_mode=1 //0-单纯编辑模式 1-选择\编辑模式
- //s_ch_tran.arg_pkid=0 //目标定位PKID (备用)
- ////查询列(物料编码)部分内容,用于初步筛选
- //s_ch_tran.arg_string_code=trim(dw_child.object.u_mtrldef_mtrlcode[child_row])
- //
- //OPENwithparm(W_materiel,s_ch_tran) //调用
- //
- //S_materiel S_INSCUST
- //S_INSCUST=Message.PowerObjectParm //接受返回结构
- //IF S_INSCUST.mtrlid>0 THEN //正常返回值则可以取以下值
- //
- //dw_child.object.u_mtrldef_mtrlcode[child_row]
- //dw_child.object.u_mtrldef_unit[child_row]
- //dw_child.object.u_wasterinwaremx_mtrlid[child_row]
- //dw_child.object.u_wasterinwaremx_planprice[child_row]
- //dw_child.object.u_mtrldef_mtrlname[child_row]
- //
- ////S_INSCUST.mtrlid
- ////S_INSCUST.mtrlname
- ////S_INSCUST.mtrlcode
- ////S_INSCUST.unit
- ////S_INSCUST.mtrltype
- ////S_INSCUST.mtrlmode
- ////S_INSCUST.planprice
- //
- ////S_INSCUST.storageid
- ////S_INSCUST.cost
- ////S_INSCUST.price
- ////S_INSCUST.descrp
- ////S_INSCUST.source
- //END IF
- //
- end event
- event ue_f9();IF NOT dw_edit_mode THEN RETURN
- Long child_row
- child_row = dw_uc.GetRow()
- IF child_row = 0 THEN
- MessageBox('提示','请选定单据!',information!,ok!)
- RETURN
- END IF
- IF NOT IsValid(W_cust_edit) THEN
- s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all = local_retrieve_all //是否一次RETRIEVE所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
- s_ch_tran.arg_string_code = ''//查询列(物料编码)部分内容,用于初步筛选
-
- OpenWithParm(W_cust_edit,s_ch_tran) //调用
-
- s_custom S_INSCUST
- S_INSCUST = Message.PowerObjectParm //接受返回结构
-
- IF S_INSCUST.cusid > 0 THEN //正常返回值则可以取以下值
- dw_uc.SetRedraw(FALSE)
- dw_uc.Object.u_salebill_cusid[child_row] = S_INSCUST.cusid
- dw_uc.Object.u_cust_name[child_row] = S_INSCUST.Name
- dw_uc.Object.u_cust_cuscode[child_row] = S_INSCUST.cuscode
- dw_uc.SetRedraw(TRUE)
- END IF
- wf_autoadd_mx()
- dw_uc.SetColumn("u_salebill_billtype")
- END IF
- end event
- event ue_addzy();
- if not f_power_ind(524) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- if dw_edit_mode then return
- string arg_msg='',LS_STR
- long uc_row
- s_inputbox S_SREU
- uc_row=dw_pageretr.getrow()
- if uc_row<=0 then
- messagebox('提示','请选定当前目标单据!',information!,ok!)
- return
- end if
- S_SREU.TITLE='请输入要补充到备注的内容'
- S_SREU.OLD_TEXT=''
- openwithparm(w_inputbox,S_SREU)
- LS_STR=Message.StringParm
- if trim(LS_STR)='' or isnull(LS_STR) then return
- if uo_bill.add_dscrp(dw_pageretr.object.u_salebill_salebillid[uc_row],LS_STR,arg_msg,true)=0 then
- messagebox('提示',arg_msg,stopsign!,ok!)
- return
- else
- messagebox('提示','添加备注操作成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.object.u_salebill_salebillid[uc_row])
- end if
- end event
- public function integer wf_refresh_interface ();//wf_refresh_interface
- IF dw_edit_mode THEN
- cb_addzy.Enabled = FALSE
- cb_retrieve.Enabled = FALSE
- cb_delet.Enabled = FALSE
- cb_print.Enabled = FALSE
- cb_auditing.Enabled = FALSE
- cb_cauditing.Enabled = FALSE
- cb_func.Enabled = FALSE
- dw_pageretr.RBUTTON_FILTER_USE = FALSE //右键查询功能开关
- dw_pageretr.titleclick_sort_use = FALSE //单击标题排序功能开关
- cb_edit.Enabled = TRUE
- cb_add.Enabled = TRUE
- cb_reset.Enabled = TRUE
- cb_edit.Text = "放弃&E"
- cb_add.Text = "保存&S"
- cb_edit.normalpicname = 'Undo.bmp'
- cb_add.normalpicname = 'Save.bmp'
- // dw_child.DataObject = 'dw_salebillmx_index'
- // dw_child.SetTransObject (sqlca)
-
- dw_child.Reset()
- ELSE
- cb_addzy.Enabled = TRUE
- cb_retrieve.Enabled = TRUE
- cb_delet.Enabled = TRUE
- cb_print.Enabled = TRUE
- cb_auditing.Enabled = TRUE
- cb_cauditing.Enabled = TRUE
- cb_func.Enabled = TRUE
- cb_reset.Enabled = FALSE
- dw_pageretr.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
- dw_pageretr.titleclick_sort_use = TRUE //单击标题排序功能开关
-
- cb_add.Enabled = TRUE
- cb_edit.Enabled = TRUE
- cb_edit.Text = "修改&E"
- cb_add.Text = "新建&S"
- cb_edit.normalpicname = 'OPEN.bmp'
- cb_add.normalpicname = 'new.bmp'
-
- // dw_child.DataObject = 'dw_salebillmx_edit'
- // dw_child.SetTransObject (sqlca)
- THIS.TriggerEvent('retrieve_childdw')
-
- IF dw_pageretr.GetRow() <= 0 THEN
- cb_addzy.Enabled = FALSE
- cb_auditing.Enabled = FALSE
- END IF
- END IF
- IF retrieve_all OR dw_edit_mode THEN
-
- cb_nextpage.Enabled = FALSE
- cb_retrieveall.Enabled = FALSE
- em_pagerowno.Enabled = FALSE
- sle_usual_query.Enabled = FALSE
- ELSE
-
- cb_nextpage.Enabled = TRUE
- cb_retrieveall.Enabled = TRUE
- em_pagerowno.Enabled = TRUE
- sle_usual_query.Enabled = TRUE
- END IF
- wf_lock_child()
- wf_lock_uc()
- cb_edit.of_init_draw()
- cb_add.of_init_draw()
- cb_edit.of_paint()
- cb_add.of_paint()
- cb_add.TriggerEvent('ue_textchange')
- cb_edit.TriggerEvent('ue_textchange')
- THIS.TriggerEvent('refresh_interface')
- RETURN 1
- end function
- public function integer wf_lock_child ();//wf_lock_child
- INT LS_INT
- IF dw_edit_mode THEN
- FOR LS_INT=1 TO child_column_int
- dw_child.SetTabOrder (LS_INT,LS_INT*10 )
- NEXT
- ELSE
- FOR LS_INT=1 TO child_column_int
- dw_child.SetTabOrder (LS_INT, 0)
- NEXT
- END IF
- RETURN 1
- end function
- public function integer wf_lock_uc ();//wf_lock_uc
- INT LS_INT
- long ls_row
- ls_row=dw_uc.getrow()
- IF dw_edit_mode THEN
- FOR LS_INT=1 TO uc_column_int
- dw_uc.SetTabOrder (LS_INT,LS_INT*10 )
- NEXT
- ELSE
- FOR LS_INT=1 TO uc_column_int
- dw_uc.SetTabOrder (LS_INT, 0)
- NEXT
- END IF
- if ls_row>0 then dw_uc.setrow(ls_row)
- RETURN 1
- end function
- public subroutine wf_autoadd_mx ();Long ucrow,ls_cusid,li_row
- Long ls_takeid,ll_moneyid
- String ls_billcode
- Decimal ls_oriamt,ls_Msttakeamt,ls_takeamt
- DateTime ls_takedate
- dw_uc.accepttext()
- ucrow = dw_uc.GetRow()
- IF ucrow <= 0 THEN RETURN
- ls_cusid = dw_uc.Object.u_salebill_cusid[ucrow]
- ll_moneyid=dw_uc.object.u_salebill_moneyid[ucrow]
- IF ls_cusid = 0 THEN
- dw_child.Reset()
- RETURN
- END IF
- //dw_child.Reset()
- // DECLARE take_cur CURSOR FOR
- // SELECT U_Bmsttake.takeid,
- // U_Bmsttake.Billcode,
- // U_Bmsttake.oriamt,
- // U_Bmsttake.Msttakeamt,
- // U_Bmsttake.takeamt,
- // U_Bmsttake.takedate
- // FROM U_Bmsttake
- // WHERE U_Bmsttake.finishflag = 0 AND cusid = :ls_cusid
- // Order By U_Bmsttake.takedate Asc ;
- //
- // OPEN take_cur;
- // FETCH take_cur INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- // DO WHILE sqlca.SQLCode = 0
- // li_row = dw_child.InsertRow(0)
- // dw_child.Object.takeid [li_row] = ls_takeid
- // dw_child.Object.u_bmsttake_takedate[li_row] = ls_takedate
- // dw_child.Object.u_bmsttake_oriamt[li_row] = ls_oriamt
- // dw_child.Object.u_bmsttake_billcode[li_row] = ls_billcode
- // dw_child.Object.u_bmsttake_msttakeamt[li_row] = ls_Msttakeamt
- // dw_child.Object.u_bmsttake_takeamt[li_row] = ls_takeamt
- //
- // FETCH take_cur INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- // LOOP
- // CLOSE take_cur;
- //
- dw_child.Reset()
- IF dw_uc.Object.u_salebill_billtype[ucrow] = 1 THEN
- DECLARE take_cur CURSOR FOR
- SELECT U_Bmsttake.takeid,
- U_Bmsttake.Billcode,
- U_Bmsttake.oriamt,
- U_Bmsttake.Msttakeamt,
- U_Bmsttake.takeamt,
- U_Bmsttake.takedate
- FROM U_Bmsttake
- WHERE U_Bmsttake.finishflag = 0 AND cusid = :ls_cusid and
- U_Bmsttake.Msttakeamt - U_Bmsttake.takeamt>0 and (U_Bmsttake.Msttakeamt<>0)
- and u_bmsttake.moneyid=:ll_moneyid Order By U_Bmsttake.takedate Asc ;
-
- OPEN take_cur;
- FETCH take_cur INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- DO WHILE sqlca.SQLCode = 0
- li_row = dw_child.InsertRow(0)
- dw_child.Object.takeid [li_row] = ls_takeid
- dw_child.Object.takedate[li_row] = ls_takedate
- dw_child.Object.oriamt[li_row] = ls_oriamt
- dw_child.Object.billcode[li_row] = ls_billcode
- dw_child.Object.mainmsttakeamt[li_row] = ls_Msttakeamt
- dw_child.Object.maintakeamt[li_row] = ls_takeamt
-
- FETCH take_cur INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- LOOP
- CLOSE take_cur;
- ELSEIF dw_uc.Object.u_salebill_billtype[ucrow] = 2 THEN
-
- DECLARE take_cur1 CURSOR FOR
- SELECT U_Bmsttake.takeid,
- U_Bmsttake.Billcode,
- U_Bmsttake.oriamt,
- U_Bmsttake.Msttakeamt,
- U_Bmsttake.takeamt,
- U_Bmsttake.takedate
- FROM U_Bmsttake
- WHERE U_Bmsttake.finishflag = 0 AND cusid = :ls_cusid and
- U_Bmsttake.Msttakeamt - U_Bmsttake.takeamt<0 and (U_Bmsttake.Msttakeamt<>0)
- and u_bmsttake.moneyid=:ll_moneyid Order By U_Bmsttake.takedate Asc ;
-
- OPEN take_cur1;
- FETCH take_cur1 INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- DO WHILE sqlca.SQLCode = 0
- li_row = dw_child.InsertRow(0)
- dw_child.Object.takeid [li_row] = ls_takeid
- dw_child.Object.takedate[li_row] = ls_takedate
- dw_child.Object.oriamt[li_row] = ls_oriamt
- dw_child.Object.billcode[li_row] = ls_billcode
- dw_child.Object.mainmsttakeamt[li_row] = ls_Msttakeamt
- dw_child.Object.maintakeamt[li_row] = ls_takeamt
-
- FETCH take_cur1 INTO :ls_takeid,:ls_billcode,:ls_oriamt,:ls_Msttakeamt,:ls_takeamt,:ls_takedate;
- LOOP
- CLOSE take_cur1;
- END IF
- // takeid
- // u_bmsttake_takedate
- // u_bmsttake_oriamt
- // u_bmsttake_billcode
- // u_bmsttake_msttakeamt
- // u_bmsttake_takeamt
- //
- end subroutine
- public function integer wf_refresh_curuc (long arg_salebillid);//wf_refresh_curuc
- IF arg_salebillid <= 0 OR IsNull(arg_salebillid) THEN RETURN 0
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN RETURN 0
- String relcode,dscrp,opemp,taketype,auditrep,inrep,salebillcode
- DateTime takedate,opdate,auditdate
- Decimal msttakeamt,takeamt
- Long cusid,moneyid
- Int flag
- String custname
- String cuscode
- long accountsid
- long itemid
- SELECT u_salebill.salebillcode,
- u_salebill.relcode,
- u_salebill.takedate,
- u_salebill.msttakeamt,
- u_salebill.takeamt,
- u_salebill.cusid,
- u_salebill.dscrp,
- u_salebill.opdate,
- u_salebill.opemp,
- u_salebill.taketype,
- u_salebill.auditdate,
- u_salebill.auditrep,
- u_salebill.flag,
- u_salebill.inrep,
- u_salebill.moneyid,
- u_cust.name,
- u_cust.cuscode ,
- u_salebill.accountsid,
- u_salebill.itemid
- INTO :salebillcode,
- :relcode,
- :takedate,
- :msttakeamt,
- :takeamt,
- :cusid,
- :dscrp,
- :opdate,
- :opemp,
- :taketype,
- :auditdate,
- :auditrep,
- :flag,
- :inrep,
- :moneyid,
- :custname ,
- :cuscode ,
- :accountsid,
- :itemid
- FROM u_cust INNER JOIN
- u_salebill ON u_cust.cusid = u_salebill.cusid and
- ( u_salebill.salebillid = :arg_salebillid ) ;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('错误',"查询操作失败(错误单据唯一码)",stopsign!,ok!)
- RETURN 0
- END IF
- dw_pageretr.Object.u_salebill_salebillid[uc_row] = arg_salebillid
- dw_pageretr.Object.u_salebill_salebillcode[uc_row] = salebillcode
- dw_pageretr.Object.u_salebill_takedate[uc_row] = takedate
- dw_pageretr.Object.u_salebill_relcode[uc_row] = relcode
- dw_pageretr.Object.u_salebill_inrep[uc_row] = inrep
- dw_pageretr.Object.u_salebill_msttakeamt[uc_row] = msttakeamt
- dw_pageretr.Object.u_salebill_takeamt[uc_row] = takeamt
- dw_pageretr.Object.u_salebill_dscrp[uc_row] = dscrp
- dw_pageretr.Object.u_salebill_cusid[uc_row] = cusid
- dw_pageretr.Object.u_salebill_opdate[uc_row] = opdate
- dw_pageretr.Object.u_salebill_opemp[uc_row] = opemp
- dw_pageretr.Object.u_salebill_auditdate[uc_row] = auditdate
- dw_pageretr.Object.u_salebill_auditrep[uc_row] = auditrep
- dw_pageretr.Object.u_salebill_flag[uc_row] = flag
- dw_pageretr.Object.u_salebill_moneyid[uc_row] = moneyid
- dw_pageretr.Object.u_cust_cuscode[uc_row] = cuscode
- dw_pageretr.Object.u_cust_name[uc_row] = custname
- dw_pageretr.Object.u_salebill_accountsid[uc_row] = accountsid
- dw_pageretr.Object.u_salebill_itemid[uc_row] = itemid
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- dw_uc.ResetUpdate()
- dw_uc.SetRedraw(TRUE)
- //wf_flagstatus_rf()
- RETURN 1
- end function
- public subroutine wf_addnew (long arg_scid, long arg_id);//
- String ls_cuscode,ls_cusname
- Long uc_row
- IF arg_id = 0 THEN RETURN
- cb_add.TriggerEvent( 'clicked')
- uc_row = dw_uc.GetRow()
- SELECT cuscode,name
- INTO :ls_cuscode,:ls_cusname
- FROM u_cust
- Where cusid = :arg_id;
-
- dw_uc.SetRedraw(FALSE)
- IF sqlca.SQLCode <> 0 THEN
- THIS.TriggerEvent('ue_f9')
- ELSE
- dw_uc.Object.u_salebill_cusid[uc_row] = arg_id
- dw_uc.Object.u_cust_name[uc_row] = ls_cusname
- dw_uc.Object.u_cust_cuscode[uc_row] = ls_cuscode
- wf_autoadd_mx()
- END IF
- dw_uc.SetRedraw(TRUE)
- dw_uc.SetColumn("u_salebill_accountsid")
- end subroutine
- on w_salebill.create
- int iCurrent
- call super::create
- this.dw_uc=create dw_uc
- this.dw_child=create dw_child
- this.cb_delet=create cb_delet
- this.cb_addzy=create cb_addzy
- this.cb_auditing=create cb_auditing
- this.cb_cauditing=create cb_cauditing
- this.cb_print=create cb_print
- this.cb_retrieve=create cb_retrieve
- this.st_3=create st_3
- this.ddlb_status=create ddlb_status
- this.cb_help=create cb_help
- this.cb_add=create cb_add
- this.cb_edit=create cb_edit
- this.cb_reset=create cb_reset
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.r_bar=create r_bar
- this.ln_1=create ln_1
- this.ln_2=create ln_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_uc
- this.Control[iCurrent+2]=this.dw_child
- this.Control[iCurrent+3]=this.cb_delet
- this.Control[iCurrent+4]=this.cb_addzy
- this.Control[iCurrent+5]=this.cb_auditing
- this.Control[iCurrent+6]=this.cb_cauditing
- this.Control[iCurrent+7]=this.cb_print
- this.Control[iCurrent+8]=this.cb_retrieve
- this.Control[iCurrent+9]=this.st_3
- this.Control[iCurrent+10]=this.ddlb_status
- this.Control[iCurrent+11]=this.cb_help
- this.Control[iCurrent+12]=this.cb_add
- this.Control[iCurrent+13]=this.cb_edit
- this.Control[iCurrent+14]=this.cb_reset
- this.Control[iCurrent+15]=this.ln_bar
- this.Control[iCurrent+16]=this.ln_bar2
- this.Control[iCurrent+17]=this.r_bar
- this.Control[iCurrent+18]=this.ln_1
- this.Control[iCurrent+19]=this.ln_2
- end on
- on w_salebill.destroy
- call super::destroy
- destroy(this.dw_uc)
- destroy(this.dw_child)
- destroy(this.cb_delet)
- destroy(this.cb_addzy)
- destroy(this.cb_auditing)
- destroy(this.cb_cauditing)
- destroy(this.cb_print)
- destroy(this.cb_retrieve)
- destroy(this.st_3)
- destroy(this.ddlb_status)
- destroy(this.cb_help)
- destroy(this.cb_add)
- destroy(this.cb_edit)
- destroy(this.cb_reset)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- destroy(this.ln_1)
- destroy(this.ln_2)
- end on
- event closequery;IF dw_edit_mode THEN
- Int ls_row = 0
- dw_UC.AcceptText()
- ls_row = dw_UC.GetNextModified(0, Primary!)+&
- dw_UC.GetNextModified(0, Filter!)+dw_UC.DeletedCount()
- IF ls_row > 0 THEN
- IF MessageBox('询问','单据数据已经改变,是否先保存?',Question!,YesNo!,1 ) = 1 THEN
- RETURN 1
- END IF
- ELSE
-
- ls_row = dw_child.GetNextModified(0, Primary!)+&
- dw_child.GetNextModified(0, Filter!)+dw_child.DeletedCount()
- IF ls_row > 0 THEN
- IF MessageBox('询问','单据明细数据已经改变,是否先保存?',Question!,YesNo!,1 ) = 1 THEN
- RETURN 1
- END IF
- END IF
- END IF
- END IF
- end event
- event user_key;call super::user_key;IF KeyDown(KeyF6!) THEN
- this.TRIGGEREVENT('ue_f6')
- ELSEIF KeyDown(KeyF7!) THEN
- this.TRIGGEREVENT('ue_f7')
- ELSEIF KeyDown(KeyF8!) or KeyDown(KeyShift!) and KeyDown(KeyEnter!) THEN
- this.TRIGGEREVENT('ue_f8')
- ELSEIF KeyDown(KeyF9!) THEN
- this.TRIGGEREVENT('ue_f9')
- ELSEIF KeyDown(KeyF10!) THEN
- this.TRIGGEREVENT('ue_f10')
- ELSEIF KeyDown(KeyF11!) THEN
- this.TRIGGEREVENT('ue_f11')
- ELSEIF KeyDown(KeyF12!) THEN
- this.TRIGGEREVENT('ue_f12')
- elseIF KeyDown(KeyF1!) THEN
- this.TriggerEvent("ue_help")
- end if
- end event
- event open;this.triggerevent('ue_before_open')
- wf_movetocenter()
- if_ue_retr=true
- if_ue_filter=true
- if_ue_sort=true
- OLD_TITLE=THIS.TITLE
- s_tran=Message.PowerObjectParm
- IF not ISNULL(s_tran) then
- retrieve_all=s_tran.if_retrieve_all
- mode=s_tran.work_mode
- arg_pkid=s_tran.arg_pkid
- arg_string_code=s_tran.arg_string_code
- if_sharedata=s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效
- ds_share=s_tran.ds_share
- end if
- //CHOOSE CASE MODE
- // CASE 0
- // THIS.TITLE=OLD_TITLE+' 编辑模式 [F4-新建/保存 F5-编辑/放弃]'
- // CASE 1
- // THIS.TITLE=OLD_TITLE+' 选择模式 [F4-新建/保存 F5-编辑/放弃]'
- //END CHOOSE
- dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关
- dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关
-
- dw_pageretr.SetTransObject (sqlca)
- //pkcolumndbtname=dw_pageretr.Describe("#1.dbname") //取第一列为关键字
- pkcolumndbtname=wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
- ori_oldselect=dw_pageretr.Describe("DataWindow.Table.Select")
- ls_newselect=ori_oldselect
- ds_curquery=CREATE DATASTORE
- ds_curquery.DATAOBJECT='d_extr_find'
- ds_curquery.SetTransObject (sqlca)
- //if mode=1 then cb_mode_itfchg.TRIGGEREVENT(CLICKED!)
- wf_editindex_lockf()
- sle_usual_query.text=trim(arg_string_code)
- if NOT retrieve_all then
- THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve
- else
- if if_sharedata then
- ds_share.sharedata(dw_pageretr)
- else
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- this.TRIGGEREVENT('RETRIEVE_pageretr')
-
- end if
- end if
- IF retrieve_all THEN
- THIS.TRIGGEREVENT("ue_usual_query_filt")
- END IF
- wf_refresh_interface()
- uc_column_int=13 //uc dw前8列可以编辑
- child_column_int=4 //子dw前4列可以编辑
- uo_bill=create uo_salebill
- IF not ISNULL(s_tran) then
-
- if s_tran.b_long>0 then
-
- wf_addnew(s_tran.c_long , s_tran.b_long)
-
- end if
-
- end if
- end event
- event ue_before_open;dw_child.settransobject(sqlca)
- dw_uc.settransobject(sqlca)
- end event
- event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
- Boolean cb_priorpage_enabled,cb_retrieve_enabled
-
- cb_nextpage_enabled = cb_nextpage.Enabled
- cb_retrieveall_enabled = cb_retrieveall.Enabled
-
- cb_nextpage.Enabled = FALSE
- cb_retrieveall.Enabled = FALSE
- datawindowchild childdw
- dw_uc.SetTransObject (sqlca)
- dw_uc.GetChild("u_salebill_accountsid",childdw)
- childdw.SetTransObject (sqlca)
-
- IF childdw.Retrieve(sys_user_account) = 0 THEN
- childdw.InsertRow(0)
- END IF
- dw_uc.Retrieve()
- dw_pageretr.Retrieve(cur_flag,sys_areaid)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.triggerevent(rowfocuschanged!)
- end if
- //THIS.TriggerEvent('retreve_childdw')
-
- cb_nextpage.Enabled = cb_nextpage_enabled
- cb_retrieveall.Enabled = cb_retrieveall_enabled
- end event
- event key;this.triggerevent('user_key')
- end event
- event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
- ls_newselect=lower(ori_oldselect)
- if trim(sle_usual_query.text)<>'' then
- if pos(trim(sle_usual_query.text),'%')=0 then
- ls_querystrpart="( u_salebill.salebillcode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="( u_salebill.salebillcode like '"+trim(sle_usual_query.text)+"')"
- end if
- if Pos(ls_newselect," where ") <> 0 then
- ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
- else
- ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
- end if
- end if
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- this.triggerevent('retrieve_pageretr')
- end event
- event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
- if trim(sle_usual_query.text)<>'' then
- IF POS(trim(sle_usual_query.text),'%')=0 THEN
- obj_expr=obj_expr+'( u_salebill_salebillcode LIKE "%'+trim(sle_usual_query.text)+'%" )'
- ELSE
- obj_expr=obj_expr+'( u_salebill_salebillcode LIKE "'+trim(sle_usual_query.text)+'" )'
- END IF
- end if
- dw_pageretr.setfilter(obj_expr)
- dw_pageretr.SetRedraw(False)
- dw_pageretr.filter()
- if dw_pageretr.rowcount()>=1 then
- dw_pageretr.selectrow(0,false)
- dw_pageretr.selectrow(1,true)
- end if
- dw_pageretr.SetRedraw(TRUE)
- end event
- event resize;call super::resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- ln_1.EndX = THIS.Width
- ln_2.EndX = THIS.Width
- r_bar.Width = THIS.Width
- Long w_width,w_height
- w_width = 3602
- w_height = 2300
- IF newwidth < w_width THEN THIS.Width = w_width
- IF newheight < w_height THEN THIS.Height = w_height
- dw_child.Width = THIS.Width - (w_width - dw_child_w)
- dw_child.Height = THIS.Height - (w_height - dw_child_h)
- dw_pageretr.Width = THIS.Width - (w_width - dw_pageretr_w)
- end event
- type cb_func from w_publ_pageretr`cb_func within w_salebill
- integer x = 151
- integer y = 0
- integer width = 151
- integer height = 172
- end type
- type cb_exit from w_publ_pageretr`cb_exit within w_salebill
- integer x = 1888
- integer y = 0
- integer width = 151
- integer height = 172
- integer taborder = 230
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type sle_usual_query from w_publ_pageretr`sle_usual_query within w_salebill
- integer x = 229
- integer y = 188
- integer width = 521
- boolean bringtotop = true
- end type
- type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_salebill
- integer x = 2482
- integer height = 172
- integer taborder = 180
- string normalpicname = "p1.ico"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type em_pagerowno from w_publ_pageretr`em_pagerowno within w_salebill
- integer x = 2139
- integer y = 68
- integer width = 334
- integer taborder = 160
- boolean bringtotop = true
- end type
- type dw_pageretr from w_publ_pageretr`dw_pageretr within w_salebill
- event retrieve_childdw_uc ( )
- integer x = 2007
- integer y = 288
- integer width = 1536
- integer height = 1012
- boolean bringtotop = true
- string title = "单据摘要内容"
- string dataobject = "dw_salebilledit_index"
- end type
- event dw_pageretr::retrieve_childdw_uc();IF NOT dw_edit_mode THEN
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- END IF
- end event
- event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;IF NOT dw_edit_mode THEN
- PARENT.TriggerEvent('retrieve_childdw_uc')
- PARENT.TriggerEvent('retrieve_childdw')
- END IF
- DW_UC.SETROW(currentrow)
- DW_UC.ScrollToRow (currentrow)
- end event
- event dw_pageretr::ue_after_filter;if not dw_edit_mode then parent.triggerevent('retrieve_childdw')
- end event
- event dw_pageretr::constructor;call super::constructor;dw_pageretr_w = this.width
- dw_pageretr_h = this.height
- end event
- type st_1 from w_publ_pageretr`st_1 within w_salebill
- integer x = 32
- integer y = 212
- integer width = 210
- string text = "单号含:"
- end type
- type cb_nextpage from w_publ_pageretr`cb_nextpage within w_salebill
- integer x = 2647
- integer width = 64
- integer height = 172
- integer taborder = 220
- string normalpicname = "p4.ico"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type dw_uc from datawindow within w_salebill
- event dwnkey pbm_dwnkey
- integer y = 300
- integer width = 2011
- integer height = 996
- integer taborder = 80
- string dataobject = "dw_salebilledit_edit"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event dwnkey;PARENT.TriggerEvent('user_key')
- String ls_cuscode
- String ls_cusname
- Long ll_cusid,uc_row
- IF dw_uc.GetColumnName ( ) = 'u_cust_cuscode' AND Key = KeyEnter! THEN
- dw_uc.AcceptText()
- uc_row = dw_uc.GetRow()
- ls_cuscode = Trim(dw_uc.Object.u_cust_cuscode[uc_row])
- SELECT cusid,Name INTO :ll_cusid,:ls_cusname FROM u_cust Where cuscode = :ls_cuscode;
- dw_uc.SetRedraw(FALSE)
- IF sqlca.SQLCode <> 0 THEN
- PARENT.TriggerEvent('ue_f9')
- RETURN 1
- ELSE
- dw_uc.Object.u_salebill_cusid[uc_row] = ll_cusid
- dw_uc.Object.u_cust_name[uc_row] = ls_cusname
- wf_autoadd_mx()
- END IF
- dw_uc.SetRedraw(TRUE)
- dw_uc.SetColumn("u_salebill_accountsid")
- RETURN 1
-
- ELSE
- IF Key = KeyEnter! OR Key = Keydownarrow! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- ELSEIF Key = Keyuparrow! THEN
- keybd_event ( 16, 0, 0 , 0 )
- keybd_event ( 9, 0, 0 , 0 )
- keybd_event ( 9, 0, 2, 0 )
- keybd_event ( 16, 0, 2, 0 )
- RETURN 1
- END IF
- END IF
- //parent.triggerevent('user_key')
- //If key = KeyEnter! Then //
- //keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- //keybd_event ( 9, 0, 2, 0 ) // 释放tab
- //Return 1
- //End If
- //
- end event
- event rowfocuschanged;IF not dw_edit_mode then
- if currentrow >0 THEN
- dw_pageretr.SETROW(currentrow)
- dw_pageretr.ScrollToRow(currentrow)
- dw_pageretr.selectrow(0,false)
- dw_pageretr.selectrow(currentrow,true)
- end if
- // parent.triggerevent('retrieve_childdw')
- end if
- //if currentrow>0 and not dw_edit_mode then
- // if dw_uc.object.flag[currentrow]=1 then
- // cb_auditing.enabled=false
- // cb_delet.enabled=false
- // cb_edit.enabled=false
- // cb_addzy.enabled=true
- // else
- // cb_auditing.enabled=true
- // cb_delet.enabled=true
- // cb_edit.enabled=true
- // cb_addzy.enabled=false
- // end if
- //else
- // cb_auditing.enabled=false
- // cb_delet.enabled=false
- // cb_edit.enabled=false
- // cb_addzy.enabled=false
- //end if
- end event
- event rowfocuschanging;if dw_edit_mode then return 1
- end event
- event doubleclicked;IF dw_edit_mode and row >0 THEN
- parent.triggerevent('ue_f9')
- END IF
- end event
- event buttonclicked;IF dw_edit_mode and row >0 THEN
- parent.triggerevent('ue_f9')
- END IF
- end event
- event itemchanged;if row>0 and dw_edit_mode then
- if dwo.name='u_salebill_billtype' or dwo.name='u_salebill_moneyid' then
- wf_autoadd_mx()
- end if
- end if
- end event
- type dw_child from u_dw_rbtnfilter within w_salebill
- event dwnkey pbm_dwnkey
- integer y = 1300
- integer width = 3543
- integer height = 876
- integer taborder = 30
- boolean bringtotop = true
- boolean titlebar = true
- string title = "单据明细摘要内容"
- string dataobject = "dw_salebillmx_edit"
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean resizable = true
- boolean hsplitscroll = true
- borderstyle borderstyle = stylebox!
- end type
- event dwnkey;call super::dwnkey;If key = KeyEnter! Then //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- return 1
- End If
- parent.triggerevent('user_key')
- end event
- event constructor;call super::constructor;titleclick_sort_use=true
- dw_child_h = THIS.Height
- dw_child_w = THIS.Width
- end event
- event clicked;call super::clicked;IF row>0 and dw_edit_mode THEN
- this.setrow(row)
- end if
- end event
- event rowfocuschanged;//IF dw_edit_mode THEN RETURN
- IF currentrow <=0 THEN RETURN
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- end event
- type cb_delet from uo_imflatbutton within w_salebill
- integer x = 631
- integer width = 151
- integer height = 172
- integer taborder = 250
- boolean bringtotop = true
- string text = "删除"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF Not f_power_ind(653) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- RETURN
- END IF
- IF dw_edit_mode THEN RETURN
- IF Not KeyDown(KeyControl!) THEN
- IF MessageBox ("询问","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
-
- String arg_msg = ''
- Long uc_row
-
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!',information!,ok!)
- RETURN
- END IF
-
- string ll_saledscrp
- long ll_salebillid
- ll_salebillid = dw_pageretr.Object.u_salebill_salebillid[uc_row]
- Select dscrp Into :ll_saledscrp From u_salebill Where salebillid=:ll_salebillid ;
- IF trim(ll_saledscrp) = "客户收款结算单自动生成" THEN
- MessageBox('错误',"单据为自动类型,请撤审相关单据。")
- return
- END IF
- IF uo_bill.del(dw_pageretr.Object.u_salebill_salebillid[uc_row],arg_msg,True) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- ELSE
- MessageBox('提示','删除单据'+String(dw_pageretr.Object.u_salebill_salebillcode[uc_row])+'成功!',information!,ok!)
-
- //日志
- Long ls_id,ls_curid
- String ls_code,ls_opemp
- ls_id = dw_pageretr.Object.u_salebill_salebillid[uc_row]
- ls_curid = dw_pageretr.Object.u_salebill_cusid[uc_row]
- ls_code = dw_pageretr.Object.u_salebill_salebillcode[uc_row]
- ls_opemp = dw_pageretr.Object.u_salebill_opemp[uc_row]
- f_setsysoplog('客户对数单','客户对数单删除,ID:'+String(ls_id)+',客户ID:'+String(ls_curid)+',code:'+ls_code+',建立人:'+ls_opemp,arg_msg,True)
-
- dw_pageretr.DeleteRow(uc_row)
- dw_pageretr.PostEvent(RowFocusChanged!)
- END IF
- ELSE
- IF MessageBox ("询问","是否确定要批删除列表中未审核的单据?",Question!,YesNo! ) = 2 THEN RETURN
-
- Long ll_billid, ll_i
- String ls_msg , ll_dscrp
- Int li_flag
- Long ll_suc,ll_fail
- dw_pageretr.AcceptText()
-
- // li_flag = dw_pageretr.Object.u_salebill_flag[dw_pageretr.GetRow()]
-
- Open(w_sys_wait_jdt) //初始化进度条
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(dw_pageretr.RowCount())
-
- FOR ll_i = 1 To dw_pageretr.RowCount()
- w_sys_wait_jdt.st_msg.Text = dw_pageretr.Object.u_salebill_salebillcode[ll_i] + " 正在删除..." //进度信息
-
- li_flag = dw_pageretr.Object.u_salebill_flag[ll_i]
- IF li_flag = 1 THEN CONTINUE
- ll_billid = dw_pageretr.Object.u_salebill_salebillid[ll_i]
- // ls_taskcode = dw_pageretr.Object.u_salebill_salebillcode[ll_i]
-
-
- Select dscrp Into :ll_dscrp From u_salebill Where salebillid=:ll_billid ;
- IF trim(ll_saledscrp) = "客户收款结算单自动生成" THEN
- ll_fail++
- ls_msg = "单据为自动建立类型单据,请撤审相关单据。"
- CONTINUE
- END IF
-
-
- IF uo_bill.del(ll_billid,arg_msg,True) = 0 THEN
- ll_fail++
- CONTINUE
- END IF
- ll_suc++
-
- w_sys_wait_jdt.wf_inc(ll_i) //进度
- NEXT
- Close(w_sys_wait_jdt)
- MessageBox('提示','批删除成功!成功:'+String(ll_suc)+',失败:'+String(ll_fail) + ls_msg,information!,ok!)
- Parent.TriggerEvent('retrieve_pageretr')
- END IF
- end event
- type cb_addzy from uo_imflatbutton within w_salebill
- integer x = 1335
- integer width = 251
- integer height = 172
- integer taborder = 240
- boolean bringtotop = true
- string text = "单据功能"
- string normalpicname = "other.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=增加备注~tEvent=ue_addzy"
-
- if len(trim(menustr))<>0 then
- dmPopupMenu = Create m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(This, menustr)
- dmPopupMenu.mf_PopMenu()
- Destroy dmPopupMenu
- end if
- end event
- type cb_auditing from uo_imflatbutton within w_salebill
- integer x = 782
- integer width = 151
- integer height = 172
- integer taborder = 250
- string text = "审核"
- string normalpicname = "audit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if not f_power_ind(652) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- if dw_edit_mode then return
- string arg_msg=''
- long pagerert_row
- pagerert_row=dw_pageretr.getrow()
- if pagerert_row<=0 then
- messagebox('提示','请选定当前目标单据!',information!,ok!)
- return
- end if
- if uo_bill.auditing(dw_pageretr.object.u_salebill_salebillid[pagerert_row],publ_operator,arg_msg,true)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- ELSE
- messagebox('提示','审核成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.object.u_salebill_salebillid[pagerert_row])
- end if
- end event
- type cb_cauditing from uo_imflatbutton within w_salebill
- integer x = 933
- integer width = 151
- integer height = 172
- integer taborder = 260
- boolean bringtotop = true
- string text = "撤审"
- string normalpicname = "caudit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if not f_power_ind(652) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- if dw_edit_mode then return
- string arg_msg=''
- long pagerert_row
- pagerert_row=dw_pageretr.getrow()
- if pagerert_row<=0 then
- messagebox('提示','请选定当前目标单据!',information!,ok!)
- return
- end if
- if uo_bill.c_auditing(dw_pageretr.object.u_salebill_salebillid[pagerert_row],publ_operator,arg_msg,true)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- ELSE
- messagebox('提示','撤审成功!',information!,ok!)
- wf_refresh_curuc(dw_pageretr.object.u_salebill_salebillid[pagerert_row])
- end if
- end event
- type cb_print from uo_imflatbutton within w_salebill
- event ue_viewprint ( )
- integer x = 1737
- integer width = 151
- integer height = 172
- integer taborder = 40
- boolean bringtotop = true
- string text = "预览"
- string normalpicname = "preview.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event ue_viewprint();Long ls_msgprintid
- ls_msgprintid = Message.LongParm
- SELECT dft_new_dwname,powerid,auditprint,prownum
- INTO :ls_newname,:ls_powerid,:li_auditprint,:ll_prownum
- FROM sys_dft_dwprint_dynamic
- Where sys_dft_dwprint_dynamic.dwprintid = :ls_msgprintid USING sqlca;
- IF sqlca.SQLCode <> 0 THEN
- ls_newname = ''
- ls_powerid = 0
- END IF
- IF dw_pageretr.RowCount() = 0 THEN
- MessageBox('提示','没有可打印的单据!', Information!, OK! )
- RETURN
- END IF
- Long LS_ROW
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('提示','没有打印目标单据!', Information!, OK! )
- RETURN
- END IF
- S_print_MSG LS_PRMSG
- IF ls_newname <> '' THEN
-
- LS_PRMSG.obj_dwNAME = ls_newname
- ELSE
- LS_PRMSG.obj_dwNAME = 'dw_rp_salebill_print'
- END IF
- LS_PRMSG.TAG_TEXT = '客户对数单'
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.retr_pram_falg = 15
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_salebill_salebillid[LS_ROW]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- OpenWithParm(w_publ_preview,LS_PRMSG)
- end event
- event clicked;call super::clicked;String ls_dft_old_dwname, ls_dft_new_dwname,ls_chnname,ls_dwtype
- Long ls_dwprintid
- String ls_windowname
- Int ls_i
- Long ll_billid
- Int li_ifuse
- Long ll_row
- String Name,ll_rpname
- Long ll_RpID,ll_flag,ll_ifuse
- w_curwin = PARENT
- ls_windowname = PARENT.ClassName ( )
- SELECT billid,ifuse
- INTO :ll_billid,
- :li_ifuse
- FROM u_report_bill
- Where winName = :ls_windowname;
- IF sqlca.SQLCode <> 0 THEN
- li_ifuse = 0
- END IF
- IF li_ifuse = 0 THEN
- DECLARE dft_dwprint CURSOR FOR
- SELECT dwprintid,dft_old_dwname, dft_new_dwname, chnname, dwtype
- FROM sys_dft_dwprint_dynamic
- WHERE dwtype = :ls_windowname
- AND ptype = 0 and ifdefault = 0 ;
-
- OPEN dft_dwprint;
- FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype;
- IF sqlca.SQLCode <> 0 THEN
- TriggerEvent('ue_viewprint',0,0)
- ELSE
- m_dft_dwprint_item m_1
- m_1 = CREATE m_dft_dwprint_item
- ls_i = 1
- DO WHILE sqlca.SQLCode = 0
- f_add_menuItem_dft(m_1,ls_i,ls_chnname,String(ls_dwprintid))
- FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype;
- ls_i++
- LOOP
- CLOSE dft_dwprint;
- m_1.PopMenu(THIS.X+50,THIS.Y+50)
- END IF
- ELSE
- DECLARE rpt_dwprint CURSOR FOR
- SELECT RpID,RpName,Flag,Ifuse
- FROM U_report_list
- WHERE billid = :ll_billid
- Order By RpName;
-
- OPEN rpt_dwprint;
- FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse;
- IF sqlca.SQLCode <> 0 THEN
- PARENT.TriggerEvent('ue_rpt_viewprint',0,0)
- ELSE
- m_rpt_dwprint_item m_2
- m_2 = CREATE m_rpt_dwprint_item
- ls_i = 1
- DO WHILE sqlca.SQLCode = 0
-
- IF f_pow_rpt(ll_RpID) AND ll_ifuse = 1 AND ll_flag = 1 THEN //权限检查f_pow_rpt( )
- f_add_menuItem_rpt(m_2,ls_i,ll_rpname,String(ll_RpID))
- END IF
-
- FETCH rpt_dwprint INTO :ll_RpID,:ll_rpname,:ll_flag,:ll_ifuse;
- ls_i++
- LOOP
- CLOSE rpt_dwprint;
- m_2.Item[1].Visible = FALSE
- m_2.PopMenu(THIS.X+50,THIS.Y+50)
- END IF
- END IF
- end event
- type cb_retrieve from uo_imflatbutton within w_salebill
- integer width = 151
- integer height = 172
- integer taborder = 40
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;parent.triggerevent('retrieve_pageretr')
- end event
- type st_3 from statictext within w_salebill
- integer x = 786
- integer y = 212
- integer width = 201
- integer height = 52
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "状 态:"
- boolean focusrectangle = false
- end type
- type ddlb_status from dropdownlistbox within w_salebill
- integer x = 983
- integer y = 196
- integer width = 352
- integer height = 300
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "[全部]"
- boolean sorted = false
- string item[] = {"[全部]","待审核","已审核"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;if index=1 then
- cur_flag=-1
- elseif index=2 then
- cur_flag=0
- elseif index=3 then
- cur_flag=1
- end if
- parent.triggerevent('retrieve_pageretr')
- end event
- type cb_help from uo_imflatbutton within w_salebill
- string tag = "帮助[F1]"
- integer x = 1586
- integer width = 151
- integer height = 172
- integer taborder = 20
- boolean bringtotop = true
- string text = "帮助"
- string normalpicname = "help.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;parent.triggerevent("ue_help")
- end event
- type cb_add from uo_imflatbutton within w_salebill
- integer x = 302
- integer width = 165
- integer height = 172
- integer taborder = 260
- boolean bringtotop = true
- string text = "新建&S"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT f_power_ind(641) THEN
- MessageBox('提示','你没有使用权限!',information!,ok!)
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row,pagerert_row
- Long relid_pageretr,reld_uc
- Long i,ls_moneyid
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- dw_child.AcceptText()
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('提示','请选定当前目标单据!',information!,ok!)
- RETURN
- END IF
-
- IF NOT dw_uc.Object.u_salebill_takedate[uc_row] > DateTime(2000-01-01,Now()) THEN
- MessageBox('提示','不合理发生时间!',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_salebill_takedate")
- RETURN
- END IF
- IF NOT Len(String(dw_uc.Object.u_salebill_inrep[uc_row])) > 0 THEN
- MessageBox('提示','请填写经手人!',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_salebill_inrep")
- RETURN
- END IF
- IF dw_uc.Object.u_salebill_banktypeid[uc_row] <= 0 THEN
- MessageBox('提示','请填写结算方式!',information!,ok!)
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_salebill_banktypeid")
- RETURN
- END IF
-
- uo_bill.opemp = publ_operator
- uo_bill.takedate = dw_uc.Object.u_salebill_takedate[uc_row]
- uo_bill.relcode = dw_uc.Object.u_salebill_relcode[uc_row]
- uo_bill.inrep = dw_uc.Object.u_salebill_inrep[uc_row]
- uo_bill.banktypeid = dw_uc.Object.u_salebill_banktypeid[uc_row]
- uo_bill.dscrp = dw_uc.Object.u_salebill_dscrp[uc_row]
- uo_bill.cusid = dw_uc.Object.u_salebill_cusid[uc_row]
- uo_bill.msttakeamt = dw_uc.Object.u_salebill_msttakeamt[uc_row]
- uo_bill.takeamt = dw_uc.Object.u_salebill_takeamt[uc_row]
- uo_bill.accountsid = dw_uc.Object.u_salebill_accountsid[uc_row]
- uo_bill.itemid = dw_uc.Object.u_salebill_itemid[uc_row]
- uo_bill.billtype=dw_uc.Object.u_salebill_billtype[uc_row]
- uo_bill.moneyid=dw_uc.object.u_salebill_moneyid[uc_row]
- FOR i = 1 TO dw_child.RowCount()
- IF dw_child.Object.msttakeamt[i] <> 0 OR dw_child.Object.takeamt[i] <> 0 THEN
- IF uo_bill.acceptmx(dw_child.Object.takeid[i],&
- dw_child.Object.billcode[i],&
- dw_child.Object.msttakeamt[i],&
- dw_child.Object.takeamt[i],&
- dw_child.Object.oriamt[i],&
- dw_child.Object.mainmsttakeamt[i],&
- dw_child.Object.maintakeamt[i],&
- '',&
- arg_msg) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
- END IF
- NEXT
-
- IF uo_bill.Save(arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
- MessageBox('提示','保存操作成功!',information!,ok!)
- long ll_row
- ll_row = dw_pageretr.getrow()
- dw_pageretr.SelectRow(0,FALSE)
- dw_pageretr.SelectRow(ll_row,TRUE)
- wf_refresh_curuc(uo_bill.salebillid) //刷新uc
- f_SetProfileString (sys_empid,publ_userid+'_'+dw_uc.DataObject, "moneyid",String(dw_uc.Object.u_salebill_moneyid[dw_uc.GetRow()]))
- ELSE
- IF uo_bill.newbegin() = 0 THEN
- MessageBox('错误',arg_msg,stopsign!,ok!)
- RETURN
- END IF
-
- END IF
- IF NOT dw_edit_mode THEN
-
- int li_row
- li_row = dw_pageretr.InsertRow (1)
- dw_pageretr.ScrollToRow(li_row)
- dw_child.RESET()
- dw_uc.reset()
- dw_UC.SetFocus()
- dw_pageretr.RowsCopy(li_row,li_row, Primary!, dw_uc, 1, Primary!)
- ls_moneyid = long(f_ProfileString (sys_empid,publ_userid+'_'+dw_uc.DataObject, "moneyid",'0'))
- dw_uc.Object.u_salebill_moneyid[dw_uc.GetRow()]=ls_moneyid
- END IF
- dw_edit_mode = NOT dw_edit_mode
- wf_refresh_interface()
- end event
- type cb_edit from uo_imflatbutton within w_salebill
- integer x = 466
- integer width = 165
- integer height = 172
- integer taborder = 270
- boolean bringtotop = true
- string text = "修改&E"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if not f_power_ind(641) then
- messagebox('提示','你没有使用权限!',information!,ok!)
- return
- end if
- string arg_msg=''
- long uc_row
- uc_row=dw_pageretr.getrow()
- if uc_row<=0 then
- messagebox('提示','请选定当前目标单据!',information!,ok!)
- return
- end if
- if not dw_edit_mode then
- if uo_bill.updatebegin(dw_pageretr.object.u_salebill_salebillid[uc_row],arg_msg)=0 then
- messagebox('错误',arg_msg,stopsign!,ok!)
- return
- end if
- end if
- dw_edit_mode= NOT dw_edit_mode
- wf_refresh_interface()
- IF dw_edit_mode THEN
- dw_pageretr.SetFocus()
- parent.triggerevent('retrieve_childdw')
- else
- parent.triggerevent('retrieve_pageretr')
- END IF
- end event
- type cb_reset from uo_imflatbutton within w_salebill
- integer x = 1083
- integer width = 251
- integer height = 172
- integer taborder = 250
- boolean bringtotop = true
- string text = "分配金额"
- string normalpicname = "bill.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;//wf_autoadd_mx()
- dw_uc.accepttext()
- dw_child.accepttext()
- long li_row,i
- decimal msttakeamt=0,takeamt=0,mxtakeamt=0
- li_row=dw_uc.getrow()
- if li_row<=0 then
- messagebox('提示','请选择单据',information!,ok!)
- return
- end if
- if dw_child.rowcount()<=0 then
- messagebox('提示','请选择单据明细',information!,ok!)
- return
- end if
- msttakeamt=dw_uc.object.u_salebill_msttakeamt[li_row]
- takeamt=dw_uc.object.u_salebill_takeamt[li_row]
- //第一次循环:分配应付、计算总可分配
- for i=1 to dw_child.rowcount()
- if msttakeamt > 0 then
- if dw_child.object.mainmsttakeamt[i]<=msttakeamt then
- dw_child.object.msttakeamt[i]=dw_child.object.mainmsttakeamt[i]
- msttakeamt=msttakeamt - dw_child.object.mainmsttakeamt[i]
- else
- dw_child.object.msttakeamt[i]=msttakeamt
- msttakeamt=0
- end if
- end if
-
- takeamt = takeamt - (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
-
- dw_child.object.takeamt[i] = (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
-
- next
- dw_child.accepttext()
- //第二次循环:根据可分配判断正负,修正相关结余(正-负、负-正)
- if takeamt<0 then //不够分配
- for i=dw_child.rowcount() to 1 STEP - 1
- if (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])<=0 then CONTINUE
-
- if dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i] + takeamt <0 then
- dw_child.object.takeamt[i]=0
- takeamt=takeamt + (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
- else
- dw_child.object.takeamt[i]=takeamt + (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
- takeamt=0
- end if
- next
- else // 分配有剩
-
- for i=dw_child.rowcount() to 1 STEP - 1
- if (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])>=0 then CONTINUE
-
- if dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i] + takeamt >0 then
- dw_child.object.takeamt[i]=0
- takeamt=takeamt + (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
- else
- dw_child.object.takeamt[i]=takeamt + (dw_child.object.mainmsttakeamt[i] - dw_child.object.maintakeamt[i])
- takeamt=0
- end if
- next
- end if
- dw_child.accepttext()
- //wf_autoadd_mx()
- //dw_uc.accepttext()
- //dw_child.accepttext()
- //
- //long li_row,i
- //decimal msttakeamt=0,takeamt=0,mxtakeamt=0
- //
- //li_row=dw_uc.getrow()
- //if li_row<=0 then
- // messagebox(publ_operator,'请选择单据')
- // return
- //end if
- //if dw_child.rowcount()<=0 then
- // messagebox(publ_operator,'请单据明细')
- // return
- //end if
- //
- //msttakeamt=dw_uc.object.u_salebill_msttakeamt[li_row]
- //takeamt=dw_uc.object.u_salebill_takeamt[li_row]
- //
- ////第一次循环:分配应付、计算总可分配
- //for i=1 to dw_child.rowcount()
- // if msttakeamt > 0 then
- // if dw_child.object.u_bmsttake_msttakeamt[i]<=msttakeamt then
- // dw_child.object.msttakeamt[i]=dw_child.object.u_bmsttake_msttakeamt[i]
- // msttakeamt=msttakeamt - dw_child.object.u_bmsttake_msttakeamt[i]
- // else
- // dw_child.object.msttakeamt[i]=msttakeamt
- // msttakeamt=0
- // end if
- // end if
- //
- // takeamt = takeamt - (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- //
- // dw_child.object.takeamt[i] = (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- //
- //next
- //dw_child.accepttext()
- //
- ////第二次循环:根据可分配判断正负,修正相关结余(正-负、负-正)
- //if takeamt<0 then //不够分配
- //
- // for i=dw_child.rowcount() to 1 STEP - 1
- // if (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])<=0 then CONTINUE
- //
- // if dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i] + takeamt <0 then
- // dw_child.object.takeamt[i]=0
- // takeamt=takeamt + (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- // else
- // dw_child.object.takeamt[i]=takeamt + (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- // takeamt=0
- // end if
- // next
- //else // 分配有剩
- //
- // for i=dw_child.rowcount() to 1 STEP - 1
- // if (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])>=0 then CONTINUE
- //// if dw_child.Object.u_bmsttake_takeamt[i]=0 then continue
- //
- // if dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i] + takeamt >0 then
- // dw_child.object.takeamt[i]=0
- // takeamt=takeamt + (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- // //dw_child.object.takeamt[i]=takeamt //+ (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- // else
- // dw_child.object.takeamt[i]=takeamt + (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- // takeamt=0
- // end if
- // next
- //end if
- //dw_child.accepttext()
- //
- ////for i=1 to dw_child.rowcount()
- //// if dw_child.object.u_bmsttake_msttakeamt[i] = 0 then
- //// mxtakeamt = mxtakeamt + dw_child.object.u_bmsttake_takeamt[i]
- //// end if
- ////next
- ////
- ////takeamt = takeamt + mxtakeamt
- ////for i=1 to dw_child.rowcount()
- //// if msttakeamt > 0 then
- //// if dw_child.object.u_bmsttake_msttakeamt[i]<=msttakeamt then
- //// dw_child.object.u_bmsttakemx_msttakeamt[i]=dw_child.object.u_bmsttake_msttakeamt[i]
- //// msttakeamt=msttakeamt - dw_child.object.u_bmsttake_msttakeamt[i]
- //// else
- //// dw_child.object.u_bmsttakemx_msttakeamt[i]=msttakeamt
- //// msttakeamt=0
- //// end if
- //// end if
- ////
- //// if takeamt > 0 then
- //// if dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i]<=takeamt then
- //// dw_child.object.u_bmsttakemx_takeamt[i]=dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i]
- //// takeamt=takeamt - (dw_child.object.u_bmsttake_msttakeamt[i] - dw_child.object.u_bmsttake_takeamt[i])
- //// else
- //// dw_child.object.u_bmsttakemx_takeamt[i]=takeamt
- //// takeamt=0
- //// end if
- //// end if
- ////next
- //
- end event
- type ln_bar from line within w_salebill
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 176
- integer endx = 3323
- integer endy = 176
- end type
- type ln_bar2 from line within w_salebill
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 180
- end type
- type r_bar from rectangle within w_salebill
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 3360
- integer width = 73
- integer height = 172
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar2.beginy - 5
- end event
- type ln_1 from line within w_salebill
- long linecolor = 268435456
- integer beginy = 284
- integer endx = 3269
- integer endy = 284
- end type
- type ln_2 from line within w_salebill
- long linecolor = 16777215
- integer beginy = 288
- integer endx = 3273
- integer endy = 288
- end type
|