123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmPayableAccount">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="应付帐款";
- GetSchema();
- Empty();
- txtSum.CValue=0.00;
- ]]>
- </Load>
- <Closing>
- ;<!--TODO-->
- </Closing>
- <Closed>
- ;<!--TODO-->
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- </Mode>
- <Controls>
- <IKTextButton name="txtSupplierNo1" DataSource="UI.StartNo_Customer">
- <Events>
- <Click>
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",txtSupplierNo1.CValue);
- if( @temp == "" )
- return;
- txtSupplierNo1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- txtSupplierNo2.CValue = txtSupplierNo1.CValue;
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtSupplierNo2" DataSource="UI.EndNo_Customer">
- <Events>
- <Click>
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",txtSupplierNo2.CValue);
- if( @temp == "" )
- return;
- txtSupplierNo2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtPurchaseInvoiceNo1" >
- <Events>
- <Click>
- @temp = ShowSearchBox("InvoiceNoSearch","NODEPOT","txtPurchaseInvoiceNo1", txtPurchaseInvoiceNo1.CValue);
- if( @temp == "" )
- return;
- txtPurchaseInvoiceNo1.CValue = @temp;
- </Click>
- <TextBoxButtonTextChanged>
- txtPurchaseInvoiceNo2.CValue = txtPurchaseInvoiceNo1.CValue;
- </TextBoxButtonTextChanged>
- </Events>
- </IKTextButton>
- <IKTextButton name="txtPurchaseInvoiceNo2" >
- <Events>
- <Click>
- @temp = ShowSearchBox("InvoiceNoSearch","NODEPOT","txtPurchaseInvoiceNo2", txtPurchaseInvoiceNo2.CValue);
- if( @temp == "" )
- return;
- txtPurchaseInvoiceNo2.CValue = @temp;
- </Click>
- </Events>
- </IKTextButton>
- <IKExtendGrid name="ikExtendGrid1" DataSource="Total" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="Total.No_Supplier"/>
- <DataColumn Index="1" DataSource="Total.ShortName_Supplier"/>
- <DataColumn Index="2" DataSource="Total.No_Invoice"/>
- <DataColumn Index="3" DataSource="Total.InvoiceDate_PurchaseInvoice"/>
- <DataColumn Index="4" DataSource="Total.Amount_PurchaseInvoice"/>
- <DataColumn Index="5" DataSource="Total.StrikedAmount_PurchaseInvoice"/>
- <DataColumn Index="6" DataSource="Total.ToPay"/>
- <Events>
- <ClickPreview>
- PrintReport(ikExtendGrid1.CurrentView);
- </ClickPreview>
- <ClickRefresh>
- Empty();
- @StartSupplierNo =DBNull();
- @EndSupplierNo =DBNull();
- @StartPurchaseInvoiceNo =DBNull();
- @EndPurchaseInvoiceNo =DBNull();
- @StartDate =DBNull();
- @EndDate =DBNull();
- if(!Equals(txtSupplierNo1.CValue,""))
- @StartSupplierNo= txtSupplierNo1.CValue;
- if(!Equals(txtSupplierNo2.CValue,""))
- @EndSupplierNo= txtSupplierNo2.CValue;
- if(!Equals(txtPurchaseInvoiceNo1.CValue,""))
- @StartPurchaseInvoiceNo= txtPurchaseInvoiceNo1.CValue;
- if(!Equals(txtPurchaseInvoiceNo2.CValue,""))
- @EndPurchaseInvoiceNo= txtPurchaseInvoiceNo2.CValue;
- if(dtInvoiceDate1.Checked)
- @StartDate= dtInvoiceDate1.Value;
- if(dtInvoiceDate2.Checked)
- @EndDate= dtInvoiceDate2.Value;
- Search("SearchReceivales",@StartSupplierNo,@EndSupplierNo,@StartPurchaseInvoiceNo,@EndPurchaseInvoiceNo,
- @StartDate,@EndDate);
- txtSum.CValue=SumOfCol("#Total.ToPay");
- </ClickRefresh>
- <ClickFilter>
- txtSum.CValue = SumOfCol("#Total.ToPay",ikExtendGrid1.FilterCondition,true);
- </ClickFilter>
- <ClickNOFilter>
- txtSum.CValue = SumOfCol("#Total.ToPay",ikExtendGrid1.FilterCondition,true);
- </ClickNOFilter>
- </Events>
- </IKExtendGrid>
- <IKButton name="btnSearch">
- <Events>
- <Click>
- Empty();
- @StartSupplierNo =DBNull();
- @EndSupplierNo =DBNull();
- @StartPurchaseInvoiceNo =DBNull();
- @EndPurchaseInvoiceNo =DBNull();
- @StartDate =DBNull();
- @EndDate =DBNull();
- if(!Equals(txtSupplierNo1.CValue,""))
- @StartSupplierNo= txtSupplierNo1.CValue;
- if(!Equals(txtSupplierNo2.CValue,""))
- @EndSupplierNo= txtSupplierNo2.CValue;
- if(!Equals(txtPurchaseInvoiceNo1.CValue,""))
- @StartPurchaseInvoiceNo= txtPurchaseInvoiceNo1.CValue;
- if(!Equals(txtPurchaseInvoiceNo2.CValue,""))
- @EndPurchaseInvoiceNo= txtPurchaseInvoiceNo2.CValue;
- if(dtInvoiceDate1.Checked)
- @StartDate= dtInvoiceDate1.Value;
- if(dtInvoiceDate2.Checked)
- @EndDate= dtInvoiceDate2.Value;
- Search("SearchReceivales",@StartSupplierNo,@EndSupplierNo,@StartPurchaseInvoiceNo,@EndPurchaseInvoiceNo,
- @StartDate,@EndDate);
- txtSum.CValue=SumOfCol("#Total.ToPay");
- </Click>
- </Events>
- </IKButton>
- <IKButton name="btnClear">
- <Events>
- <Click>
- Empty();
- txtSupplierNo1.CValue="";
- txtSupplierNo2.CValue="";
- txtPurchaseInvoiceNo1.CValue="";
- txtPurchaseInvoiceNo2.CValue="";
- dtInvoiceDate1.Checked=False;
- dtInvoiceDate2.Checked=False;
- txtSum.CValue=0.00;
- </Click>
- </Events>
- </IKButton>
- </Controls>
- <ChildForms>
- <ChildForm name="SupplierSearch" DataSource="Supplier" SearchFunction="SearchAllSupplier" SearchFunctionByNo="" MappingName="供应商">
- <DataColumn Index="0" MappingName="#Supplier.No_Supplier" HeaderText="供应商编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Supplier.ShortName_Supplier" HeaderText="供应商简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="InvoiceNoSearch" DataSource="PurchaseInvoice" SearchFunction="SearchAllInvoiceNo" SearchFunctionByNo="" MappingName="发票编号">
- <DataColumn Index="0" MappingName="#PurchaseInvoice.No_Invoice" HeaderText="发票编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#PurchaseInvoice.InvoiceDate_PurchaseInvoice" HeaderText="发票日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="Total" Type="Parent">
- <GetSchema CmdType="Text" CmdText="
- Select No_Supplier,ShortName_Supplier,PurchaseInvoice.No_PurchaseInvoice,No_Invoice,InvoiceDate_PurchaseInvoice,PayDate_PurchaseInvoice,Amount_PurchaseInvoice,StrikedAmount_PurchaseInvoice,(Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) As ToPay
- From PurchaseInvoice
- Join Supplier On Supplier.ID_Supplier=PurchaseInvoice.ID_Supplier
- "/>
- </Table>
- </Tables>
- <Search>
- <SearchAllSupplier CmdType="Text" CmdText="SELECT Supplier.No_Supplier,Supplier.ShortName_Supplier FROM Supplier ">
- <Tables>
- <Table name="AllSupplier" />
- </Tables>
- </SearchAllSupplier>
- <SearchAllInvoiceNo CmdType="Text" CmdText="SELECT No_Invoice,InvoiceDate_PurchaseInvoice FROM PurchaseInvoice">
- <Tables>
- <Table name="AllInvoiceNo" />
- </Tables>
- </SearchAllInvoiceNo>
- <SearchReceivales CmdType="Text" CmdText="
- Select No_Supplier,ShortName_Supplier,PurchaseInvoice.No_PurchaseInvoice,No_Invoice,InvoiceDate_PurchaseInvoice,PayDate_PurchaseInvoice,Amount_PurchaseInvoice,StrikedAmount_PurchaseInvoice,(Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) As ToPay
- From PurchaseInvoice
- Join Supplier On Supplier.ID_Supplier=PurchaseInvoice.ID_Supplier
-
- WHERE No_Supplier BETWEEN ISNULL(@StartSupplierNo,'') AND ISNULL(@EndSupplierNo,(SELECT MAX(No_Supplier) FROM Supplier))
- AND PurchaseInvoice.No_Invoice BETWEEN ISNULL(@StartPurchaseInvoiceNo,'') AND ISNULL(@EndPurchaseInvoiceNo,(Select MAX(No_Invoice) FROM PurchaseInvoice))
- 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')
- AND PurchaseInvoice.ID_Assessor IS NOT NULL AND PurchaseInvoice.Disable_PurchaseInvoice=0 AND (Amount_PurchaseInvoice-StrikedAmount_PurchaseInvoice) != 0
- Order By No_Supplier
- ">
- <Params>
- <Param name="@StartSupplierNo" type="Customer.No_Customer" Index="0" />
- <Param name="@EndSupplierNo" type="Customer.No_Customer" Index="1" />
- <Param name="@StartPurchaseInvoiceNo" type="SaleBill.No_SaleBill" Index="2" />
- <Param name="@EndPurchaseInvoiceNo" type="SaleBill.No_SaleBill" Index="3" />
- <Param name="@StartDate" type="SaleBill.AssessDate_SaleBill" Index="4" />
- <Param name="@EndDate" type="SaleBill.AssessDate_SaleBill" Index="5" />
- </Params>
- <Tables>
- <Table name="Total"/>
- </Tables>
- </SearchReceivales>
- </Search>
- </Server>
- <Lables>
- <Search>
- </Search>
- </Lables>
- </Form>
- </Forms>
|