123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654 |
- <?xml version="1.0" encoding="UTF-8"?>
- <Forms>
- <Form Name="FrmPrePay">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @Title="预付帐款";
- GetSchema();
- Search("SearchSystemSetting");
- @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
- ChangeMode("Search");
- ]]>
- </Load>
- <Closing>
- ;<!--TODO-->
- </Closing>
- <Closed>
- ;<!--TODO-->
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- <New>
- <Lable name="New" />
- </New>
- <View>
- <Lable name="View" />
- </View>
- <Modify>
- <Lable name="Modify" />
- </Modify>
- </Mode>
- <Controls>
- <IKTextButton name="tbNo" DataSource="PrePay.No_PrePay">
- <Events>
- <Enter>
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchPrePayWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- MessageBox("该预付帐款不存在!",@Title);
- }
- }
- else
- {
- MessageBox("请输入付款编号!", @Title);
- }
- }
- </Enter>
- <Click>
- ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKDataTimePicker name="dtDate" DataSource="PrePay.Date_PrePay" />
- <IKTextBox name="txtMaker" DataSource="PrePay.Creator" />
- <IKTextButton name="tbSupplierNo" DataSource="PrePay.No_Supplier" >
- <Events>
- <Enter>
- UpdateForm(false,"");
- if(tbSupplierNo.CValue!=StringEmpty())
- {
- if(!Search("SearchSupplier",tbSupplierNo.CValue))
- {
- MessageBox("该供应商不存在!",@Title);
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbSupplierNo.CValue);
- if(@temp != "")
- {
- tbSupplierNo.CValue = @temp;
- ActiveControlEvent("tbSupplierNo", "Enter");
- }
-
- }
- else
- {
- if(!Equals(#Supplier.SuspendDate_Supplier,DBNull()))
- {
- MessageBox("该供应商已停用!",@Title);
- }
- #PrePay.ID_Supplier=#Supplier.ID_Supplier;
- #PrePay.ShortName_Supplier=#Supplier.ShortName_Supplier;
- #PrePay.Balance_PrePay=#Supplier.PreGetBalance_Supplier;
- }
- }
- else
- {
- MessageBox("请输入供应商编号!",@Title);
- #PrePay.ID_Supplier=GuidEmpty();
- #PrePay.ShortName_Supplier="";
- #PrePay.Balance_PrePay=0;
- tbSupplierNo.Focus();
- }
- UpdateForm(true,"");
- </Enter>
- <Click>
- if (tbSupplierNo.ReadOnly == false)
- {
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbSupplierNo.CValue);
- if(@temp == "")
- {
- return;
- }
- else
- {
- tbSupplierNo.CValue = @temp;
- ActiveControlEvent("tbSupplierNo", "Enter");
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtSupplierName" DataSource="PrePay.ShortName_Supplier"/>
- <IKComboBoxEx name="cbGetCurrency" DisplaySource="PrePay.PayCurrency_PrePay"/>
- <IKComboBoxEx name="cbBillCurrency" DisplaySource="PrePay.Currency_PrePay"/>
- <IKNumericTextBox name="txtRate" DataSource="PrePay.Rate_PrePay"/>
- <IKComboBoxEx name="cbPayType" DisplaySource="PrePay.Method_PrePay" DataSource="Method" DisplayMember="Name_TypeDef">
- <Events>
- <Reload>
- UpdateForm(false, "cbPayType");
- Search("SearchMethod");
- UpdateForm(true, "cbPayType");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKNumericTextBox name="ntbMoney" DataSource="PrePay.Amount_PrePay"/>
- <IKTextBox name="txtVoucherDate" DataSource="PrePay.VoucherDate_PrePay" />
- <IKTextBox name="txtVoucherNo" DataSource="PrePay.VoucherNo_PrePay"/>
- <IKTextBox name="txtComment" DataSource="PrePay.Comment_PrePay"/>
- <IKComboBoxEx name="cbTransactor" ValueSource="PrePay.ID_Payer" DisplaySource="PrePay.Name_Employee" NoSource="PrePay.No_Payer" DataSource="Employee" DisplayMember="Name_Employee" NoMember="No_Employee" ValueMember="ID_Employee">
- <Events>
- <Reload>
- UpdateForm(false, "cbTransactor");
- Search("SearchPayer");
- UpdateForm(true, "cbTransactor");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKNumericTextBox name="ntbBalance" DataSource="PrePay.Balance_PrePay"/>
- <IKTextBox name="txtAssessor" DataSource="PrePay.Assessor" />
- <IKDateTimeText name="dtAssessDate" DataSource="PrePay.AssessDate_PrePay" />
- <IKTextBox name="txtLastModUser" DataSource="PrePay.LastModUser"/>
- <IKDateTimeText name="dtLastModDate" DataSource="PrePay.LastModDate_PrePay"/>
-
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchPrePayFirst"))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchPrePayPrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchPrePayNext",tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchPrePayLast"))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickNew>
- <![CDATA[
- @NextNo = GetNextAutoNumber(true);
- if (!Equals(@NextNo, ""))
- {
- ChangeMode("New");
- #PrePay.No_PrePay= @NextNo;
- UpdateForm(true, "tbNo");
- }
- ]]>
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick" />
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- PrintReport();
- </ClickPrint>
- <ClickAudit>
- BeginAudit();
- #PrePay.ID_Assessor=GetLoginUserID();
- #PrePay.Assessor=GetCurrentUser();
- #PrePay.AssessDate_PrePay=DateTimeNow();
- Audit();
- ChangeMode("View");
- EndAudit();
- </ClickAudit>
- <ClickUnAudit>
- BeginUnAudit();
- #PrePay.ID_Assessor=DBNull();
- #PrePay.Assessor=DBNull();
- #PrePay.AssessDate_PrePay=DataTimeNow();
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- ;
- </ClickExpand>
- </Events>
- </IKFormToolBar>
- </Controls>
- <LockInfomation LockID="ID_PrePay" LockNO="No_PrePay" LockSearchFunction="SearchPrePayWithNo" LockAudit="ID_Assessor"/>
- <LogInfomation LogNO="#PrePay.No_PrePay" RecordFormField="付款方式:#PrePay.Method_PrePay,供应商编号:#PrePay.No_Supplier,付款金额:#PrePay.Amount_PrePay" RecordDataGridField=""/>
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="PrePay" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchPrePayWithNo">
- <DataColumn Index="0" MappingName="#PrePay.No_PrePay" HeaderText="预付帐款号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#PrePay.CreateDate_PrePay" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#PrePay.ShortName_Supplier" HeaderText="供应商简称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <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>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="PrePay" Type="Parent">
- <GetSchema CmdType="Text" CmdText="
- SELECT TOP 0 PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer,Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- ">
- </GetSchema>
- <New CmdType="Text" CmdText="
- INSERT INTO PrePay(ID_PrePay,No_PrePay,Date_PrePay,ID_Supplier,PayCurrency_PrePay,Currency_PrePay,Rate_PrePay,Method_PrePay,Amount_PrePay,VoucherNo_PrePay,VoucherDate_PrePay,ID_Payer,Balance_PrePay,
- ID_Creator,CreateDate_PrePay,LastModUser_PrePay,LastModDate_PrePay,ID_Assessor,AssessDate_PrePay,Comment_PrePay) VALUES(@ID_PrePay,@No_PrePay,@Date_PrePay,@ID_Supplier,@PayCurrency_PrePay,@Currency_PrePay,@Rate_PrePay,@Method_PrePay,@Amount_PrePay,@VoucherNo_PrePay,@VoucherDate_PrePay,@ID_Payer,@Balance_PrePay,
- @ID_Creator,@CreateDate_PrePay,@LastModUser_PrePay,@LastModDate_PrePay,@ID_Assessor,@AssessDate_PrePay,@Comment_PrePay)
- ">
- <Params>
- <Param name="@ID_PrePay" type="PrePay.ID_PrePay" sourceColumn="ID_PrePay" />
- <Param name="@No_PrePay" type="PrePay.No_PrePay" sourceColumn="No_PrePay" />
- <Param name="@Date_PrePay" type="PrePay.Date_PrePay" sourceColumn="Date_PrePay" />
- <Param name="@ID_Supplier" type="PrePay.ID_Supplier" sourceColumn="ID_Supplier" />
- <Param name="@PayCurrency_PrePay" type="PrePay.PayCurrency_PrePay" sourceColumn="PayCurrency_PrePay" />
- <Param name="@Currency_PrePay" type="PrePay.Currency_PrePay" sourceColumn="Currency_PrePay" />
- <Param name="@Rate_PrePay" type="PrePay.Rate_PrePay" sourceColumn="Rate_PrePay" />
- <Param name="@Method_PrePay" type="PrePay.Method_PrePay" sourceColumn="Method_PrePay" />
- <Param name="@Amount_PrePay" type="PrePay.Amount_PrePay" sourceColumn="Amount_PrePay" />
- <Param name="@VoucherNo_PrePay" type="PrePay.VoucherNo_PrePay" sourceColumn="VoucherNo_PrePay" />
- <Param name="@VoucherDate_PrePay" type="PrePay.VoucherDate_PrePay" sourceColumn="VoucherDate_PrePay" />
- <Param name="@ID_Payer" type="PrePay.ID_Payer" sourceColumn="ID_Payer" />
- <Param name="@Balance_PrePay" type="PrePay.Balance_PrePay" sourceColumn="Balance_PrePay" />
- <Param name="@ID_Creator" type="PrePay.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@CreateDate_PrePay" type="PrePay.CreateDate_PrePay" sourceColumn="CreateDate_PrePay" />
- <Param name="@LastModUser_PrePay" type="PrePay.LastModUser_PrePay" sourceColumn="LastModUser_PrePay" />
- <Param name="@LastModDate_PrePay" type="PrePay.LastModDate_PrePay" sourceColumn="LastModDate_PrePay" />
- <Param name="@ID_Assessor" type="PrePay.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_PrePay" type="PrePay.AssessDate_PrePay" sourceColumn="AssessDate_PrePay" />
- <Param name="@Comment_PrePay" type="PrePay.Comment_PrePay" sourceColumn="Comment_PrePay" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="
- UPDATE PrePay
- SET No_PrePay=@No_PrePay,Date_PrePay=@Date_PrePay,ID_Supplier=@ID_Supplier,
- PayCurrency_PrePay=@PayCurrency_PrePay,Currency_PrePay=@Currency_PrePay,Rate_PrePay=@Rate_PrePay,
- Method_PrePay=@Method_PrePay,Amount_PrePay=@Amount_PrePay,VoucherNo_PrePay=@VoucherNo_PrePay,
- VoucherDate_PrePay=@VoucherDate_PrePay,ID_Payer=@ID_Payer,Balance_PrePay=@Balance_PrePay,
- ID_Creator=@ID_Creator,CreateDate_PrePay=@CreateDate_PrePay,LastModUser_PrePay=@LastModUser_PrePay,
- LastModDate_PrePay=@LastModDate_PrePay,ID_Assessor=@ID_Assessor,AssessDate_PrePay=@AssessDate_PrePay,Comment_PrePay=@Comment_PrePay
- WHERE ID_PrePay=@ID_PrePay
- ">
-
- <Params>
- <Param name="@ID_PrePay" type="PrePay.ID_PrePay" sourceColumn="ID_PrePay" />
- <Param name="@No_PrePay" type="PrePay.No_PrePay" sourceColumn="No_PrePay" />
- <Param name="@Date_PrePay" type="PrePay.Date_PrePay" sourceColumn="Date_PrePay" />
- <Param name="@ID_Supplier" type="PrePay.ID_Supplier" sourceColumn="ID_Supplier" />
- <Param name="@PayCurrency_PrePay" type="PrePay.PayCurrency_PrePay" sourceColumn="PayCurrency_PrePay" />
- <Param name="@Currency_PrePay" type="PrePay.Currency_PrePay" sourceColumn="Currency_PrePay" />
- <Param name="@Rate_PrePay" type="PrePay.Rate_PrePay" sourceColumn="Rate_PrePay" />
- <Param name="@Method_PrePay" type="PrePay.Method_PrePay" sourceColumn="Method_PrePay" />
- <Param name="@Amount_PrePay" type="PrePay.Amount_PrePay" sourceColumn="Amount_PrePay" />
- <Param name="@VoucherNo_PrePay" type="PrePay.VoucherNo_PrePay" sourceColumn="VoucherNo_PrePay" />
- <Param name="@VoucherDate_PrePay" type="PrePay.VoucherDate_PrePay" sourceColumn="VoucherDate_PrePay" />
- <Param name="@ID_Payer" type="PrePay.ID_Payer" sourceColumn="ID_Payer" />
- <Param name="@Balance_PrePay" type="PrePay.Balance_PrePay" sourceColumn="Balance_PrePay" />
- <Param name="@ID_Creator" type="PrePay.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@CreateDate_PrePay" type="PrePay.CreateDate_PrePay" sourceColumn="CreateDate_PrePay" />
- <Param name="@LastModUser_PrePay" type="PrePay.LastModUser_PrePay" sourceColumn="LastModUser_PrePay" />
- <Param name="@LastModDate_PrePay" type="PrePay.LastModDate_PrePay" sourceColumn="LastModDate_PrePay" />
- <Param name="@ID_Assessor" type="PrePay.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_PrePay" type="PrePay.AssessDate_PrePay" sourceColumn="AssessDate_PrePay" />
- <Param name="@Comment_PrePay" type="PrePay.Comment_PrePay" sourceColumn="Comment_PrePay" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="
- DELETE FROM PrePay WHERE ID_PrePay=@ID_PrePay
- ">
- <Params>
- <Param name="@ID_PrePay" type="PrePay.ID_PrePay" sourceColumn="ID_PrePay" />
- </Params>
- </Delete>
- <Audit CmdType="Text" CmdText="
- IF(@ID_Assessor IS NOT NULL)
- UPDATE Supplier SET PreGetBalance_Supplier=PreGetBalance_Supplier+@Amount_PrePay WHERE ID_Supplier=@ID_Supplier
- ELSE
- BEGIN
- IF((SELECT PreGetBalance_Supplier FROM Supplier WHERE ID_Supplier=@ID_Supplier) < @Amount_PrePay)
- BEGIN
- RAISERROR('已有部分帐款用于冲帐,取消审核失败!',16,1)
- RETURN
- END
- UPDATE Supplier SET PreGetBalance_Supplier=PreGetBalance_Supplier-@Amount_PrePay WHERE ID_Supplier=@ID_Supplier
- END
-
- UPDATE PrePay SET ID_Assessor=@ID_Assessor,AssessDate_PrePay=@AssessDate_PrePay WHERE ID_PrePay=@ID_PrePay
-
- ">
- <Params>
- <Param name="@ID_PrePay" type="PrePay.ID_PrePay" sourceColumn="ID_PrePay"/>
- <Param name="@ID_Supplier" type="PrePay.ID_Supplier" sourceColumn="ID_Supplier"/>
- <Param name="@Amount_PrePay" type="PrePay.Amount_PrePay" sourceColumn="Amount_PrePay"/>
- <Param name="@ID_Assessor" type="PrePay.ID_Assessor" sourceColumn="ID_Assessor"/>
- <Param name="@AssessDate_PrePay" type="PrePay.AssessDate_PrePay" sourceColumn="AssessDate_PrePay"/>
- </Params>
- </Audit>
- </Table>
- </Tables>
- <Search>
- <SearchAllBill CmdType="Text" CmdText=" SELECT PrePay.*,ShortName_Supplier FROM PrePay LEFT JOIN Supplier ON Supplier.ID_Supplier=PrePay.ID_Supplier">
- <Tables>
- <Table name="AllBill" />
- </Tables>
- </SearchAllBill>
- <SearchAllSupplier CmdType="Text" CmdText="SELECT Supplier.No_Supplier,Supplier.ShortName_Supplier FROM Supplier ">
- <Tables>
- <Table name="AllSupplier" />
- </Tables>
- </SearchAllSupplier>
- <SearchSupplier CmdType="Text" CmdText="
- SELECT ID_Supplier,ShortName_Supplier,PreGetBalance_Supplier,SuspendDate_Supplier
- From Supplier
- WHERE No_Supplier=@No_Supplier
- ">
- <Params>
- <Param name="@No_Supplier" type="Supplier.No_Supplier" Index="0" />
- </Params>
- <Tables>
- <Table name="Supplier"/>
- </Tables>
- </SearchSupplier>
- <SearchPayer CmdType="Text" CmdText="
- SELECT Name_Employee,ID_Employee, No_Employee From Employee ORDER BY No_Employee
- ">
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchPayer>
- <SearchMethod CmdType="Text" CmdText="
- SELECT Name_TypeDef FROM TypeDef WHERE Type_TypeDef=23
- ">
- <Tables>
- <Table name="Method"/>
- </Tables>
- </SearchMethod>
- <SearchPrePayWithNo CmdType="Text" CmdText="
- SELECT PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer,Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- WHERE No_PrePay=@No_PrePay
- ">
- <Params>
- <Param name="@No_PrePay" type="PrePay.No_PrePay" Index="0" />
- </Params>
- <Tables>
- <Table name="PrePay"/>
- </Tables>
- </SearchPrePayWithNo>
- <SearchPrePayFirst CmdType="Text" CmdText="
- SELECT TOP 1 PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer,Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- ORDER BY No_PrePay
- ">
- <Tables>
- <Table name="PrePay"/>
- </Tables>
- </SearchPrePayFirst>
-
- <SearchPrePayLast CmdType="Text" CmdText="
- SELECT TOP 1 PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer, Employee.Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- ORDER BY No_PrePay DESC
- ">
- <Tables>
- <Table name="PrePay"/>
- </Tables>
- </SearchPrePayLast>
-
- <SearchPrePayPrevious CmdType="Text" CmdText="
- SELECT TOP 1 PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer, Employee.Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- WHERE No_PrePay < @No_PrePay
- ORDER BY No_PrePay DESC
- ">
- <Params>
- <Param name="@No_PrePay" type="PrePay.No_PrePay" Index="0" />
- </Params>
- <Tables>
- <Table name="PrePay"/>
- </Tables>
- </SearchPrePayPrevious>
-
- <SearchPrePayNext CmdType="Text" CmdText="
- SELECT TOP 1 PrePay.*,a.Name_User As Creator ,b.Name_User As Assessor,c.Name_User As LastModUser,Supplier.No_Supplier,Supplier.ShortName_Supplier,Employee.No_Employee As No_Payer, Employee.Name_Employee
- FROM PrePay
- LEFT JOIN AppUser a ON PrePay.ID_Creator=a.ID_User
- LEFT JOIN AppUser b ON PrePay.ID_Assessor=b.ID_User
- LEFT JOIN AppUser c ON PrePay.LastModUser_PrePay=c.ID_User
- Left JOIN Supplier On Supplier.ID_Supplier=PrePay.ID_Supplier
- LEFT JOIN Employee ON Employee.ID_Employee=PrePay.ID_Payer
- WHERE No_PrePay > @No_PrePay
- ORDER BY No_PrePay
- ">
- <Params>
- <Param name="@No_PrePay" type="PrePay.No_PrePay" Index="0" />
- </Params>
- <Tables>
- <Table name="PrePay"/>
- </Tables>
- </SearchPrePayNext>
- <SearchSystemSetting CmdType="Text" CmdText="SELECT SysCurrency_SystemSetting From SystemSetting">
- <Tables>
- <Table name="SystemSetting"/>
- </Tables>
- </SearchSystemSetting>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- dtDate.Enabled=false;
- tbSupplierNo.ReadOnly=true;
- txtVoucherDate.Enabled=false;
- txtVoucherNo.ReadOnly=true;
- cbTransactor.Enabled=false;
- ntbMoney.ReadOnly=true;
- txtComment.ReadOnly=true;
- cbPayType.Enabled=false;
- #PrePay.Creator=DBNull();
- #PrePay.ID_Creator=DBNull();
- #PrePay.Assessor=DBNull();
- #PrePay.ID_Assessor=DBNull();
- #PrePay.AssessDate_PrePay=DBNull();
- #PrePay.LastModUser_PrePay=DBNull();
- #PrePay.LastModUser=DBNull();
- #PrePay.LastModDate_PrePay=DBNull();
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- toolBar.EnablePrint=false;
- UpdateForm(true,"");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- Empty();
- NewInstance();
- tbNo.ReadOnly=true;
- dtDate.Enabled=true;
- tbSupplierNo.ReadOnly=false;
- txtVoucherDate.Enabled=true;
- txtVoucherNo.ReadOnly=false;
- cbTransactor.Enabled=true;
- ntbMoney.ReadOnly=false;
- txtComment.ReadOnly=false;
- cbPayType.Enabled=true;
- #PrePay.ID_PrePay=NewGuid();
- #PrePay.PayCurrency_PrePay=@SysCurrency;
- #PrePay.Currency_PrePay=@SysCurrency;
- #PrePay.Rate_PrePay=1.00;
- #PrePay.Creator=GetCurrentUser();
- #PrePay.ID_Creator=GetLoginUserID();
- #PrePay.Assessor=DBNull();
- #PrePay.ID_Assessor=DBNull();
- #PrePay.AssessDate_PrePay=DBNull();
- #PrePay.LastModUser_PrePay=DBNull();
- #PrePay.LastModUser=DBNull();
- #PrePay.LastModDate_PrePay=DBNull();
- #PrePay.Date_PrePay=GetCurrentTime();
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnableNew=false;
- toolBar.EnablePrint=false;
- UpdateForm(true,"");
- @Status=1;
- </New>
- <View>
- tbNo.ReadOnly=false;
- dtDate.Enabled=false;
- tbSupplierNo.ReadOnly=true;
- txtVoucherDate.Enabled=false;
- txtVoucherNo.ReadOnly=true;
- cbTransactor.Enabled=false;
- ntbMoney.ReadOnly=true;
- txtComment.ReadOnly=true;
- cbPayType.Enabled=false;
- toolBar.EnableSubmit=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- if(Equals(#PrePay.ID_Assessor, DBNull()))
- {
- toolBar.EnableAudit=GetRight(@Title,"审核");
- toolBar.EnableUnAudit=false;
- toolBar.EnableModify=GetRight(@Title,"修改");
- toolBar.EnableDelete=GetRight(@Title,"删除");
- }
- else
- {
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=GetRight(@Title,"取消审核");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- }
- toolBar.EnablePrint=GetRight(@Title,"打印");
- UpdateForm(true, "");
-
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- dtDate.Enabled=false;
- tbSupplierNo.ReadOnly=false;
- txtVoucherDate.Enabled=true;
- txtVoucherNo.ReadOnly=false;
- cbTransactor.Enabled=true;
- ntbMoney.ReadOnly=false;
- txtComment.ReadOnly=false;
- cbPayType.Enabled=true;
- #PrePay.LastModUser=GetCurrentUser();
- #PrePay.LastModUser_PrePay=GetLoginUserID();
- #PrePay.LastModDate_PrePay=GetCurrentTime();
- toolBar.EnableSubmit=GetRight(@Title,"修改");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnableNew=false;
- toolBar.EnablePrint=false;
- UpdateForm(true, "");
- @Status=3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if(!Search("SearchSupplier",tbSupplierNo.CValue)||!Equals(#PrePay.ID_Supplier,#Supplier.ID_Supplier))
- {
- MessageBox("请输入有效的供应商,回车以示确认!",@Title);
- tbSupplierNo.Focus();
- return;
- }
- if(ntbMoney.CValue <= 0)
- {
- MessageBox("收款金额必须大于0 !",@Title);
- ntbMoney.Focus();
- return;
- }
- if(!cbTransactor.CheckSelectedItem())
- {
- MessageBox("请输入有效的经办人!",@Title);
- cbTransactor.Focus();
- return;
- }
- UpdateForm(false,"");
- if(@Status==1)
- { #PrePay.CreateDate_PrePay=GetCurrentTime();
- #PrePay.No_PrePay = New("PrePay.No_PrePay", dtDate.CValue);
- }
- else if(@Status==3)
- {
- #PrePay.LastModUser=GetCurrentUser();
- #PrePay.LastModUser_PrePay=GetLoginUserID();
- #PrePay.LastModDate_PrePay=GetCurrentTime();
- Update();
- }
-
- ChangeMode("View");
- ]]>
- </SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|