FrmPayableAccount.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <Forms>
  3. <Form Name="FrmPayableAccount">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="应付帐款";
  9. GetSchema();
  10. Empty();
  11. txtSum.CValue=0.00;
  12. ]]>
  13. </Load>
  14. <Closing>
  15. ;<!--TODO-->
  16. </Closing>
  17. <Closed>
  18. ;<!--TODO-->
  19. </Closed>
  20. </Events>
  21. <Mode>
  22. <Search>
  23. <Lable name="Search" />
  24. </Search>
  25. </Mode>
  26. <Controls>
  27. <IKTextButton name="txtSupplierNo1" DataSource="UI.StartNo_Customer">
  28. <Events>
  29. <Click>
  30. @temp = ShowSearchBox("SupplierSearch","INFOMATION",txtSupplierNo1.CValue);
  31. if( @temp == "" )
  32. return;
  33. txtSupplierNo1.CValue = @temp;
  34. </Click>
  35. <TextBoxButtonTextChanged>
  36. txtSupplierNo2.CValue = txtSupplierNo1.CValue;
  37. </TextBoxButtonTextChanged>
  38. </Events>
  39. </IKTextButton>
  40. <IKTextButton name="txtSupplierNo2" DataSource="UI.EndNo_Customer">
  41. <Events>
  42. <Click>
  43. @temp = ShowSearchBox("SupplierSearch","INFOMATION",txtSupplierNo2.CValue);
  44. if( @temp == "" )
  45. return;
  46. txtSupplierNo2.CValue = @temp;
  47. </Click>
  48. </Events>
  49. </IKTextButton>
  50. <IKTextButton name="txtPurchaseInvoiceNo1" >
  51. <Events>
  52. <Click>
  53. @temp = ShowSearchBox("InvoiceNoSearch","NODEPOT","txtPurchaseInvoiceNo1", txtPurchaseInvoiceNo1.CValue);
  54. if( @temp == "" )
  55. return;
  56. txtPurchaseInvoiceNo1.CValue = @temp;
  57. </Click>
  58. <TextBoxButtonTextChanged>
  59. txtPurchaseInvoiceNo2.CValue = txtPurchaseInvoiceNo1.CValue;
  60. </TextBoxButtonTextChanged>
  61. </Events>
  62. </IKTextButton>
  63. <IKTextButton name="txtPurchaseInvoiceNo2" >
  64. <Events>
  65. <Click>
  66. @temp = ShowSearchBox("InvoiceNoSearch","NODEPOT","txtPurchaseInvoiceNo2", txtPurchaseInvoiceNo2.CValue);
  67. if( @temp == "" )
  68. return;
  69. txtPurchaseInvoiceNo2.CValue = @temp;
  70. </Click>
  71. </Events>
  72. </IKTextButton>
  73. <IKExtendGrid name="ikExtendGrid1" DataSource="Total" TableStyleIndex="0">
  74. <DataColumn Index="0" DataSource="Total.No_Supplier"/>
  75. <DataColumn Index="1" DataSource="Total.ShortName_Supplier"/>
  76. <DataColumn Index="2" DataSource="Total.No_Invoice"/>
  77. <DataColumn Index="3" DataSource="Total.InvoiceDate_PurchaseInvoice"/>
  78. <DataColumn Index="4" DataSource="Total.Amount_PurchaseInvoice"/>
  79. <DataColumn Index="5" DataSource="Total.StrikedAmount_PurchaseInvoice"/>
  80. <DataColumn Index="6" DataSource="Total.ToPay"/>
  81. <Events>
  82. <ClickPreview>
  83. PrintReport(ikExtendGrid1.CurrentView);
  84. </ClickPreview>
  85. <ClickRefresh>
  86. Empty();
  87. @StartSupplierNo =DBNull();
  88. @EndSupplierNo =DBNull();
  89. @StartPurchaseInvoiceNo =DBNull();
  90. @EndPurchaseInvoiceNo =DBNull();
  91. @StartDate =DBNull();
  92. @EndDate =DBNull();
  93. if(!Equals(txtSupplierNo1.CValue,""))
  94. @StartSupplierNo= txtSupplierNo1.CValue;
  95. if(!Equals(txtSupplierNo2.CValue,""))
  96. @EndSupplierNo= txtSupplierNo2.CValue;
  97. if(!Equals(txtPurchaseInvoiceNo1.CValue,""))
  98. @StartPurchaseInvoiceNo= txtPurchaseInvoiceNo1.CValue;
  99. if(!Equals(txtPurchaseInvoiceNo2.CValue,""))
  100. @EndPurchaseInvoiceNo= txtPurchaseInvoiceNo2.CValue;
  101. if(dtInvoiceDate1.Checked)
  102. @StartDate= dtInvoiceDate1.Value;
  103. if(dtInvoiceDate2.Checked)
  104. @EndDate= dtInvoiceDate2.Value;
  105. Search("SearchReceivales",@StartSupplierNo,@EndSupplierNo,@StartPurchaseInvoiceNo,@EndPurchaseInvoiceNo,
  106. @StartDate,@EndDate);
  107. txtSum.CValue=SumOfCol("#Total.ToPay");
  108. </ClickRefresh>
  109. <ClickFilter>
  110. txtSum.CValue = SumOfCol("#Total.ToPay",ikExtendGrid1.FilterCondition,true);
  111. </ClickFilter>
  112. <ClickNOFilter>
  113. txtSum.CValue = SumOfCol("#Total.ToPay",ikExtendGrid1.FilterCondition,true);
  114. </ClickNOFilter>
  115. </Events>
  116. </IKExtendGrid>
  117. <IKButton name="btnSearch">
  118. <Events>
  119. <Click>
  120. Empty();
  121. @StartSupplierNo =DBNull();
  122. @EndSupplierNo =DBNull();
  123. @StartPurchaseInvoiceNo =DBNull();
  124. @EndPurchaseInvoiceNo =DBNull();
  125. @StartDate =DBNull();
  126. @EndDate =DBNull();
  127. if(!Equals(txtSupplierNo1.CValue,""))
  128. @StartSupplierNo= txtSupplierNo1.CValue;
  129. if(!Equals(txtSupplierNo2.CValue,""))
  130. @EndSupplierNo= txtSupplierNo2.CValue;
  131. if(!Equals(txtPurchaseInvoiceNo1.CValue,""))
  132. @StartPurchaseInvoiceNo= txtPurchaseInvoiceNo1.CValue;
  133. if(!Equals(txtPurchaseInvoiceNo2.CValue,""))
  134. @EndPurchaseInvoiceNo= txtPurchaseInvoiceNo2.CValue;
  135. if(dtInvoiceDate1.Checked)
  136. @StartDate= dtInvoiceDate1.Value;
  137. if(dtInvoiceDate2.Checked)
  138. @EndDate= dtInvoiceDate2.Value;
  139. Search("SearchReceivales",@StartSupplierNo,@EndSupplierNo,@StartPurchaseInvoiceNo,@EndPurchaseInvoiceNo,
  140. @StartDate,@EndDate);
  141. txtSum.CValue=SumOfCol("#Total.ToPay");
  142. </Click>
  143. </Events>
  144. </IKButton>
  145. <IKButton name="btnClear">
  146. <Events>
  147. <Click>
  148. Empty();
  149. txtSupplierNo1.CValue="";
  150. txtSupplierNo2.CValue="";
  151. txtPurchaseInvoiceNo1.CValue="";
  152. txtPurchaseInvoiceNo2.CValue="";
  153. dtInvoiceDate1.Checked=False;
  154. dtInvoiceDate2.Checked=False;
  155. txtSum.CValue=0.00;
  156. </Click>
  157. </Events>
  158. </IKButton>
  159. </Controls>
  160. <ChildForms>
  161. <ChildForm name="SupplierSearch" DataSource="Supplier" SearchFunction="SearchAllSupplier" SearchFunctionByNo="" MappingName="供应商">
  162. <DataColumn Index="0" MappingName="#Supplier.No_Supplier" HeaderText="供应商编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  163. <DataColumn Index="1" MappingName="#Supplier.ShortName_Supplier" HeaderText="供应商简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  164. </ChildForm>
  165. <ChildForm name="InvoiceNoSearch" DataSource="PurchaseInvoice" SearchFunction="SearchAllInvoiceNo" SearchFunctionByNo="" MappingName="发票编号">
  166. <DataColumn Index="0" MappingName="#PurchaseInvoice.No_Invoice" HeaderText="发票编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  167. <DataColumn Index="1" MappingName="#PurchaseInvoice.InvoiceDate_PurchaseInvoice" HeaderText="发票日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  168. </ChildForm>
  169. </ChildForms>
  170. </Client>
  171. <Server>
  172. <Tables>
  173. <Table name="Total" Type="Parent">
  174. <GetSchema CmdType="Text" CmdText="
  175. Select No_Supplier,ShortName_Supplier,PurchaseInvoice.No_PurchaseInvoice,No_Invoice,InvoiceDate_PurchaseInvoice,PayDate_PurchaseInvoice,Amount_PurchaseInvoice,StrikedAmount_PurchaseInvoice,(Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) As ToPay
  176. From PurchaseInvoice
  177. Join Supplier On Supplier.ID_Supplier=PurchaseInvoice.ID_Supplier
  178. "/>
  179. </Table>
  180. </Tables>
  181. <Search>
  182. <SearchAllSupplier CmdType="Text" CmdText="SELECT Supplier.No_Supplier,Supplier.ShortName_Supplier FROM Supplier ">
  183. <Tables>
  184. <Table name="AllSupplier" />
  185. </Tables>
  186. </SearchAllSupplier>
  187. <SearchAllInvoiceNo CmdType="Text" CmdText="SELECT No_Invoice,InvoiceDate_PurchaseInvoice FROM PurchaseInvoice">
  188. <Tables>
  189. <Table name="AllInvoiceNo" />
  190. </Tables>
  191. </SearchAllInvoiceNo>
  192. <SearchReceivales CmdType="Text" CmdText="
  193. Select No_Supplier,ShortName_Supplier,PurchaseInvoice.No_PurchaseInvoice,No_Invoice,InvoiceDate_PurchaseInvoice,PayDate_PurchaseInvoice,Amount_PurchaseInvoice,StrikedAmount_PurchaseInvoice,(Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) As ToPay
  194. From PurchaseInvoice
  195. Join Supplier On Supplier.ID_Supplier=PurchaseInvoice.ID_Supplier
  196. WHERE No_Supplier BETWEEN ISNULL(@StartSupplierNo,'') AND ISNULL(@EndSupplierNo,(SELECT MAX(No_Supplier) FROM Supplier))
  197. AND PurchaseInvoice.No_Invoice BETWEEN ISNULL(@StartPurchaseInvoiceNo,'') AND ISNULL(@EndPurchaseInvoiceNo,(Select MAX(No_Invoice) FROM PurchaseInvoice))
  198. AND InvoiceDate_PurchaseInvoice BETWEEN ISNULL(DATEADD(day,0,DATEDIFF(day,0,@StartDate)),0) AND ISNULL(DATEADD(day,0,(DATEDIFF(day,0,@EndDate)+1)),'9999-12-31')
  199. AND PurchaseInvoice.ID_Assessor IS NOT NULL AND PurchaseInvoice.Disable_PurchaseInvoice=0 AND (Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) != 0
  200. Order By No_Supplier
  201. ">
  202. <Params>
  203. <Param name="@StartSupplierNo" type="Customer.No_Customer" Index="0" />
  204. <Param name="@EndSupplierNo" type="Customer.No_Customer" Index="1" />
  205. <Param name="@StartPurchaseInvoiceNo" type="SaleBill.No_SaleBill" Index="2" />
  206. <Param name="@EndPurchaseInvoiceNo" type="SaleBill.No_SaleBill" Index="3" />
  207. <Param name="@StartDate" type="SaleBill.AssessDate_SaleBill" Index="4" />
  208. <Param name="@EndDate" type="SaleBill.AssessDate_SaleBill" Index="5" />
  209. </Params>
  210. <Tables>
  211. <Table name="Total"/>
  212. </Tables>
  213. </SearchReceivales>
  214. </Search>
  215. </Server>
  216. <Lables>
  217. <Search>
  218. </Search>
  219. </Lables>
  220. </Form>
  221. </Forms>