FrmPreGet.xml1 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Forms>
  3. <Form Name="FrmPreGet">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="收款单";
  9. GetSchema();
  10. Search("SearchSystemSetting");
  11. @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
  12. ChangeMode("Search");
  13. ]]>
  14. </Load>
  15. <Closing>
  16. ;<!--TODO-->
  17. </Closing>
  18. <Closed>
  19. ;<!--TODO-->
  20. </Closed>
  21. </Events>
  22. <Mode>
  23. <Search>
  24. <Lable name="Search" />
  25. </Search>
  26. <New>
  27. <Lable name="New" />
  28. </New>
  29. <View>
  30. <Lable name="View" />
  31. </View>
  32. <Modify>
  33. <Lable name="Modify" />
  34. </Modify>
  35. </Mode>
  36. <Controls>
  37. <IKTextButton name="tbNo" DataSource="PreGet.No_PreGet">
  38. <Events>
  39. <Enter>
  40. if(tbNo.ReadOnly == false)
  41. {
  42. if(tbNo.CValue != StringEmpty())
  43. {
  44. UpdateForm(false, "");
  45. if(Search("SearchPreGetWithNo", tbNo.CValue))
  46. {
  47. ChangeMode("View");
  48. }
  49. else
  50. {
  51. MessageBox("该收款单不存在!",@Title);
  52. }
  53. }
  54. else
  55. {
  56. MessageBox("请输入收款编号!", @Title);
  57. }
  58. }
  59. </Enter>
  60. <Click>
  61. ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
  62. </Click>
  63. </Events>
  64. </IKTextButton>
  65. <IKCheckBox name="ikCkNoPreGetStrikeBalance" DataSource="PreGet.UnPreGetStrikeBalance_PreGet"/>
  66. <IKDataTimePicker name="dtDate" DataSource="PreGet.Date_PreGet" />
  67. <IKTextBox name="txtMaker" DataSource="PreGet.Creator" />
  68. <IKTextButton name="tbCustomerNo" DataSource="PreGet.No_Customer" >
  69. <Events>
  70. <Enter>
  71. UpdateForm(false,"");
  72. if(tbCustomerNo.CValue!=StringEmpty())
  73. {
  74. if(!Search("SearchCustomer",tbCustomerNo.CValue))
  75. {
  76. MessageBox("该客户不存在!",@Title);
  77. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
  78. if(@temp != "")
  79. {
  80. tbCustomerNo.CValue = @temp;
  81. ActiveControlEvent("tbCustomerNo", "Enter");
  82. }
  83. }
  84. else
  85. {
  86. if (Search("SearchCustomersCustomer",tbCustomerNo.CValue))
  87. {
  88. MessageBox("该客户为 "+ #CustomersCustomer.No_Customer +" 的客户,不能填单!");
  89. tbCustomerNo.Text = "";
  90. return;
  91. }
  92. if(!Equals(#Customer.SuspendDate_Customer,DBNull()))
  93. {
  94. MessageBox("该客户已停用!",@Title);
  95. }
  96. #PreGet.ID_Customer=#Customer.ID_Customer;
  97. #PreGet.ShortName_Customer=#Customer.ShortName_Customer;
  98. #PreGet.Balance_PreGet=0;
  99. }
  100. }
  101. else
  102. {
  103. MessageBox("请输入客户编号!",@Title);
  104. #PreGet.ID_Customer=GuidEmpty();
  105. #PreGet.ShortName_Customer="";
  106. #PreGet.Balance_PreGet=0;
  107. tbCustomerNo.Focus();
  108. }
  109. UpdateForm(true,"txtCustomerName");
  110. <!--UpdateForm(true,"ntbBalance");-->
  111. </Enter>
  112. <Click>
  113. if (tbCustomerNo.ReadOnly == false)
  114. {
  115. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
  116. if( @temp == "" )
  117. return;
  118. tbCustomerNo.CValue = @temp;
  119. ActiveControlEvent("tbCustomerNo", "Enter");
  120. }
  121. </Click>
  122. </Events>
  123. </IKTextButton>
  124. <IKTextBox name="txtCustomerName" DataSource="PreGet.ShortName_Customer"/>
  125. <IKComboBoxEx name="cbGetCurrency" DisplaySource="PreGet.GetCurrency_PreGet"/>
  126. <IKComboBoxEx name="cbBillCurrency" DisplaySource="PreGet.Currency_PreGet"/>
  127. <IKNumericTextBox name="txtRate" DataSource="PreGet.Rate_PreGet"/>
  128. <IKComboBoxEx name="cbType" DisplaySource="PreGet.Method_PreGet" DataSource="Method" DisplayMember="Name_TypeDef">
  129. <Events>
  130. <Reload>
  131. UpdateForm(false, "cbType");
  132. Search("SearchMethod");
  133. UpdateForm(true, "cbType");
  134. </Reload>
  135. </Events>
  136. </IKComboBoxEx>
  137. <IKComboBoxEx name="AmountType" DataSource="GetType" DisplayMember="Name_TypeDef">
  138. <Events>
  139. <Reload>
  140. UpdateForm(false,"AmountType");
  141. Search("SearchType");
  142. UpdateForm(true,"AmountType");
  143. </Reload>
  144. </Events>
  145. </IKComboBoxEx>
  146. <IKNumericTextBox name="ntbMoney" DataSource="PreGet.Amount_PreGet"/>
  147. <IKTextBox name="txtVoucherDate" DataSource="PreGet.VoucherDate_PreGet" />
  148. <IKTextBox name="txtVoucherNo" DataSource="PreGet.VoucherNo_PreGet"/>
  149. <IKComboBoxEx name="cbReceiver" ValueSource="PreGet.ID_Receiver" DisplaySource="PreGet.Name_Employee" NoSource="PreGet.No_Receiver" DataSource="Employee" DisplayMember="Name_Employee" NoMember="No_Employee" ValueMember="ID_Employee">
  150. <Events>
  151. <Reload>
  152. UpdateForm(false, "cbReceiver");
  153. Search("SearchReceiver");
  154. UpdateForm(true, "cbReceiver");
  155. </Reload>
  156. </Events>
  157. </IKComboBoxEx>
  158. <!--<IKNumericTextBox name="ntbBalance" DataSource="PreGet.Balance_PreGet"/>-->
  159. <IKTextBox name="txtAssessor" DataSource="PreGet.Assessor" />
  160. <IKDateTimeText name="dtAssessDate" DataSource="PreGet.AssessDate_PreGet" />
  161. <IKTextBox name="txtLastModUser" DataSource="PreGet.LastModUser"/>
  162. <IKDateTimeText name="dtLastModDate" DataSource="PreGet.LastModDate_PreGet"/>
  163. <IKComboBoxEx name="cbComment" DisplaySource="PreGet.Comment_PreGet" DataSource="Comment" DisplayMember="Name_TypeDef">
  164. <Events>
  165. <Reload>
  166. UpdateForm(false, "cbComment");
  167. Search("SearchComment");
  168. UpdateForm(true, "cbComment");
  169. </Reload>
  170. </Events>
  171. </IKComboBoxEx>
  172. <IKFormToolBar name="toolBar">
  173. <Events>
  174. <ClickFirst>
  175. AmountType.SelectedName="";
  176. if(Search("SearchPreGetFirst"))
  177. {
  178. ChangeMode("View");
  179. }
  180. </ClickFirst>
  181. <ClickPrev>
  182. AmountType.SelectedName="";
  183. if(Search("SearchPreGetPrevious", tbNo.CValue))
  184. {
  185. ChangeMode("View");
  186. }
  187. </ClickPrev>
  188. <ClickNext>
  189. AmountType.SelectedName="";
  190. if(Search("SearchPreGetNext",tbNo.CValue))
  191. {
  192. ChangeMode("View");
  193. }
  194. </ClickNext>
  195. <ClickLast>
  196. AmountType.SelectedName="";
  197. if(Search("SearchPreGetLast"))
  198. {
  199. ChangeMode("View");
  200. }
  201. </ClickLast>
  202. <ClickNew>
  203. <![CDATA[
  204. @NextNo = GetNextAutoNumber(true);
  205. if (!Equals(@NextNo, ""))
  206. {
  207. ChangeMode("New");
  208. #PreGet.No_PreGet= @NextNo;
  209. UpdateForm(true, "tbNo");
  210. }
  211. ]]>
  212. </ClickNew>
  213. <ClickEmpty>
  214. ChangeMode("Search");
  215. </ClickEmpty>
  216. <ClickSubmit>
  217. <Lable name="SubmitButtonClick" />
  218. </ClickSubmit>
  219. <ClickModify>
  220. ChangeMode("Modify");
  221. </ClickModify>
  222. <ClickDelete>
  223. Delete();
  224. ChangeMode("Search");
  225. </ClickDelete>
  226. <ClickPrint>
  227. PrintReport();
  228. </ClickPrint>
  229. <ClickAudit>
  230. BeginAudit();
  231. #PreGet.ID_Assessor=GetLoginUserID();
  232. #PreGet.Assessor=GetCurrentUser();
  233. #PreGet.AssessDate_PreGet=DateTimeNow();
  234. Audit();
  235. ChangeMode("View");
  236. EndAudit();
  237. </ClickAudit>
  238. <ClickUnAudit>
  239. BeginUnAudit();
  240. #PreGet.ID_Assessor=DBNull();
  241. #PreGet.Assessor=DBNull();
  242. #PreGet.AssessDate_PreGet=DataTimeNow();
  243. UnAudit();
  244. ChangeMode("View");
  245. EndUnAudit();
  246. </ClickUnAudit>
  247. <ClickImport>
  248. ;
  249. </ClickImport>
  250. <ClickExport>
  251. ;
  252. </ClickExport>
  253. <ClickClose>
  254. ;
  255. </ClickClose>
  256. <ClickExpand>
  257. ;
  258. </ClickExpand>
  259. </Events>
  260. </IKFormToolBar>
  261. </Controls>
  262. <LockInfomation LockID="ID_PreGet" LockNO="No_PreGet" LockSearchFunction="SearchPreGetWithNo" LockAudit="ID_Assessor"/>
  263. <LogInfomation LogNO="#PreGet.No_PreGet" RecordFormField="收款方式:#PreGet.Method_PreGet,客户编号:#PreGet.No_Customer,收款金额:#PreGet.Amount_PreGet" RecordDataGridField=""/>
  264. <ChildForms>
  265. <ChildForm name="BillSearch" DataSource="PreGet" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchPreGetWithNo">
  266. <DataColumn Index="0" MappingName="#PreGet.No_PreGet" HeaderText="收款单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  267. <DataColumn Index="1" MappingName="#PreGet.CreateDate_PreGet" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  268. <DataColumn Index="2" MappingName="#PreGet.No_Customer" HeaderText="客户编号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  269. <DataColumn Index="3" MappingName="#PreGet.ShortName_Customer" HeaderText="客户简称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  270. <DataColumn Index="4" MappingName="#PreGet.Method_PreGet" HeaderText="收款方式" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  271. <DataColumn Index="5" MappingName="#PreGet.Amount_PreGet" HeaderText="金额" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  272. </ChildForm>
  273. <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionByNo="" MappingName="客户">
  274. <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  275. <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  276. <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  277. <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  278. <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
  279. </ChildForm>
  280. </ChildForms>
  281. </Client>
  282. <Server>
  283. <Tables>
  284. <Table name="PreGet" Type="Parent">
  285. <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 PreGet.*,a.Name_User As Creator
  286. ,b.Name_User As Assessor,c.Name_User As LastModUser
  287. ,Customer.No_Customer,Customer.ShortName_Customer
  288. ,Employee.No_Employee As No_Receiver,Employee.Name_Employee
  289. FROM PreGet
  290. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  291. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  292. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  293. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  294. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  295. ">
  296. </GetSchema>
  297. <New CmdType="Text" CmdText=" INSERT INTO PreGet(ID_PreGet
  298. ,No_PreGet
  299. ,UnPreGetStrikeBalance_PreGet
  300. ,Date_PreGet
  301. ,ID_Customer
  302. ,GetCurrency_PreGet
  303. ,Currency_PreGet
  304. ,Rate_PreGet
  305. ,Method_PreGet
  306. ,Amount_PreGet
  307. ,VoucherNo_PreGet
  308. ,VoucherDate_PreGet
  309. ,ID_Receiver
  310. ,Balance_PreGet
  311. ,ID_Creator
  312. ,CreateDate_PreGet
  313. ,LastModUser_PreGet
  314. ,LastModDate_PreGet
  315. ,ID_Assessor
  316. ,AssessDate_PreGet
  317. ,Comment_PreGet)
  318. VALUES(@ID_PreGet
  319. ,@No_PreGet
  320. ,@UnPreGetStrikeBalance_PreGet
  321. ,@Date_PreGet
  322. ,@ID_Customer
  323. ,@GetCurrency_PreGet
  324. ,@Currency_PreGet
  325. ,@Rate_PreGet
  326. ,@Method_PreGet
  327. ,@Amount_PreGet
  328. ,@VoucherNo_PreGet
  329. ,@VoucherDate_PreGet
  330. ,@ID_Receiver
  331. ,@Balance_PreGet
  332. ,@ID_Creator
  333. ,@CreateDate_PreGet
  334. ,@LastModUser_PreGet
  335. ,@LastModDate_PreGet
  336. ,@ID_Assessor
  337. ,@AssessDate_PreGet
  338. ,@Comment_PreGet)
  339. declare @amount decimal(16,4)
  340. select @amount=SUM(Amount_PreGet)
  341. from PreGet
  342. where ID_Customer=@ID_Customer
  343. Update Customer
  344. Set PerValue_Customer = @amount
  345. Where ID_Customer = @ID_Customer
  346. ">
  347. <Params>
  348. <Param name="@ID_PreGet" type="PreGet.ID_PreGet" sourceColumn="ID_PreGet" />
  349. <Param name="@No_PreGet" type="PreGet.No_PreGet" sourceColumn="No_PreGet" />
  350. <Param name="@UnPreGetStrikeBalance_PreGet" type="PreGet.UnPreGetStrikeBalance_PreGet" sourceColumn="UnPreGetStrikeBalance_PreGet" />
  351. <Param name="@Date_PreGet" type="PreGet.Date_PreGet" sourceColumn="Date_PreGet" />
  352. <Param name="@ID_Customer" type="PreGet.ID_Customer" sourceColumn="ID_Customer" />
  353. <Param name="@GetCurrency_PreGet" type="PreGet.GetCurrency_PreGet" sourceColumn="GetCurrency_PreGet" />
  354. <Param name="@Currency_PreGet" type="PreGet.Currency_PreGet" sourceColumn="Currency_PreGet" />
  355. <Param name="@Rate_PreGet" type="PreGet.Rate_PreGet" sourceColumn="Rate_PreGet" />
  356. <Param name="@Method_PreGet" type="PreGet.Method_PreGet" sourceColumn="Method_PreGet" />
  357. <Param name="@Amount_PreGet" type="PreGet.Amount_PreGet" sourceColumn="Amount_PreGet" />
  358. <Param name="@VoucherNo_PreGet" type="PreGet.VoucherNo_PreGet" sourceColumn="VoucherNo_PreGet" />
  359. <Param name="@VoucherDate_PreGet" type="PreGet.VoucherDate_PreGet" sourceColumn="VoucherDate_PreGet" />
  360. <Param name="@ID_Receiver" type="PreGet.ID_Receiver" sourceColumn="ID_Receiver" />
  361. <Param name="@Balance_PreGet" type="PreGet.Balance_PreGet" sourceColumn="Balance_PreGet" />
  362. <Param name="@ID_Creator" type="PreGet.ID_Creator" sourceColumn="ID_Creator" />
  363. <Param name="@CreateDate_PreGet" type="PreGet.CreateDate_PreGet" sourceColumn="CreateDate_PreGet" />
  364. <Param name="@LastModUser_PreGet" type="PreGet.LastModUser_PreGet" sourceColumn="LastModUser_PreGet" />
  365. <Param name="@LastModDate_PreGet" type="PreGet.LastModDate_PreGet" sourceColumn="LastModDate_PreGet" />
  366. <Param name="@ID_Assessor" type="PreGet.ID_Assessor" sourceColumn="ID_Assessor" />
  367. <Param name="@AssessDate_PreGet" type="PreGet.AssessDate_PreGet" sourceColumn="AssessDate_PreGet" />
  368. <Param name="@Comment_PreGet" type="PreGet.Comment_PreGet" sourceColumn="Comment_PreGet" />
  369. </Params>
  370. </New>
  371. <Update CmdType="Text" CmdText=" UPDATE PreGet
  372. SET No_PreGet=@No_PreGet
  373. ,UnPreGetStrikeBalance_PreGet = @UnPreGetStrikeBalance_PreGet
  374. ,Date_PreGet=@Date_PreGet
  375. ,ID_Customer=@ID_Customer
  376. ,GetCurrency_PreGet=@GetCurrency_PreGet
  377. ,Currency_PreGet=@Currency_PreGet
  378. ,Rate_PreGet=@Rate_PreGet
  379. ,Method_PreGet=@Method_PreGet
  380. ,Amount_PreGet=@Amount_PreGet
  381. ,VoucherNo_PreGet=@VoucherNo_PreGet
  382. ,VoucherDate_PreGet=@VoucherDate_PreGet
  383. ,ID_Receiver=@ID_Receiver
  384. ,Balance_PreGet=@Balance_PreGet
  385. ,ID_Creator=@ID_Creator
  386. ,CreateDate_PreGet=@CreateDate_PreGet
  387. ,LastModUser_PreGet=@LastModUser_PreGet
  388. ,LastModDate_PreGet=@LastModDate_PreGet
  389. ,ID_Assessor=@ID_Assessor
  390. ,AssessDate_PreGet=@AssessDate_PreGet
  391. ,Comment_PreGet=@Comment_PreGet
  392. WHERE ID_PreGet=@ID_PreGet
  393. declare @amount decimal(16,4)
  394. select @amount=SUM(Amount_PreGet)
  395. from PreGet
  396. where ID_Customer=@ID_Customer
  397. Update Customer
  398. Set PerValue_Customer = @amount
  399. Where ID_Customer = @ID_Customer
  400. ">
  401. <Params>
  402. <Param name="@ID_PreGet" type="PreGet.ID_PreGet" sourceColumn="ID_PreGet" />
  403. <Param name="@No_PreGet" type="PreGet.No_PreGet" sourceColumn="No_PreGet" />
  404. <Param name="@UnPreGetStrikeBalance_PreGet" type="PreGet.UnPreGetStrikeBalance_PreGet" sourceColumn="UnPreGetStrikeBalance_PreGet" />
  405. <Param name="@Date_PreGet" type="PreGet.Date_PreGet" sourceColumn="Date_PreGet" />
  406. <Param name="@ID_Customer" type="PreGet.ID_Customer" sourceColumn="ID_Customer" />
  407. <Param name="@GetCurrency_PreGet" type="PreGet.GetCurrency_PreGet" sourceColumn="GetCurrency_PreGet" />
  408. <Param name="@Currency_PreGet" type="PreGet.Currency_PreGet" sourceColumn="Currency_PreGet" />
  409. <Param name="@Rate_PreGet" type="PreGet.Rate_PreGet" sourceColumn="Rate_PreGet" />
  410. <Param name="@Method_PreGet" type="PreGet.Method_PreGet" sourceColumn="Method_PreGet" />
  411. <Param name="@Amount_PreGet" type="PreGet.Amount_PreGet" sourceColumn="Amount_PreGet" />
  412. <Param name="@VoucherNo_PreGet" type="PreGet.VoucherNo_PreGet" sourceColumn="VoucherNo_PreGet" />
  413. <Param name="@VoucherDate_PreGet" type="PreGet.VoucherDate_PreGet" sourceColumn="VoucherDate_PreGet" />
  414. <Param name="@ID_Receiver" type="PreGet.ID_Receiver" sourceColumn="ID_Receiver" />
  415. <Param name="@Balance_PreGet" type="PreGet.Balance_PreGet" sourceColumn="Balance_PreGet" />
  416. <Param name="@ID_Creator" type="PreGet.ID_Creator" sourceColumn="ID_Creator" />
  417. <Param name="@CreateDate_PreGet" type="PreGet.CreateDate_PreGet" sourceColumn="CreateDate_PreGet" />
  418. <Param name="@LastModUser_PreGet" type="PreGet.LastModUser_PreGet" sourceColumn="LastModUser_PreGet" />
  419. <Param name="@LastModDate_PreGet" type="PreGet.LastModDate_PreGet" sourceColumn="LastModDate_PreGet" />
  420. <Param name="@ID_Assessor" type="PreGet.ID_Assessor" sourceColumn="ID_Assessor" />
  421. <Param name="@AssessDate_PreGet" type="PreGet.AssessDate_PreGet" sourceColumn="AssessDate_PreGet" />
  422. <Param name="@Comment_PreGet" type="PreGet.Comment_PreGet" sourceColumn="Comment_PreGet" />
  423. </Params>
  424. </Update>
  425. <Delete CmdType="Text" CmdText=" declare @amount decimal(16,4)
  426. declare @ID_Customer uniqueidentifier
  427. ,@PerValue_Customer decimal(16,4)
  428. Select @ID_Customer=ID_Customer
  429. from PreGet
  430. where ID_PreGet=@ID_PreGet
  431. select @amount=Amount_PreGet
  432. from PreGet
  433. where ID_PreGet=@ID_PreGet
  434. Select @PerValue_Customer=isnull(Sum(PerValue_Customer),0) from Customer
  435. where ID_Customer=@ID_Customer
  436. Update Customer
  437. Set PerValue_Customer = @PerValue_Customer - @amount
  438. Where ID_Customer = @ID_Customer
  439. DELETE PreGet WHERE ID_PreGet=@ID_PreGet
  440. ">
  441. <Params>
  442. <Param name="@ID_PreGet" type="PreGet.ID_PreGet" sourceColumn="ID_PreGet" />
  443. </Params>
  444. </Delete>
  445. <Audit CmdType="Text" CmdText=" IF(@ID_Assessor IS NOT NULL)
  446. UPDATE Customer SET PrePayBalance_Customer=PrePayBalance_Customer+@Amount_PreGet WHERE ID_Customer=@ID_Customer
  447. ELSE
  448. UPDATE Customer SET PrePayBalance_Customer=PrePayBalance_Customer-@Amount_PreGet WHERE ID_Customer=@ID_Customer
  449. UPDATE PreGet SET ID_Assessor=@ID_Assessor,AssessDate_PreGet=@AssessDate_PreGet WHERE ID_PreGet=@ID_PreGet
  450. ">
  451. <Params>
  452. <Param name="@ID_PreGet" type="PreGet.ID_PreGet" sourceColumn="ID_PreGet"/>
  453. <Param name="@ID_Customer" type="PreGet.ID_Customer" sourceColumn="ID_Customer" />
  454. <Param name="@Amount_PreGet" type="PreGet.Amount_PreGet" sourceColumn="Amount_PreGet" />
  455. <Param name="@ID_Assessor" type="PreGet.ID_Assessor" sourceColumn="ID_Assessor"/>
  456. <Param name="@AssessDate_PreGet" type="PreGet.AssessDate_PreGet" sourceColumn="AssessDate_PreGet"/>
  457. </Params>
  458. </Audit>
  459. </Table>
  460. </Tables>
  461. <Search>
  462. <SearchAllBill CmdType="Text" CmdText=" SELECT PreGet.*,ShortName_Customer,No_Customer
  463. FROM PreGet
  464. LEFT JOIN Customer ON Customer.ID_Customer=PreGet.ID_Customer">
  465. <Tables>
  466. <Table name="AllBill" />
  467. </Tables>
  468. </SearchAllBill>
  469. <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer
  470. ,Customer.Type_Customer,Customer.Level_Customer
  471. ,Customer.IsGeneric_Customer
  472. FROM Customer ">
  473. <Tables>
  474. <Table name="AllCustomer" />
  475. </Tables>
  476. </SearchAllCustomer>
  477. <SearchCustomer CmdType="Text" CmdText=" SELECT ID_Customer,ShortName_Customer,PrePayBalance_Customer
  478. ,Customer.SuspendDate_Customer
  479. From Customer
  480. WHERE No_Customer=@No_Customer
  481. ">
  482. <Params>
  483. <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
  484. </Params>
  485. <Tables>
  486. <Table name="Customer"/>
  487. </Tables>
  488. </SearchCustomer>
  489. <SearchReceiver CmdType="Text" CmdText=" SELECT Name_Employee,ID_Employee,No_Employee
  490. From Employee
  491. ORDER BY No_Employee">
  492. <Tables>
  493. <Table name="Employee"/>
  494. </Tables>
  495. </SearchReceiver>
  496. <SearchMethod CmdType="Text" CmdText=" SELECT Name_TypeDef FROM TypeDef WHERE Type_TypeDef=23 ">
  497. <Tables>
  498. <Table name="Method"/>
  499. </Tables>
  500. </SearchMethod>
  501. <SearchType CmdType="Text" CmdText=" CREATE TABLE #TypeDef( Type nvarchar(64)) DECLARE @i int SET @i = 0
  502. WHILE @i &lt; 2
  503. BEGIN
  504. IF(@i=0)
  505. BEGIN
  506. INSERT INTO #TypeDef (Type)VALUES('收款')
  507. END
  508. IF(@i=1)
  509. BEGIN
  510. INSERT INTO #TypeDef (Type)VALUES('退款')
  511. END
  512. SET @i = @i + 1
  513. END
  514. SELECT Type AS Name_TypeDef FROM #TypeDef
  515. DROP TABLE #TypeDef
  516. ">
  517. <Tables>
  518. <Table name="GetType" />
  519. </Tables>
  520. </SearchType>
  521. <SearchComment CmdType="Text" CmdText="Select Name_TypeDef From TypeDef Where Type_TypeDef = 29 ">
  522. <Tables>
  523. <Table name="Comment" />
  524. </Tables>
  525. </SearchComment>
  526. <SearchPreGetWithNo CmdType="Text" CmdText=" Select PreGet.ID_PreGet
  527. ,PreGet.No_PreGet
  528. ,PreGet.UnPreGetStrikeBalance_PreGet
  529. ,PreGet.Date_PreGet
  530. ,PreGet.ID_Customer
  531. ,PreGet.GetCurrency_PreGet
  532. ,PreGet.Currency_PreGet
  533. ,PreGet.Rate_PreGet
  534. ,PreGet.Method_PreGet
  535. ,PreGet.Amount_PreGet
  536. ,PreGet.VoucherNo_PreGet
  537. ,PreGet.VoucherDate_PreGet
  538. ,PreGet.ID_Receiver
  539. ,PreGet.Balance_PreGet
  540. ,PreGet.ID_Creator
  541. ,PreGet.ID_Assessor
  542. ,PreGet.AssessDate_PreGet
  543. ,PreGet.Comment_PreGet
  544. ,PreGet.CreateDate_PreGet
  545. ,PreGet.LastModUser_PreGet
  546. ,PreGet.LastModDate_PreGet
  547. ,a.Name_User As Creator ,b.Name_User As Assessor
  548. ,c.Name_User As LastModUser,Customer.No_Customer
  549. ,Customer.ShortName_Customer,Employee.No_Employee AS No_Receiver
  550. ,Employee.Name_Employee
  551. FROM PreGet
  552. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  553. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  554. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  555. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  556. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  557. WHERE No_PreGet=@No_PreGet">
  558. <Params>
  559. <Param name="@No_PreGet" type="PreGet.No_PreGet" Index="0" />
  560. </Params>
  561. <Tables>
  562. <Table name="PreGet"/>
  563. </Tables>
  564. </SearchPreGetWithNo>
  565. <SearchPreGetFirst CmdType="Text" CmdText=" SELECT TOP 1 PreGet.ID_PreGet
  566. ,PreGet.No_PreGet
  567. ,PreGet.UnPreGetStrikeBalance_PreGet
  568. ,PreGet.Date_PreGet
  569. ,PreGet.ID_Customer
  570. ,PreGet.GetCurrency_PreGet
  571. ,PreGet.Currency_PreGet
  572. ,PreGet.Rate_PreGet
  573. ,PreGet.Method_PreGet
  574. ,PreGet.Amount_PreGet
  575. ,PreGet.VoucherNo_PreGet
  576. ,PreGet.VoucherDate_PreGet
  577. ,PreGet.ID_Receiver
  578. ,PreGet.Balance_PreGet
  579. ,PreGet.ID_Creator
  580. ,PreGet.ID_Assessor
  581. ,PreGet.AssessDate_PreGet
  582. ,PreGet.Comment_PreGet
  583. ,PreGet.CreateDate_PreGet
  584. ,PreGet.LastModUser_PreGet
  585. ,PreGet.LastModDate_PreGet
  586. ,a.Name_User As Creator
  587. ,b.Name_User As Assessor
  588. ,c.Name_User As LastModUser
  589. ,Customer.No_Customer
  590. ,Customer.ShortName_Customer
  591. ,Employee.No_Employee AS No_Receiver
  592. ,Employee.Name_Employee
  593. FROM PreGet
  594. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  595. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  596. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  597. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  598. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  599. ORDER BY No_PreGet">
  600. <Tables>
  601. <Table name="PreGet"/>
  602. </Tables>
  603. </SearchPreGetFirst>
  604. <SearchPreGetLast CmdType="Text" CmdText=" SELECT TOP 1 PreGet.ID_PreGet
  605. ,PreGet.No_PreGet
  606. ,PreGet.UnPreGetStrikeBalance_PreGet
  607. ,PreGet.Date_PreGet
  608. ,PreGet.ID_Customer
  609. ,PreGet.GetCurrency_PreGet
  610. ,PreGet.Currency_PreGet
  611. ,PreGet.Rate_PreGet
  612. ,PreGet.Method_PreGet
  613. ,PreGet.Amount_PreGet
  614. ,PreGet.VoucherNo_PreGet
  615. ,PreGet.VoucherDate_PreGet
  616. ,PreGet.ID_Receiver
  617. ,PreGet.Balance_PreGet
  618. ,PreGet.ID_Creator
  619. ,PreGet.ID_Assessor
  620. ,PreGet.AssessDate_PreGet
  621. ,PreGet.Comment_PreGet
  622. ,PreGet.CreateDate_PreGet
  623. ,PreGet.LastModUser_PreGet
  624. ,PreGet.LastModDate_PreGet
  625. ,a.Name_User As Creator
  626. ,b.Name_User As Assessor,c.Name_User As LastModUser
  627. ,Customer.No_Customer,Customer.ShortName_Customer
  628. ,Employee.No_Employee AS No_Receiver,Employee.Name_Employee
  629. FROM PreGet
  630. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  631. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  632. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  633. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  634. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  635. ORDER BY No_PreGet DESC">
  636. <Tables>
  637. <Table name="PreGet"/>
  638. </Tables>
  639. </SearchPreGetLast>
  640. <SearchPreGetPrevious CmdType="Text" CmdText=" SELECT TOP 1 PreGet.ID_PreGet
  641. ,PreGet.No_PreGet
  642. ,PreGet.UnPreGetStrikeBalance_PreGet
  643. ,PreGet.Date_PreGet
  644. ,PreGet.ID_Customer
  645. ,PreGet.GetCurrency_PreGet
  646. ,PreGet.Currency_PreGet
  647. ,PreGet.Rate_PreGet
  648. ,PreGet.Method_PreGet
  649. ,PreGet.Amount_PreGet
  650. ,PreGet.VoucherNo_PreGet
  651. ,PreGet.VoucherDate_PreGet
  652. ,PreGet.ID_Receiver
  653. ,PreGet.Balance_PreGet
  654. ,PreGet.ID_Creator
  655. ,PreGet.ID_Assessor
  656. ,PreGet.AssessDate_PreGet
  657. ,PreGet.Comment_PreGet
  658. ,PreGet.CreateDate_PreGet
  659. ,PreGet.LastModUser_PreGet
  660. ,PreGet.LastModDate_PreGet
  661. ,a.Name_User As Creator
  662. ,b.Name_User As Assessor,c.Name_User As LastModUser
  663. ,Customer.No_Customer,Customer.ShortName_Customer
  664. ,Employee.No_Employee AS No_Receiver,Employee.Name_Employee
  665. FROM PreGet
  666. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  667. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  668. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  669. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  670. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  671. WHERE No_PreGet &lt; @No_PreGet
  672. ORDER BY No_PreGet DESC">
  673. <Params>
  674. <Param name="@No_PreGet" type="PreGet.No_PreGet" Index="0" />
  675. </Params>
  676. <Tables>
  677. <Table name="PreGet"/>
  678. </Tables>
  679. </SearchPreGetPrevious>
  680. <SearchPreGetNext CmdType="Text" CmdText=" SELECT TOP 1 PreGet.ID_PreGet
  681. ,PreGet.No_PreGet
  682. ,PreGet.UnPreGetStrikeBalance_PreGet
  683. ,PreGet.Date_PreGet
  684. ,PreGet.ID_Customer
  685. ,PreGet.GetCurrency_PreGet
  686. ,PreGet.Currency_PreGet
  687. ,PreGet.Rate_PreGet
  688. ,PreGet.Method_PreGet
  689. ,PreGet.Amount_PreGet
  690. ,PreGet.VoucherNo_PreGet
  691. ,PreGet.VoucherDate_PreGet
  692. ,PreGet.ID_Receiver
  693. ,PreGet.Balance_PreGet
  694. ,PreGet.ID_Creator
  695. ,PreGet.ID_Assessor
  696. ,PreGet.AssessDate_PreGet
  697. ,PreGet.Comment_PreGet
  698. ,PreGet.CreateDate_PreGet
  699. ,PreGet.LastModUser_PreGet
  700. ,PreGet.LastModDate_PreGet
  701. ,a.Name_User As Creator
  702. ,b.Name_User As Assessor,c.Name_User As LastModUser
  703. ,Customer.No_Customer,Customer.ShortName_Customer
  704. ,Employee.No_Employee AS No_Receiver,Employee.Name_Employee
  705. FROM PreGet
  706. LEFT JOIN AppUser a ON PreGet.ID_Creator=a.ID_User
  707. LEFT JOIN AppUser b ON PreGet.ID_Assessor=b.ID_User
  708. LEFT JOIN AppUser c ON PreGet.LastModUser_PreGet=c.ID_User
  709. Left JOIN Customer On Customer.ID_Customer=PreGet.ID_Customer
  710. LEFT JOIN Employee ON Employee.ID_Employee=PreGet.ID_Receiver
  711. WHERE No_PreGet &gt; @No_PreGet
  712. ORDER BY No_PreGet">
  713. <Params>
  714. <Param name="@No_PreGet" type="PreGet.No_PreGet" Index="0" />
  715. </Params>
  716. <Tables>
  717. <Table name="PreGet"/>
  718. </Tables>
  719. </SearchPreGetNext>
  720. <SearchSystemSetting CmdType="Text" CmdText="SELECT SysCurrency_SystemSetting From SystemSetting">
  721. <Tables>
  722. <Table name="SystemSetting"/>
  723. </Tables>
  724. </SearchSystemSetting>
  725. <SearchCustomersCustomer CmdType="Text" CmdText="Select *
  726. From Customer
  727. Where ID_Customer = (Select CustomerID_Customer
  728. From Customer
  729. Where No_Customer = @No_Customer
  730. And IsCustomersCustomer_Customer = 1)">
  731. <Params>
  732. <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
  733. </Params>
  734. <Tables>
  735. <Table name="CustomersCustomer"/>
  736. </Tables>
  737. </SearchCustomersCustomer>
  738. </Search>
  739. </Server>
  740. <Lables>
  741. <Search>
  742. Empty();
  743. NewInstance();
  744. tbNo.ReadOnly=false;
  745. ikCkNoPreGetStrikeBalance.Enabled=false;
  746. dtDate.Enabled=false;
  747. tbCustomerNo.ReadOnly=true;
  748. cbType.Enabled=false;
  749. AmountType.Enabled=false;
  750. txtVoucherDate.Enabled=false;
  751. txtVoucherNo.ReadOnly=true;
  752. cbReceiver.Enabled=false;
  753. ntbMoney.ReadOnly=true;
  754. cbComment.Enabled=false;
  755. #PreGet.Creator="";
  756. #PreGet.ID_Creator=DBNull();
  757. #PreGet.Assessor="";
  758. #PreGet.ID_Assessor=DBNull();
  759. #PreGet.AssessDate_PreGet=DBNull();
  760. #PreGet.LastModUser_PreGet=DBNull();
  761. #PreGet.LastModUser="";
  762. #PreGet.LastModDate_PreGet=DBNull();
  763. toolBar.EnableSubmit=false;
  764. toolBar.EnableModify=false;
  765. toolBar.EnableDelete=false;
  766. toolBar.EnableAudit=false;
  767. toolBar.EnableUnAudit=false;
  768. toolBar.EnableNew=GetRight(@Title,"新增");
  769. toolBar.EnablePrint=false;
  770. UpdateForm(true,"");
  771. tbNo.Focus();
  772. @Status=0;
  773. </Search>
  774. <New>
  775. @sql = 0;
  776. Empty();
  777. NewInstance();
  778. tbNo.ReadOnly=true;
  779. ikCkNoPreGetStrikeBalance.Enabled=true;
  780. dtDate.Enabled=true;
  781. tbCustomerNo.ReadOnly=false;
  782. cbType.Enabled=true;
  783. AmountType.Enabled = true;
  784. txtVoucherDate.Enabled=true;
  785. txtVoucherNo.ReadOnly=false;
  786. cbReceiver.Enabled=true;
  787. ntbMoney.ReadOnly=false;
  788. cbComment.Enabled=true;
  789. #PreGet.ID_PreGet=NewGuid();
  790. #PreGet.GetCurrency_PreGet=@SysCurrency;
  791. #PreGet.Currency_PreGet=@SysCurrency;
  792. #PreGet.Rate_PreGet=1.00;
  793. #PreGet.Creator=GetCurrentUser();
  794. #PreGet.ID_Creator=GetLoginUserID();
  795. #PreGet.Assessor=DBNull();
  796. #PreGet.ID_Assessor=DBNull();
  797. #PreGet.AssessDate_PreGet=DBNull();
  798. #PreGet.LastModUser_PreGet=DBNull();
  799. #PreGet.LastModUser=DBNull();
  800. #PreGet.LastModDate_PreGet=DBNull();
  801. #PreGet.UnPreGetStrikeBalance_PreGet=false;
  802. #PreGet.Date_PreGet=GetCurrentTime();
  803. AmountType.SelectedName = "收款";
  804. toolBar.EnableSubmit=GetRight(@Title,"新增");
  805. toolBar.EnableModify=false;
  806. toolBar.EnableDelete=false;
  807. toolBar.EnableAudit=false;
  808. toolBar.EnableUnAudit=false;
  809. toolBar.EnableNew=false;
  810. toolBar.EnablePrint=false;
  811. UpdateForm(true,"");
  812. @Status=1;
  813. </New>
  814. <View>
  815. tbNo.ReadOnly=false;
  816. ikCkNoPreGetStrikeBalance.Enabled=false;
  817. dtDate.Enabled=false;
  818. tbCustomerNo.ReadOnly=true;
  819. txtVoucherDate.Enabled=false;
  820. txtVoucherNo.ReadOnly=true;
  821. cbReceiver.Enabled=false;
  822. cbType.Enabled=false;
  823. AmountType.Enabled = false;
  824. ntbMoney.ReadOnly=true;
  825. cbComment.Enabled=false;
  826. toolBar.EnableSubmit=false;
  827. toolBar.EnableNew=GetRight(@Title,"新增");
  828. if(Equals(#PreGet.ID_Assessor, DBNull()))
  829. {
  830. toolBar.EnableAudit=GetRight(@Title,"审核");
  831. toolBar.EnableUnAudit=false;
  832. toolBar.EnableModify=GetRight(@Title,"修改");
  833. toolBar.EnableDelete=GetRight(@Title,"删除");
  834. }
  835. else
  836. {
  837. toolBar.EnableAudit=false;
  838. toolBar.EnableUnAudit=GetRight(@Title,"取消审核");
  839. toolBar.EnableModify=false;
  840. toolBar.EnableDelete=false;
  841. }
  842. if(#PreGet.Amount_PreGet>0)
  843. {
  844. AmountType.SelectedName ="收款";
  845. }
  846. else
  847. {
  848. AmountType.SelectedName ="退款";
  849. }
  850. toolBar.EnablePrint=GetRight(@Title,"打印");
  851. UpdateForm(true, "");
  852. @Status=2;
  853. </View>
  854. <Modify>
  855. @sql = ntbMoney.CValue;
  856. tbNo.ReadOnly=true;
  857. ikCkNoPreGetStrikeBalance.Enabled=true;
  858. dtDate.Enabled=false;
  859. tbCustomerNo.ReadOnly=true;
  860. txtVoucherDate.Enabled=true;
  861. txtVoucherNo.ReadOnly=false;
  862. cbReceiver.Enabled=true;
  863. cbType.Enabled=true;
  864. AmountType.Enabled = true;
  865. ntbMoney.ReadOnly=false;
  866. cbComment.Enabled=true;
  867. #PreGet.LastModUser=GetCurrentUser();
  868. #PreGet.LastModUser_PreGet=GetLoginUserID();
  869. #PreGet.LastModDate_PreGet=GetCurrentTime();
  870. toolBar.EnableSubmit=GetRight(@Title,"修改");
  871. toolBar.EnableModify=false;
  872. toolBar.EnableDelete=false;
  873. toolBar.EnableAudit=false;
  874. toolBar.EnableUnAudit=false;
  875. toolBar.EnableNew=false;
  876. toolBar.EnablePrint=false;
  877. UpdateForm(true, "");
  878. @Status=3;
  879. </Modify>
  880. <SubmitButtonClick>
  881. <![CDATA[
  882. if(!Search("SearchCustomer",tbCustomerNo.CValue) ||!Equals(#PreGet.ID_Customer,#Customer.ID_Customer))
  883. {
  884. MessageBox("请输入有效的客户,回车以示确认!",@Title);
  885. tbCustomerNo.Focus();
  886. return;
  887. }
  888. if(!cbReceiver.CheckSelectedItem())
  889. {
  890. MessageBox("请输入有效的收款人!",@Title);
  891. cbReceiver.Focus();
  892. return;
  893. }
  894. if(!AmountType.CheckSelectedItem())
  895. {
  896. MessageBox("请输入有效的金额方式!",@Title);
  897. AmountType.Focus();
  898. return;
  899. }
  900. UpdateForm(false,"");
  901. if(@Status==1)
  902. { #PreGet.CreateDate_PreGet=GetCurrentTime();
  903. if(AmountType.SelectedName=="收款")
  904. {
  905. #PreGet.Amount_PreGet = ntbMoney.CValue;
  906. }
  907. if(AmountType.SelectedName=="退款")
  908. {
  909. #PreGet.Amount_PreGet = -ntbMoney.CValue;
  910. }
  911. #PreGet.No_PreGet = New("#PreGet.No_PreGet", dtDate.CValue);
  912. }
  913. else if(@Status==3)
  914. {
  915. #PreGet.LastModUser=GetCurrentUser();
  916. #PreGet.LastModUser_PreGet=GetLoginUserID();
  917. #PreGet.LastModDate_PreGet=GetCurrentTime();
  918. if(AmountType.SelectedName=="退款")
  919. {
  920. if(ntbMoney.CValue!=@sql)
  921. {
  922. if(ntbMoney.CValue!=-@sql)
  923. {
  924. if (ntbMoney.CValue >=0)
  925. #PreGet.Amount_PreGet=-ntbMoney.CValue;
  926. else
  927. #PreGet.Amount_PreGet=ntbMoney.CValue;
  928. }
  929. }
  930. else
  931. {
  932. if(@sql>=0)
  933. #PreGet.Amount_PreGet=-@sql;
  934. else
  935. #PreGet.Amount_PreGet=@sql;
  936. }
  937. }
  938. else
  939. {
  940. if(ntbMoney.CValue!=@sql)
  941. {
  942. if(ntbMoney.CValue!=-@sql)
  943. {
  944. if (ntbMoney.CValue >=0)
  945. #PreGet.Amount_PreGet=ntbMoney.CValue;
  946. else
  947. #PreGet.Amount_PreGet=-ntbMoney.CValue;
  948. }
  949. }
  950. else
  951. {
  952. if(@sql>=0)
  953. #PreGet.Amount_PreGet=@sql;
  954. else
  955. #PreGet.Amount_PreGet=-@sql;
  956. }
  957. }
  958. Update();
  959. }
  960. ChangeMode("View");
  961. ]]>
  962. </SubmitButtonClick>
  963. </Lables>
  964. </Form>
  965. </Forms>