123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605 |
- <?xml version="1.0" encoding="UTF-8"?>
- <Forms>
- <Form Name="FrmPurchaseQueryBill">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @SetFlag=1;
- @Title="询价单";
- GetSchema();
- Search("SearchCessIn");
- Search("SearchFormat");
-
- Search("SearchProduct","p");
-
- @CessIn=#SystemSetting.CessIn_SystemSetting/100;
- @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
- @AuditMode = #SystemSetting.QAudit_FunctionSetting;
- @UnitPriceDecimal = #SystemSettingFormat.UnitPriceDecimal_SystemSetting;
- @PriceDecimal = #SystemSettingFormat.PriceDecimal_SystemSetting;
- @QuantityDecimal = #SystemSettingFormat.QuantityDecimal_SystemSetting;
- ChangeMode("Search");
- dgProduct.NoMember="No_PurchaseQueryBillProduct";
- if(@AuditMode)
- {
- toolBar.VisibleAudit = false;
- toolBar.EnableAudit = false;
- }
- ]]>
- </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="PurchaseQueryBill.No_PurchaseQueryBill">
- <Events>
- <Enter>
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(Search("SearchPurchaseQueryBillWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- <Lable name="CountSum"/>
- }
- else
- {
- MessageBox("该采购询价单不存在!",@Title);
- }
- }
- else
- {
- MessageBox("请输入采购询价单号!", @Title);
- }
- }
- </Enter>
- <Click>
- ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKDataTimePicker name="timeMake" DataSource="PurchaseQueryBill.Date_PurchaseQueryBill" />
- <IKDataTimePicker name="dtpRespondDate" DataSource="PurchaseQueryBill.ResponseDate_PurchaseQueryBill" />
- <IKDataTimePicker name="dtpValidityDate" DataSource="PurchaseQueryBill.ValidDate_PurchaseQueryBill" />
-
- <IKTextButton name="tbNoSupplier" DataSource="PurchaseQueryBill.No_Supplier" >
- <Events>
- <Enter>
- UpdateForm(false,"");
- if(tbNoSupplier.CValue!=StringEmpty())
- {
- if(!Search("SearchSupplier",tbNoSupplier.CValue))
- {
- MessageBox("该供应商不存在!",@Title);
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbNoSupplier.CValue);
- if(@temp != "")
- {
- tbNoSupplier.CValue = @temp;
- ActiveControlEvent("tbNoSupplier", "Enter");
- }
- }
- else
- {
- if (!Equals(#Supplier.SuspendDate_Supplier,DBNull()))
- {
- MessageBox("该供应商已停用!",@Title);
- }
- #PurchaseQueryBill.ID_Supplier=#Supplier.ID_Supplier;
- #PurchaseQueryBill.Name_Supplier=#Supplier.Name_Supplier;
- #PurchaseQueryBill.ShortName_Supplier=#Supplier.ShortName_Supplier;
- #PurchaseQueryBill.PostalCode_Supplier=#Supplier.PostalCode_Supplier;
- #PurchaseQueryBill.RegistedAddress_Supplier=#Supplier.RegistedAddress_Supplier;
- #PurchaseQueryBill.Name_Linkman="";
- #PurchaseQueryBill.TaxCurrency_PurchaseQueryBill=#Supplier.LastTax_Supplier;
-
- Empty("#ReportComment");
- Search("SearchTypeComment",#PurchaseQueryBill.ID_Supplier);
- MergeTable("#TypeComment","#ReportComment");
-
- if(Search("SearchFocusLinkman",#Supplier.ID_Supplier))
- {
- #PurchaseQueryBill.Name_Linkman=#Linkman.Name_Linkman;
- }else{
- #PurchaseQueryBill.Name_Linkman="";
- }
- if(Search("SearchFocusTelephone",#Supplier.ID_Supplier))
- {
- #PurchaseQueryBill.Name_Telephone=#FocusTelephone.No_Telephone;
- }else{
- #PurchaseQueryBill.Name_Telephone="";
- }
- if(Search("SearchFocusFax",#Supplier.ID_Supplier))
- {
- #PurchaseQueryBill.Fax_Telephone=#FocusFax.No_Fax;
- }else{
- #PurchaseQueryBill.Fax_Telephone="";
- }
-
- }
- }
- else
- {
- MessageBox("请输入供应商编号!",@Title);
- #PurchaseQueryBill.ID_Supplier=GuidEmpty();
- #PurchaseQueryBill.ShortName_Supplier="";
- #PurchaseQueryBill.Name_Principal="";
- #PurchaseQueryBill.Name_Supplier="";
- #PurchaseQueryBill.Name_Linkman="";
- #PurchaseQueryBill.Name_Telephone="";
- #PurchaseQueryBill.Fax_Telephone="";
- #PurchaseQueryBill.PostalCode_Supplier="";
- #PurchaseQueryBill.RegistedAddress_Supplier="";
- tbNoSupplier.Focus();
- }
- UpdateForm(true,"");
- </Enter>
- <Click>
- <![CDATA[
- if (tbNoSupplier.ReadOnly == false)
- {
- @temp = ShowSearchBox("SupplierSearch","INFOMATION",tbNoSupplier.CValue);
- if( @temp == "" )
- return;
- tbNoSupplier.CValue = @temp;
- ActiveControlEvent("tbNoSupplier", "Enter");
- }
- ]]>
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="txtSupplierShortName" DataSource="PurchaseQueryBill.ShortName_Supplier"/>
- <IKComboBoxEx name="cbTaxCurrency" DisplaySource="PurchaseQueryBill.TaxCurrency_PurchaseQueryBill">
- <Events>
- <SelectedIndexChanged>
- <Lable name="CountSum" />
- </SelectedIndexChanged>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbCurrency" DisplaySource="PurchaseQueryBill.Currency_PurchaseQueryBill" DataSource="PurchaseQueryBill"/>
-
- <IKComboBoxEx name="cbPrincipal" ValueSource="PurchaseQueryBill.ID_Principal" DisplaySource="PurchaseQueryBill.Name_Principal" NoSource="PurchaseQueryBill.No_Principal" DataSource="Principal" DisplayMember="Name_Principal" NoMember="No_Principal" ValueMember="ID_Employee">
- <Events>
- <Reload>
- UpdateForm(false, "cbPrincipal");
- Search("SearchPrincipal");
- UpdateForm(true, "cbPrincipal");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="txtMaker" DataSource="PurchaseQueryBill.Creator" />
- <IKTextBox name="txtAssessor" DataSource="PurchaseQueryBill.Assessor" />
- <IKDateTimeText name="dtAssessDate" DataSource="PurchaseQueryBill.AssessDate_PurchaseQueryBill" />
- <IKTextBox name="txtLastModUser" DataSource="PurchaseQueryBill.LastModUser"/>
- <IKDateTimeText name="dtLastModDate" DataSource="PurchaseQueryBill.LastModDate_PurchaseQueryBill"/>
- <IKTextBox name="txtNameSupplier" DataSource="PurchaseQueryBill.Name_Supplier"/>
- <IKComboBoxEx name="cbLinkman" DisplaySource="PurchaseQueryBill.Name_Linkman" DataSource="Linkman" DisplayMember="Name_Linkman">
- <Events>
- <Reload>
- UpdateForm(false, "cbLinkman");
- Search("SearchLinkman",#PurchaseQueryBill.ID_Supplier);
- UpdateForm(true, "cbLinkman");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbTelephone" DisplaySource="PurchaseQueryBill.Name_Telephone" DataSource="Telephone" DisplayMember="No_Telephone">
- <Events>
- <Reload>
- UpdateForm(false, "cbTelephone");
- Search("SearchTelephone",#PurchaseQueryBill.ID_Supplier);
- UpdateForm(true, "cbTelephone");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="cbFax" DisplaySource="PurchaseQueryBill.Fax_Telephone" DataSource="Fax" DisplayMember="No_Fax">
- <Events>
- <Reload>
- UpdateForm(false, "cbFax");
- Search("SearchFax",#PurchaseQueryBill.ID_Supplier);
- UpdateForm(true, "cbFax");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="txtPostalcode" DataSource="PurchaseQueryBill.PostalCode_Supplier"/>
- <IKTextBox name="txtAddress" DataSource="PurchaseQueryBill.RegistedAddress_Supplier"/>
- <IKNumericTextBox name="txtMoneySum" DataSource="PurchaseQueryBill.GoodsAmount_PurchaseQueryBill"/>
- <IKNumericTextBox name="txtTaxSum" DataSource="PurchaseQueryBill.TaxAmount_PurchaseQueryBill"/>
- <IKNumericTextBox name="txtSum" DataSource="PurchaseQueryBill.Amount_PurchaseQueryBill"/>
- <IKDataGridEx name="dgProduct" DataSource="PurchaseQueryBillProduct" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="PurchaseQueryBillProduct.No_PurchaseQueryBillProduct"/>
- <DataColumn Index="1" DataSource="PurchaseQueryBillProduct.No_Product" >
- <IKDataGridTextButtonColumn>
- <Events>
- <Click>
- @SetFlag=1;
- ShowSearchBox("ProductSearch","INFOMATION",#PurchaseQueryBillProduct.No_Product);
- </Click>
- <SetFlagBeforeClick>
- @SetFlag=0;
- </SetFlagBeforeClick>
- </Events>
- </IKDataGridTextButtonColumn>
- </DataColumn>
- <DataColumn Index="2" DataSource="PurchaseQueryBillProduct.Name_Product" />
- <DataColumn Index="3" DataSource="PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct" />
- <DataColumn Index="4" DataSource="PurchaseQueryBillProduct.Unit_Product" />
- <DataColumn Index="5" DataSource="PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct" />
- <DataColumn Index="6" DataSource="PurchaseQueryBillProduct.Money" />
- <DataColumn Index="7" DataSource="PurchaseQueryBillProduct.Comment_PurchaseQueryBillProduct" />
- </IKDataGridEx>
- <IKDataGridEx name="dgRemark" DataSource="BillComment" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="BillComment.Comment_BillComment" />
- </IKDataGridEx>
- <IKDataGridEx name="dgReportComment" DataSource="ReportComment" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="ReportComment.Comment_ReportComment" />
- </IKDataGridEx>
-
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchPurchaseQueryBillFirst"))
- {
- ChangeMode("View");
- <Lable name="CountSum"/>
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchPurchaseQueryBillPrev", tbNo.CValue))
- {
- ChangeMode("View");
- <Lable name="CountSum"/>
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchPurchaseQueryBillNext",tbNo.CValue))
- {
- ChangeMode("View");
- <Lable name="CountSum"/>
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchPurchaseQueryBillLast"))
- {
- ChangeMode("View");
- <Lable name="CountSum"/>
- }
- </ClickLast>
- <ClickNew>
- <![CDATA[
- @NextNo = GetNextAutoNumber(true);
- if (!Equals(@NextNo, ""))
- {
- ChangeMode("New");
- #PurchaseQueryBill.No_PurchaseQueryBill= @NextNo;
- UpdateForm(true, "tbNo");
- }
- ]]>
- </ClickNew>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick" />
- if(@AuditMode)
- {
- <Lable name = "AuditLable"/>
- <Lable name="CountSum"/>
- }
- <Lable name="CountSum"/>
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- <Lable name="CountSum"/>
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- ShowPrintBox("BillSearch",#PurchaseQueryBill.No_PurchaseQueryBill,#PurchaseQueryBill.No_PurchaseQueryBill);
- </ClickPrint>
- <ClickAudit>
- if(@AuditMode)
- return;
- <Lable name = "AuditLable"/>
- <Lable name="CountSum"/>
- </ClickAudit>
- <ClickUnAudit>
- BeginUnAudit();
- #PurchaseQueryBill.ID_Assessor=DBNull();
- #PurchaseQueryBill.Assessor=DBNull();
- #PurchaseQueryBill.AssessDate_PurchaseQueryBill=DataTimeNow();
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- <Lable name="CountSum"/>
- </ClickUnAudit>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- ;
- </ClickExpand>
- <ClickImportItem>
- <![CDATA[
- if((@Status == 1 || @Status == 3) && toolBar.MenuItemText=="报价单")
- {
- ShowSearchBox("ImportPriceQueryBillControl","BILLCONVERT");
- }
- else if((@Status == 1 || @Status == 3) && toolBar.MenuItemText=="销货单")
- {
- ShowSearchBox("ImportSaleBillControl","BILLCONVERT");
- }
- tbNoSupplier.Focus();
- ]]>
- <!--使用前先访问ToolBar的MenuItemText属性以确定选中的是那一项-->
- </ClickImportItem>
- <ClickExportItem>
- if(toolBar.MenuItemText=="采购订单")
- {
- ExportBillProductStart("#PurchaseOrderBillProduct.Type_FromBill",43,"#PurchaseOrderBillProduct.Name_BillType","询价单","#PurchaseOrderBillProduct.No_FromBill",#PurchaseQueryBill.No_PurchaseQueryBill,"#PurchaseOrderBill.No_Supplier",#PurchaseQueryBill.No_Supplier,"#PurchaseOrderBill.TaxCurrency_PurchaseOrderBill",#PurchaseQueryBill.TaxCurrency_PurchaseQueryBill,"#PurchaseOrderBill.No_Principal",#PurchaseQueryBill.No_Principal,"#PurchaseOrderBill.Name_Principal",#PurchaseQueryBill.Name_Principal);
- ExportBillProduct("dgProduct","#PurchaseQueryBillProduct","#PurchaseOrderBillProduct.No_Product","#PurchaseQueryBillProduct.No_Product","#PurchaseOrderBillProduct.No_FromBillProduct","#PurchaseQueryBillProduct.No_PurchaseQueryBillProduct");
- }
- <!--初始化目标数据-->
- <!--使用前先访问ToolBar的MenuItemText属性以确定选中的是那一项-->
- </ClickExportItem>
- </Events>
- </IKFormToolBar>
- </Controls>
- <Tables>
- <Table name="PurchaseQueryBillProduct">
- <Events>
- <ColumnsChanged>
- <No_Product>
- if(@SetFlag==0)
- {
- return;
- }
- if(#PurchaseQueryBillProduct.No_Product==StringEmpty() || !Search("SearchProduct",#PurchaseQueryBillProduct.No_Product))
- {
- if(#PurchaseQueryBillProduct.No_Product!=StringEmpty())
- MessageBox("该产品不存在!",@Title);
- #PurchaseQueryBillProduct.ID_Product=GuidEmpty();
- #PurchaseQueryBillProduct.Name_Product="";
- #PurchaseQueryBillProduct.Unit_Product="";
- @temp = ShowSearchBox("InputSearchProduct","INFOMATION",#PurchaseQueryBillProduct.No_Product);
- if(@temp != "")
- {
- ResumeColumnEvent("#PurchaseQueryBillProduct.No_Product");
- #PurchaseQueryBillProduct.No_Product = @temp;
- ClearColumnEvent();
- }
- }
- else
- {
- if(!Equals(#Product.SuspendDate_Product,DBNull()))
- {
- MessageBox("该产品已停用!",@Title);
- }
- #PurchaseQueryBillProduct.ID_Product=#Product.ID_Product;
- #PurchaseQueryBillProduct.Name_Product=#Product.Name_Product;
- #PurchaseQueryBillProduct.Unit_Product=#Product.Unit_Product;
- }
- </No_Product>
- <Quantity_PurchaseQueryBillProduct>
- #PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct=FormatNumber(#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct,@QuantityDecimal);
- #PurchaseQueryBillProduct.Money=FormatNumber(FormatNumber(#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct,@QuantityDecimal)*FormatNumber(#PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct,@UnitPriceDecimal),@PriceDecimal);
- <Lable name="CountSum"/>
- </Quantity_PurchaseQueryBillProduct>
- <UnitPrice_PurchaseQueryBillProduct>
- #PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct=FormatNumber(#PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct,@UnitPriceDecimal);
- #PurchaseQueryBillProduct.Money=FormatNumber(FormatNumber(#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct,@QuantityDecimal)*FormatNumber(#PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct,@UnitPriceDecimal),@PriceDecimal);
- <Lable name="CountSum"/>
- </UnitPrice_PurchaseQueryBillProduct>
- </ColumnsChanged>
- <RowDeleted>
- <Lable name="CountSum"/>
- </RowDeleted>
- </Events>
- </Table>
- </Tables>
- <LockInfomation LockID="ID_PurchaseQueryBill" LockNO="No_PurchaseQueryBill" LockSearchFunction="SearchPurchaseQueryBillWithNo" LockAudit="ID_Assessor"/>
- <LogInfomation LogNO="#PurchaseQueryBill.No_PurchaseQueryBill" RecordFormField="" RecordDataGridField="#PurchaseQueryBillProduct.No_Product,#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct,#PurchaseQueryBillProduct.Money"/>
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="PurchaseQueryBill" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchPurchaseQueryBillWithNo">
- <DataColumn Index="0" MappingName="#PurchaseQueryBill.No_PurchaseQueryBill" HeaderText="采购询价单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#PurchaseQueryBill.Date_PurchaseQueryBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#PurchaseQueryBill.No_Supplier" HeaderText="供应商编号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#PurchaseQueryBill.ShortName_Supplier" HeaderText="供应商简称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#PurchaseQueryBill.Name_Principal" HeaderText="业务负责" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="5" MappingName="#PurchaseQueryBill.Name_Linkman" HeaderText="联系人" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="6" MappingName="#PurchaseQueryBill.Name_Telephone" HeaderText="电话" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="7" MappingName="#PurchaseQueryBill.Fax_Telephone" 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>
- <ChildForm name="ProductSearch" DataSource="Product" SearchFunction="SearchAllProduct" SearchFunctionByNo="" MappingName="产品" ReturnDataSource="PurchaseQueryBillProduct" ShowCheckBox="true">
- <DataColumn Index="0" MappingName="#Product.No_Product" HeaderText="产品编号" Width="120" ColumnType="IKDataGridTextBoxColumn" ReturnMappingName="#PurchaseQueryBillProduct.No_Product"/>
- <DataColumn Index="1" MappingName="#Product.Name_Product" HeaderText="产品简称" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="InputSearchProduct" DataSource="Product" SearchFunction="SearchAllProduct" SearchFunctionByNo="" MappingName="产品">
- <DataColumn Index="0" MappingName="#Product.No_Product" HeaderText="产品编号" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#Product.Name_Product" HeaderText="产品简称" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- <ChildForm name="ImportPriceQueryBillControl" >
- <DataGridIndex DataSource="PriceQueryBill" SearchFunction="SearchAllPriceQueryBill" SearchFunctionByNo="" MappingName="" ReturnDataSource="PurchaseQueryBillProduct">
- <DataColumn Index="0" MappingName="#PriceQueryBill.No_PriceQueryBill" HeaderText="单据编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="1" MappingName="#PriceQueryBill.Date_PriceQueryBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="2" MappingName="#PriceQueryBill.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="parent" ReturnMappingName="#PurchaseQueryBill.No_Supplier"/>
- <DataColumn Index="3" MappingName="#PriceQueryBill.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="4" MappingName="#PriceQueryBill.State_PriceQueryBill" HeaderText="单据状态" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="5" MappingName="#PriceQueryBill.TaxCurrency_PriceQueryBill" HeaderText="税别" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="parent" ReturnMappingName="#PurchaseQueryBill.TaxCurrency_PurchaseQueryBill" />
- </DataGridIndex>
- <DataGridIndex DataSource="PriceQueryBillProduct" SearchFunction="SearchAllPriceQueryBillProduct" SearchFunctionByNo="" MappingName="">
- <DataColumn Index="0" MappingName="#PriceQueryBillProduct.No_Product" HeaderText="产品编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" ReturnMappingName="#PurchaseQueryBillProduct.No_Product"/>
- <DataColumn Index="1" MappingName="#PriceQueryBillProduct.No_PriceQueryBillProduct" HeaderText="产品序号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="2" MappingName="#PriceQueryBillProduct.Name_Product" HeaderText="产品名称" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="3" MappingName="#PriceQueryBillProduct.Quantity_PriceQueryBillProduct" HeaderText="数量" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" Format="F2"/>
- <DataColumn Index="4" MappingName="#PriceQueryBillProduct.UnitPrice_PriceQueryBillProduct" HeaderText="单价" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" Format="F2"/>
- </DataGridIndex>
- </ChildForm>
- <ChildForm name="ImportSaleBillControl" >
- <DataGridIndex DataSource="SaleBill" SearchFunction="SearchAllSaleBill" SearchFunctionByNo="" MappingName="" ReturnDataSource="PurchaseQueryBillProduct">
- <DataColumn Index="0" MappingName="#SaleBill.No_SaleBill" HeaderText="单据编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="1" MappingName="#SaleBill.Date_SaleBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="2" MappingName="#SaleBill.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="parent" ReturnMappingName="#PurchaseQueryBill.No_Supplier"/>
- <DataColumn Index="3" MappingName="#SaleBill.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="4" MappingName="#SaleBill.State_SaleBill" HeaderText="单据状态" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="5" MappingName="#SaleBill.TaxCurrency_SaleBill" HeaderText="税别" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="parent" ReturnMappingName="#PurchaseQueryBill.TaxCurrency_PurchaseQueryBill" />
- </DataGridIndex>
- <DataGridIndex DataSource="SaleBillProduct" SearchFunction="SearchAllSaleBillProduct" SearchFunctionByNo="" MappingName="">
- <DataColumn Index="0" MappingName="#SaleBillProduct.No_Product" HeaderText="产品编号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" ReturnMappingName="#PurchaseQueryBillProduct.No_Product"/>
- <DataColumn Index="1" MappingName="#SaleBillProduct.No_SaleBillProduct" HeaderText="产品序号" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="2" MappingName="#SaleBillProduct.Name_Product" HeaderText="产品名称" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child"/>
- <DataColumn Index="3" MappingName="#SaleBillProduct.Quantity_SaleBillProduct" HeaderText="数量" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" Format="F2"/>
- <DataColumn Index="4" MappingName="#SaleBillProduct.UnitPrice_SaleBillProduct" HeaderText="单价" Width="90" ColumnType="IKDataGridTextBoxColumn" ReturnPath="child" Format="F2"/>
- </DataGridIndex>
- </ChildForm>
- </ChildForms>
- <ImportedInfo>
- @TaxCurrency=#PurchaseQueryBill.TaxCurrency_PurchaseQueryBill;
- UpdateForm(true, "tbNoSupplier");
- tbNoSupplier.Focus();
- ActiveControlEvent("tbNoSupplier", "Enter");
- #PurchaseQueryBill.TaxCurrency_PurchaseQueryBill=@TaxCurrency;
- UpdateForm(true, "cbTaxCurrency");
- </ImportedInfo>
- </Client>
- <Server>
- <Tables>
- <Table name="PurchaseQueryBill" Type="Parent">
- <GetSchema CmdType="Text" CmdText=" SELECT Top 0 PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END, ShortName_Supplier,RegistedAddress_Supplier,PostalCode_Supplier,
- EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman"/>
- <New CmdType="Text" CmdText="
- INSERT INTO PurchaseQueryBill(ID_PurchaseQueryBill,
- No_PurchaseQueryBill,
- Date_PurchaseQueryBill,
- ResponseDate_PurchaseQueryBill,
- ValidDate_PurchaseQueryBill,
- ID_Supplier,
- Name_Linkman,
- Name_Telephone,
- Fax_Telephone,
- ID_Principal,
- TaxCurrency_PurchaseQueryBill,
- Currency_PurchaseQueryBill,
- ID_Creator,
- ID_Assessor,
- AssessDate_PurchaseQueryBill,
- CreateDate_PurchaseQueryBill,
- LastModDate_PurchaseQueryBill,
- LastModUser_PurchaseQueryBill,
- GoodsAmount_PurchaseQueryBill,
- TaxAmount_PurchaseQueryBill,
- Amount_PurchaseQueryBill
- )
- Values(@ID_PurchaseQueryBill,
- @No_PurchaseQueryBill,
- @Date_PurchaseQueryBill,
- @ResponseDate_PurchaseQueryBill,
- @ValidDate_PurchaseQueryBill,
- @ID_Supplier,
- @Name_Linkman,
- @Name_Telephone,
- @Fax_Telephone,
- @ID_Principal,
- @TaxCurrency_PurchaseQueryBill,
- @Currency_PurchaseQueryBill,
- @ID_Creator,
- @ID_Assessor,
- @AssessDate_PurchaseQueryBill,
- @CreateDate_PurchaseQueryBill,
- @LastModDate_PurchaseQueryBill,
- @LastModUser_PurchaseQueryBill,
- @GoodsAmount_PurchaseQueryBill,
- @TaxAmount_PurchaseQueryBill,
- @Amount_PurchaseQueryBill
- )
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBill" type="PurchaseQueryBill.ID_PurchaseQueryBill" sourceColumn="ID_PurchaseQueryBill" />
- <Param name="@No_PurchaseQueryBill" type="PurchaseQueryBill.No_PurchaseQueryBill" sourceColumn="No_PurchaseQueryBill" />
- <Param name="@Date_PurchaseQueryBill" type="PurchaseQueryBill.Date_PurchaseQueryBill" sourceColumn="Date_PurchaseQueryBill" />
- <Param name="@ResponseDate_PurchaseQueryBill" type="PurchaseQueryBill.ResponseDate_PurchaseQueryBill" sourceColumn="ResponseDate_PurchaseQueryBill" />
- <Param name="@ValidDate_PurchaseQueryBill" type="PurchaseQueryBill.ValidDate_PurchaseQueryBill" sourceColumn="ValidDate_PurchaseQueryBill" />
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" sourceColumn="ID_Supplier" />
- <Param name="@Name_Linkman" type="PurchaseQueryBill.Name_Linkman" sourceColumn="Name_Linkman" />
- <Param name="@Name_Telephone" type="PurchaseQueryBill.Name_Telephone" sourceColumn="Name_Telephone" />
- <Param name="@Fax_Telephone" type="PurchaseQueryBill.Fax_Telephone" sourceColumn="Fax_Telephone" />
- <Param name="@ID_Principal" type="PurchaseQueryBill.ID_Principal" sourceColumn="ID_Principal" />
- <Param name="@TaxCurrency_PurchaseQueryBill" type="PurchaseQueryBill.TaxCurrency_PurchaseQueryBill" sourceColumn="TaxCurrency_PurchaseQueryBill" />
- <Param name="@Currency_PurchaseQueryBill" type="PurchaseQueryBill.Currency_PurchaseQueryBill" sourceColumn="Currency_PurchaseQueryBill" />
- <Param name="@ID_Creator" type="PurchaseQueryBill.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@ID_Assessor" type="PurchaseQueryBill.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_PurchaseQueryBill" type="PurchaseQueryBill.AssessDate_PurchaseQueryBill" sourceColumn="AssessDate_PurchaseQueryBill" />
- <Param name="@CreateDate_PurchaseQueryBill" type="PurchaseQueryBill.CreateDate_PurchaseQueryBill" sourceColumn="CreateDate_PurchaseQueryBill" />
- <Param name="@LastModDate_PurchaseQueryBill" type="PurchaseQueryBill.LastModDate_PurchaseQueryBill" sourceColumn="LastModDate_PurchaseQueryBill" />
- <Param name="@LastModUser_PurchaseQueryBill" type="PurchaseQueryBill.LastModUser_PurchaseQueryBill" sourceColumn="LastModUser_PurchaseQueryBill" />
- <Param name="@GoodsAmount_PurchaseQueryBill" type="PurchaseQueryBill.GoodsAmount_PurchaseQueryBill" sourceColumn="GoodsAmount_PurchaseQueryBill" />
- <Param name="@TaxAmount_PurchaseQueryBill" type="PurchaseQueryBill.TaxAmount_PurchaseQueryBill" sourceColumn="TaxAmount_PurchaseQueryBill" />
- <Param name="@Amount_PurchaseQueryBill" type="PurchaseQueryBill.Amount_PurchaseQueryBill" sourceColumn="Amount_PurchaseQueryBill" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="
- UPDATE PurchaseQueryBill
- SET No_PurchaseQueryBill=@No_PurchaseQueryBill,
- Date_PurchaseQueryBill=@Date_PurchaseQueryBill,
- ResponseDate_PurchaseQueryBill=@ResponseDate_PurchaseQueryBill,
- ValidDate_PurchaseQueryBill=@ValidDate_PurchaseQueryBill,
- ID_Supplier=@ID_Supplier,
- Name_Linkman=@Name_Linkman,
- Name_Telephone=@Name_Telephone,
- Fax_Telephone=@Fax_Telephone,
- ID_Principal=@ID_Principal,
- TaxCurrency_PurchaseQueryBill=@TaxCurrency_PurchaseQueryBill,
- Currency_PurchaseQueryBill=@Currency_PurchaseQueryBill,
- ID_Creator=@ID_Creator,
- ID_Assessor=@ID_Assessor,
- AssessDate_PurchaseQueryBill=@AssessDate_PurchaseQueryBill,
- CreateDate_PurchaseQueryBill=@CreateDate_PurchaseQueryBill,
- LastModDate_PurchaseQueryBill=@LastModDate_PurchaseQueryBill,
- LastModUser_PurchaseQueryBill=@LastModUser_PurchaseQueryBill,
- GoodsAmount_PurchaseQueryBill=@GoodsAmount_PurchaseQueryBill,
- TaxAmount_PurchaseQueryBill=@TaxAmount_PurchaseQueryBill,
- Amount_PurchaseQueryBill=@Amount_PurchaseQueryBill
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBill" type="PurchaseQueryBill.ID_PurchaseQueryBill" sourceColumn="ID_PurchaseQueryBill" />
- <Param name="@No_PurchaseQueryBill" type="PurchaseQueryBill.No_PurchaseQueryBill" sourceColumn="No_PurchaseQueryBill" />
- <Param name="@Date_PurchaseQueryBill" type="PurchaseQueryBill.Date_PurchaseQueryBill" sourceColumn="Date_PurchaseQueryBill" />
- <Param name="@ResponseDate_PurchaseQueryBill" type="PurchaseQueryBill.ResponseDate_PurchaseQueryBill" sourceColumn="ResponseDate_PurchaseQueryBill" />
- <Param name="@ValidDate_PurchaseQueryBill" type="PurchaseQueryBill.ValidDate_PurchaseQueryBill" sourceColumn="ValidDate_PurchaseQueryBill" />
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" sourceColumn="ID_Supplier" />
- <Param name="@Name_Linkman" type="PurchaseQueryBill.Name_Linkman" sourceColumn="Name_Linkman" />
- <Param name="@Name_Telephone" type="PurchaseQueryBill.Name_Telephone" sourceColumn="Name_Telephone" />
- <Param name="@Fax_Telephone" type="PurchaseQueryBill.Fax_Telephone" sourceColumn="Fax_Telephone" />
- <Param name="@ID_Principal" type="PurchaseQueryBill.ID_Principal" sourceColumn="ID_Principal" />
- <Param name="@TaxCurrency_PurchaseQueryBill" type="PurchaseQueryBill.TaxCurrency_PurchaseQueryBill" sourceColumn="TaxCurrency_PurchaseQueryBill" />
- <Param name="@Currency_PurchaseQueryBill" type="PurchaseQueryBill.Currency_PurchaseQueryBill" sourceColumn="Currency_PurchaseQueryBill" />
- <Param name="@ID_Creator" type="PurchaseQueryBill.ID_Creator" sourceColumn="ID_Creator" />
- <Param name="@ID_Assessor" type="PurchaseQueryBill.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_PurchaseQueryBill" type="PurchaseQueryBill.AssessDate_PurchaseQueryBill" sourceColumn="AssessDate_PurchaseQueryBill" />
- <Param name="@CreateDate_PurchaseQueryBill" type="PurchaseQueryBill.CreateDate_PurchaseQueryBill" sourceColumn="CreateDate_PurchaseQueryBill" />
- <Param name="@LastModDate_PurchaseQueryBill" type="PurchaseQueryBill.LastModDate_PurchaseQueryBill" sourceColumn="LastModDate_PurchaseQueryBill" />
- <Param name="@LastModUser_PurchaseQueryBill" type="PurchaseQueryBill.LastModUser_PurchaseQueryBill" sourceColumn="LastModUser_PurchaseQueryBill" />
- <Param name="@GoodsAmount_PurchaseQueryBill" type="PurchaseQueryBill.GoodsAmount_PurchaseQueryBill" sourceColumn="GoodsAmount_PurchaseQueryBill" />
- <Param name="@TaxAmount_PurchaseQueryBill" type="PurchaseQueryBill.TaxAmount_PurchaseQueryBill" sourceColumn="TaxAmount_PurchaseQueryBill" />
- <Param name="@Amount_PurchaseQueryBill" type="PurchaseQueryBill.Amount_PurchaseQueryBill" sourceColumn="Amount_PurchaseQueryBill" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="
-
- DELETE FROM PurchaseQueryBillProduct WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- DELETE FROM BillComment WHERE ID_Bill = @ID_PurchaseQueryBill
- DELETE FROM ReportComment WHERE ID_Bill=@ID_PurchaseQueryBill
- DELETE FROM PurchaseQueryBill WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBill" type="PurchaseQueryBill.ID_PurchaseQueryBill" sourceColumn="ID_PurchaseQueryBill" />
- </Params>
- </Delete>
- <Audit CmdType="Text" CmdText="
-
- UPDATE PurchaseQueryBill SET ID_Assessor=@ID_Assessor,AssessDate_PurchaseQueryBill=@AssessDate_PurchaseQueryBill WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBill" type="PurchaseQueryBill.ID_PurchaseQueryBill" sourceColumn="ID_PurchaseQueryBill"/>
- <Param name="@ID_Assessor" type="PurchaseQueryBill.ID_Assessor" sourceColumn="ID_Assessor"/>
- <Param name="@AssessDate_PurchaseQueryBill" type="PurchaseQueryBill.AssessDate_PurchaseQueryBill" sourceColumn="AssessDate_PurchaseQueryBill"/>
-
- </Params>
- </Audit>
- <FKErrorReport ErrorMessage="该单据已被其他单据引用,删除失败!"/>
- <UNIQUEErrorReport ErrorMessage="采购询价单号已存在,提交失败!"/>
- </Table>
- <Table name="PurchaseQueryBillProduct" Type="Child">
- <GetSchema CmdType="Text" CmdText="
- SELECT Top 0 PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money,convert(nvarchar(64), '') as No_PurchaseQueryBill
- FROM PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- "/>
- <New CmdType="Text" CmdText="
- INSERT INTO PurchaseQueryBillProduct(ID_PurchaseQueryBillProduct,
- No_PurchaseQueryBillProduct,
- ID_PurchaseQueryBill,
- ID_Product,
- Quantity_PurchaseQueryBillProduct,
- UnitPrice_PurchaseQueryBillProduct,
- Comment_PurchaseQueryBillProduct)
- Values(@ID_PurchaseQueryBillProduct,
- @No_PurchaseQueryBillProduct,
- @ID_PurchaseQueryBill,
- @ID_Product,
- @Quantity_PurchaseQueryBillProduct,
- @UnitPrice_PurchaseQueryBillProduct,
- @Comment_PurchaseQueryBillProduct)
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.ID_PurchaseQueryBillProduct" sourceColumn="ID_PurchaseQueryBillProduct" />
- <Param name="@No_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.No_PurchaseQueryBillProduct" sourceColumn="No_PurchaseQueryBillProduct" />
- <Param name="@ID_PurchaseQueryBill" type="PurchaseQueryBillProduct.ID_PurchaseQueryBill" sourceColumn="ID_PurchaseQueryBill" />
- <Param name="@ID_Product" type="PurchaseQueryBillProduct.ID_Product" sourceColumn="ID_Product" />
- <Param name="@Quantity_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct" sourceColumn="Quantity_PurchaseQueryBillProduct" />
- <Param name="@UnitPrice_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct" sourceColumn="UnitPrice_PurchaseQueryBillProduct" />
- <Param name="@Comment_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.Comment_PurchaseQueryBillProduct" sourceColumn="Comment_PurchaseQueryBillProduct" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="
-
- UPDATE PurchaseQueryBillProduct
- SET No_PurchaseQueryBillProduct=@No_PurchaseQueryBillProduct,
- ID_Product=@ID_Product,
- Quantity_PurchaseQueryBillProduct=@Quantity_PurchaseQueryBillProduct,
- UnitPrice_PurchaseQueryBillProduct=@UnitPrice_PurchaseQueryBillProduct,
- Comment_PurchaseQueryBillProduct=@Comment_PurchaseQueryBillProduct
- WHERE ID_PurchaseQueryBillProduct=@ID_PurchaseQueryBillProduct
-
- ">
- <Params>
- <Param name="@ID_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.ID_PurchaseQueryBillProduct" sourceColumn="ID_PurchaseQueryBillProduct" />
- <Param name="@No_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.No_PurchaseQueryBillProduct" sourceColumn="No_PurchaseQueryBillProduct" />
- <Param name="@ID_Product" type="PurchaseQueryBillProduct.ID_Product" sourceColumn="ID_Product" />
- <Param name="@Quantity_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct" sourceColumn="Quantity_PurchaseQueryBillProduct" />
- <Param name="@UnitPrice_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct" sourceColumn="UnitPrice_PurchaseQueryBillProduct" />
- <Param name="@Comment_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.Comment_PurchaseQueryBillProduct" sourceColumn="Comment_PurchaseQueryBillProduct" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE FROM PurchaseQueryBillProduct WHERE ID_PurchaseQueryBillProduct=@ID_PurchaseQueryBillProduct">
- <Params>
- <Param name="@ID_PurchaseQueryBillProduct" type="PurchaseQueryBillProduct.ID_PurchaseQueryBillProduct" sourceColumn="ID_PurchaseQueryBillProduct"/>
- </Params>
- </Delete>
- </Table>
- <Table name="BillComment" Type="Child">
- <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 BillComment.* FROM BillComment"/>
- <New CmdType="Text" CmdText=" INSERT INTO BillComment (ID_BillComment, ID_Bill, Comment_BillComment)
- VALUES (@ID_BillComment, @ID_Bill, @Comment_BillComment)">
- <Params>
- <Param name="@ID_BillComment" type="BillComment.ID_BillComment" sourceColumn="ID_BillComment" />
- <Param name="@ID_Bill" type="BillComment.ID_Bill" sourceColumn="ID_Bill" />
- <Param name="@Comment_BillComment" type="BillComment.Comment_BillComment" sourceColumn="Comment_BillComment" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText=" UPDATE BillComment SET ID_Bill = @ID_Bill, Comment_BillComment = @Comment_BillComment
- WHERE ID_BillComment = @ID_BillComment">
- <Params>
- <Param name="@ID_BillComment" type="BillComment.ID_BillComment" sourceColumn="ID_BillComment" />
- <Param name="@ID_Bill" type="BillComment.ID_Bill" sourceColumn="ID_Bill" />
- <Param name="@Comment_BillComment" type="BillComment.Comment_BillComment" sourceColumn="Comment_BillComment" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText=" DELETE BillComment WHERE ID_BillComment = @ID_BillComment">
- <Params>
- <Param name="@ID_BillComment" type="BillComment.ID_BillComment" sourceColumn="ID_BillComment" />
- </Params>
- </Delete>
- </Table>
- <Table name="ReportComment" Type="Child">
- <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 ReportComment.*,convert(nvarchar(64), '') as No_PurchaseQueryBill FROM ReportComment"/>
- <New CmdType="Text" CmdText=" INSERT INTO ReportComment (ID_ReportComment, ID_Bill, Comment_ReportComment)
- VALUES (@ID_ReportComment, @ID_Bill, @Comment_ReportComment)">
- <Params>
- <Param name="@ID_ReportComment" type="ReportComment.ID_BillComment" sourceColumn="ID_ReportComment" />
- <Param name="@ID_Bill" type="ReportComment.ID_Bill" sourceColumn="ID_Bill" />
- <Param name="@Comment_ReportComment" type="ReportComment.Comment_ReportComment" sourceColumn="Comment_ReportComment" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText=" UPDATE ReportComment SET ID_Bill = @ID_Bill, Comment_ReportComment = @Comment_ReportComment
- WHERE ID_ReportComment = @ID_ReportComment">
- <Params>
- <Param name="@ID_ReportComment" type="ReportComment.ID_BillComment" sourceColumn="ID_ReportComment" />
- <Param name="@ID_Bill" type="ReportComment.ID_Bill" sourceColumn="ID_Bill" />
- <Param name="@Comment_ReportComment" type="ReportComment.Comment_ReportComment" sourceColumn="Comment_ReportComment" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText=" DELETE ReportComment WHERE ID_ReportComment = @ID_ReportComment">
- <Params>
- <Param name="@ID_ReportComment" type="ReportComment.ID_ReportComment" sourceColumn="ID_ReportComment" />
- </Params>
- </Delete>
- </Table>
- </Tables>
- <Search>
- <SearchAllBill CmdType="Text" CmdText=" SELECT PurchaseQueryBill.*,Supplier.No_Supplier,Supplier.ShortName_Supplier,Name_Employee As Name_Principal
- FROM PurchaseQueryBill
- JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- Join Employee On Employee.ID_Employee=PurchaseQueryBill.ID_Principal
- ">
- <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>
- <SearchAllProduct CmdType="Text" CmdText="SELECT Product.No_Product,Product.Name_Product FROM Product ">
- <Tables>
- <Table name="AllProduct" />
- </Tables>
- </SearchAllProduct>
- <SearchAllPriceQueryBill CmdType="Text" CmdText="Select PriceQueryBill.TaxCurrency_PriceQueryBill,PriceQueryBill.ID_PriceQueryBill,PriceQueryBill.No_PriceQueryBill,PriceQueryBill.Date_PriceQueryBill,Customer.No_Customer,Customer.ShortName_Customer,Case When PriceQueryBill.ID_Assessor is null Then '未审核' Else '已审核' End As State_PriceQueryBill From PriceQueryBill
- Inner Join Customer On PriceQueryBill.ID_Customer = Customer.ID_Customer" >
- <Tables>
- <Table name="AllPriceQueryBill" />
- </Tables>
- </SearchAllPriceQueryBill>
- <SearchAllSaleBill CmdType="Text" CmdText="Select SaleBill.TaxCurrency_SaleBill,SaleBill.ID_SaleBill,SaleBill.No_SaleBill,SaleBill.Date_SaleBill,Customer.No_Customer,Customer.ShortName_Customer,Case When SaleBill.ID_Assessor is null Then '未审核' Else '已审核' End As State_SaleBill From SaleBill
- Inner Join Customer On SaleBill.ID_Customer = Customer.ID_Customer" >
- <Tables>
- <Table name="AllSaleBill" />
- </Tables>
- </SearchAllSaleBill>
- <SearchAllPriceQueryBillProduct CmdType="Text" CmdText="Select PriceQueryBillProduct.UnitPrice_PriceQueryBillProduct,Product.No_Product,PriceQueryBillProduct.No_PriceQueryBillProduct,Product.Name_Product,PriceQueryBillProduct.Quantity_PriceQueryBillProduct,PriceQueryBillProduct.UnitPrice_PriceQueryBillProduct From PriceQueryBillProduct
- Inner Join Product On Product.ID_Product = PriceQueryBillProduct.ID_Product
- Inner Join PriceQueryBill On PriceQueryBill.ID_PriceQueryBill = PriceQueryBillProduct.ID_PriceQueryBill" >
- <Tables>
- <Table name="AllPriceQueryBillProduct" />
- </Tables>
- </SearchAllPriceQueryBillProduct>
- <SearchAllSaleBillProduct CmdType="Text" CmdText="Select Product.No_Product,SaleBillProduct.No_SaleBillProduct,Product.Name_Product,SaleBillProduct.Quantity_SaleBillProduct,SaleBillProduct.UnitPrice_SaleBillProduct From SaleBillProduct
- Inner Join Product On Product.ID_Product = SaleBillProduct.ID_Product
- Inner Join SaleBill On SaleBill.ID_SaleBill =SaleBillProduct.ID_SaleBill" >
- <Tables>
- <Table name="AllSaleBillProduct" />
- </Tables>
- </SearchAllSaleBillProduct>
- <SearchPurchaseQueryBillWithNo CmdType="Text" CmdText="
- SELECT PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,ShortName_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END,RegistedAddress_Supplier,PostalCode_Supplier,EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman
- WHERE No_PurchaseQueryBill=@No_PurchaseQueryBill
-
- SELECT PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money, @No_PurchaseQueryBill as No_PurchaseQueryBill
- From PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- LEFT JOIN PurchaseQueryBill ON PurchaseQueryBillProduct.ID_PurchaseQueryBill=PurchaseQueryBill.ID_PurchaseQueryBill
- WHERE No_PurchaseQueryBill=@No_PurchaseQueryBill
- Order By CAST(PurchaseQueryBillProduct.No_PurchaseQueryBillProduct AS INT)
-
- SELECT BillComment.*
- FROM BillComment
- LEFT JOIN PurchaseQueryBill ON PurchaseQueryBill.ID_PurchaseQueryBill=BillComment.ID_Bill
- WHERE No_PurchaseQueryBill=@No_PurchaseQueryBill
- ORDER BY BillComment.No_BillComment
-
- SELECT ReportComment.*,@No_PurchaseQueryBill as No_PurchaseQueryBill
- FROM ReportComment
- LEFT JOIN PurchaseQueryBill ON PurchaseQueryBill.ID_PurchaseQueryBill=ReportComment.ID_Bill
- WHERE No_PurchaseQueryBill=@No_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- ">
- <Params>
- <Param name="@No_PurchaseQueryBill" type="PurchaseQueryBill.No_PurchaseQueryBill" Index="0"/>
- </Params>
- <Tables>
- <Table name="PurchaseQueryBill"/>
- <Table name="PurchaseQueryBillProduct"/>
- <Table name="BillComment"/>
- <Table name="ReportComment"/>
- </Tables>
- </SearchPurchaseQueryBillWithNo>
-
- <SearchSupplier CmdType="Text" CmdText="
- declare @LastTax_Supplier1 nvarchar(64)
- declare @LastTax_Supplier2 nvarchar(64)
- declare @LastTax_Supplier3 nvarchar(64)
- declare @PurTaxDefault1_FunctionSetting int
- declare @PurTaxDefault2_FunctionSetting int
- declare @PurTaxDefault3_FunctionSetting int
-
- select @PurTaxDefault1_FunctionSetting = PurTaxDefault1_FunctionSetting,
- @PurTaxDefault2_FunctionSetting = PurTaxDefault2_FunctionSetting, @PurTaxDefault3_FunctionSetting = PurTaxDefault3_FunctionSetting
- from FunctionSetting
- if @PurTaxDefault1_FunctionSetting=0
- begin
- select top 1 @LastTax_Supplier1 = PurchaseQueryBill.TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- Left join Supplier
- on Supplier.ID_Supplier = PurchaseQueryBill.ID_Supplier
- where Supplier.No_Supplier = @No_Supplier
- order by Date_PurchaseQueryBill desc
- end
- else if @PurTaxDefault1_FunctionSetting = 1
- begin
- select top 1 @LastTax_Supplier1 = TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- order by Date_PurchaseQueryBill desc
- end
- else
- begin
- set @LastTax_Supplier1 = '外加'
- end
- if @PurTaxDefault2_FunctionSetting=0
- begin
- select top 1 @LastTax_Supplier2 = PurchaseQueryBill.TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- Left join Supplier
- on Supplier.ID_Supplier = PurchaseQueryBill.ID_Supplier
- where Supplier.No_Supplier = @No_Supplier
- order by Date_PurchaseQueryBill desc
- end
- else if @PurTaxDefault2_FunctionSetting = 1
- begin
- select top 1 @LastTax_Supplier2 = TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- order by Date_PurchaseQueryBill desc
-
- end
- else
- begin
- set @LastTax_Supplier2 = '外加'
- end
- if @PurTaxDefault3_FunctionSetting=0
- begin
- select top 1 @LastTax_Supplier3 = PurchaseQueryBill.TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- Left join Supplier
- on Supplier.ID_Supplier = PurchaseQueryBill.ID_Supplier
- where Supplier.No_Supplier = @No_Supplier
- order by Date_PurchaseQueryBill desc
- end
- else if @PurTaxDefault3_FunctionSetting = 1
- begin
- select top 1 @LastTax_Supplier3 = TaxCurrency_PurchaseQueryBill
- from PurchaseQueryBill
- order by Date_PurchaseQueryBill desc
-
- end
- else
- begin
- set @LastTax_Supplier3 = '外加'
- end
- if @LastTax_Supplier1 is null
- set @LastTax_Supplier1 = isnull(@LastTax_Supplier2, @LastTax_Supplier3)
- SELECT *, ISNULL(@LastTax_Supplier1, '外加') AS LastTax_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>
- <SearchEmployee CmdType="Text" CmdText="
- SELECT No_Employee,Name_Employee
- FROM Employee
- ORDER BY No_Employee
- ">
- <Tables>
- <Table name="Employee"/>
- </Tables>
- </SearchEmployee>
- <SearchPrincipal CmdType="Text" CmdText="SELECT Employee.ID_Employee,Employee.No_Employee AS No_Principal, Employee.Name_Employee AS Name_Principal
- FROM Employee
- ORDER BY No_Employee
- ">
- <Tables>
- <Table name="Principal" />
- </Tables>
- </SearchPrincipal>
-
- <SearchLinkman CmdType="Text" CmdText="
- SELECT Name_Linkman,No_Employee
- FROM Linkman
- LEFT JOIN Employee ON Linkman.Name_Linkman=Employee.Name_Employee
- WHERE ID_Person=@ID_Supplier
- Order By No_Employee
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="Linkman"/>
- </Tables>
- </SearchLinkman>
- <SearchTelephone CmdType="Text" CmdText="
- SELECT No_Telephone
- FROM Telephone
- WHERE ID_Person=@ID_Supplier
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="Telephone"/>
- </Tables>
- </SearchTelephone>
- <SearchFocusTelephone CmdType="Text" CmdText="
- SELECT No_Telephone
- FROM Telephone
- WHERE ID_Person=@ID_Supplier AND Focus_Telephone=1
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="FocusTelephone"/>
- </Tables>
- </SearchFocusTelephone>
- <SearchFax CmdType="Text" CmdText="
- SELECT No_Fax
- FROM Fax
- WHERE ID_Person=@ID_Supplier
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="Fax"/>
- </Tables>
- </SearchFax>
- <SearchFocusFax CmdType="Text" CmdText="
- SELECT No_Fax
- FROM Fax
- WHERE ID_Person=@ID_Supplier AND Focus_Fax=1
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="FocusFax"/>
- </Tables>
- </SearchFocusFax>
-
- <SearchFocusLinkman CmdType="Text" CmdText="
- SELECT Linkman.Name_Linkman FROM Linkman WHERE Linkman.ID_Person = @ID_Supplier
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0"/>
- </Params>
- <Tables>
- <Table name="Linkman"/>
- </Tables>
- </SearchFocusLinkman>
-
- <SearchProduct CmdType="Text" CmdText="
- SELECT ID_Product, Name_Product,Unit_Product,Price_Product,SuspendDate_Product
- FROM Product
- WHERE No_Product=@No_Product
- ">
- <Params>
- <Param name="@No_Product" type="Product.No_Product" Index="0"/>
- </Params>
- <Tables>
- <Table name="Product"/>
- </Tables>
- </SearchProduct>
-
- <SearchCessIn CmdType="Text" CmdText="
- SELECT CessIn_SystemSetting ,SysCurrency_SystemSetting,QAudit_FunctionSetting FROM SystemSetting,FunctionSetting">
- <Tables>
- <Table name="SystemSetting"/>
- </Tables>
- </SearchCessIn>
-
- <SearchFormat CmdType="Text" CmdText="
- Select * from SystemSetting">
- <Tables>
- <Table name="SystemSettingFormat"/>
- </Tables>
- </SearchFormat>
- <SearchPurchaseQueryBillFirst CmdType="Text" CmdText="
- DECLARE @No_PurchaseQueryBill nvarchar(64)
- DECLARE @ID_PurchaseQueryBill uniqueidentifier
- SELECT Top 1 @ID_PurchaseQueryBill=ID_PurchaseQueryBill, @No_PurchaseQueryBill = No_PurchaseQueryBill
- FROM PurchaseQueryBill
- Order By No_PurchaseQueryBill
-
- SELECT PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,ShortName_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END,RegistedAddress_Supplier,PostalCode_Supplier,EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
-
- SELECT PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money,@No_PurchaseQueryBill as No_PurchaseQueryBill
- FROM PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- WHERE PurchaseQueryBillProduct.ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- Order By CAST(PurchaseQueryBillProduct.No_PurchaseQueryBillProduct AS INT)
-
- SELECT BillComment.*
- FROM BillComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY BillComment.No_BillComment
-
- SELECT ReportComment.*,@No_PurchaseQueryBill as No_PurchaseQueryBill
- FROM ReportComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- ">
- <Tables>
- <Table name="PurchaseQueryBill"/>
- <Table name="PurchaseQueryBillProduct"/>
- <Table name="BillComment"/>
- <Table name="ReportComment"/>
- </Tables>
-
- </SearchPurchaseQueryBillFirst>
- <SearchPurchaseQueryBillPrev CmdType="Text" CmdText=" DECLARE @NoNext nvarchar(64)
- DECLARE @ID_PurchaseQueryBill uniqueidentifier
- SELECT Top 1 @ID_PurchaseQueryBill=ID_PurchaseQueryBill, @NoNext = No_PurchaseQueryBill
- FROM PurchaseQueryBill
- WHERE No_PurchaseQueryBill < @No_PurchaseQueryBill
- ORDER By No_PurchaseQueryBill Desc
-
- SELECT PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,ShortName_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END,RegistedAddress_Supplier,PostalCode_Supplier,EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
-
- SELECT PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money, @NoNext as No_PurchaseQueryBill
- FROM PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- LEFT JOIN PurchaseQueryBill ON PurchaseQueryBill.ID_PurchaseQueryBill = PurchaseQueryBillProduct.ID_PurchaseQueryBill
- WHERE PurchaseQueryBillProduct.ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- Order By CAST(No_PurchaseQueryBillProduct AS INT)
-
- SELECT BillComment.*
- FROM BillComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY BillComment.No_BillComment
-
- SELECT ReportComment.*,@NoNext as No_PurchaseQueryBill
- FROM ReportComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- ">
- <Params>
- <Param name="@No_PurchaseQueryBill" type="PurchaseQueryBill.No_PurchaseQueryBill" Index="0"/>
- </Params>
- <Tables>
- <Table name="PurchaseQueryBill"/>
- <Table name="PurchaseQueryBillProduct"/>
- <Table name="BillComment"/>
- <Table name="ReportComment"/>
- </Tables>
- </SearchPurchaseQueryBillPrev>
- <SearchPurchaseQueryBillNext CmdType="Text" CmdText=" DECLARE @NoNext nvarchar(64)
- DECLARE @ID_PurchaseQueryBill uniqueidentifier
- SELECT Top 1 @ID_PurchaseQueryBill=ID_PurchaseQueryBill,@NoNext = No_PurchaseQueryBill
- FROM PurchaseQueryBill
- WHERE No_PurchaseQueryBill > @No_PurchaseQueryBill
- ORDER By No_PurchaseQueryBill
-
- SELECT PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,ShortName_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END,RegistedAddress_Supplier,PostalCode_Supplier,EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
-
- SELECT PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money, @NoNext as No_PurchaseQueryBill
- FROM PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- Order By CAST(No_PurchaseQueryBillProduct AS INT)
-
- SELECT BillComment.*
- FROM BillComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY BillComment.No_BillComment
-
- SELECT ReportComment.*,@NoNext as No_PurchaseQueryBill
- FROM ReportComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- ">
- <Params>
- <Param name="@No_PurchaseQueryBill" type="PurchaseQueryBill.No_PurchaseQueryBill" Index="0"/>
- </Params>
- <Tables>
- <Table name="PurchaseQueryBill"/>
- <Table name="PurchaseQueryBillProduct"/>
- <Table name="BillComment"/>
- <Table name="ReportComment"/>
- </Tables>
- </SearchPurchaseQueryBillNext>
- <SearchPurchaseQueryBillLast CmdType="Text" CmdText="DECLARE @NoNext nvarchar(64)
- DECLARE @ID_PurchaseQueryBill uniqueidentifier
- SELECT Top 1 @ID_PurchaseQueryBill=ID_PurchaseQueryBill,@NoNext = No_PurchaseQueryBill
- FROM PurchaseQueryBill
- Order By No_PurchaseQueryBill Desc
-
- SELECT PurchaseQueryBill.*,a.Name_User As Creator,b.Name_User As Assessor,c.Name_User As LastModUser,No_Supplier,ShortName_Supplier,Name_Supplier=CASE ISNULL(Supplier.SuspendDate_Supplier,0) WHEN 0 THEN Name_Supplier ELSE Name_Supplier+'(已暂停!)'END,RegistedAddress_Supplier,PostalCode_Supplier,EmpA.Name_Employee As Name_Principal,EmpA.No_Employee As No_Principal,EmpB.No_Employee As No_Linkman
- FROM PurchaseQueryBill
- LEFT JOIN AppUser a ON a.ID_User=PurchaseQueryBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User=PurchaseQueryBill.ID_Assessor
- LEFT JOIN AppUser c ON c.ID_User=PurchaseQueryBill.LastModUser_PurchaseQueryBill
- LEFT JOIN Supplier ON Supplier.ID_Supplier=PurchaseQueryBill.ID_Supplier
- LEFT JOIN Employee EmpA ON EmpA.ID_Employee=PurchaseQueryBill.ID_Principal
- LEFT JOIN Employee EmpB ON EmpB.Name_Employee=PurchaseQueryBill.Name_Linkman
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
-
- SELECT PurchaseQueryBillProduct.*,Product.No_Product,Name_Product,Product.Unit_Product,PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct*PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct As Money, @NoNext as No_PurchaseQueryBill
- FROM PurchaseQueryBillProduct
- LEFT JOIN Product ON PurchaseQueryBillProduct.ID_Product=Product.ID_Product
- WHERE ID_PurchaseQueryBill=@ID_PurchaseQueryBill
- Order By CAST(No_PurchaseQueryBillProduct AS INT)
-
- SELECT BillComment.*
- FROM BillComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY BillComment.No_BillComment
-
- SELECT ReportComment.*,@NoNext as No_PurchaseQueryBill
- FROM ReportComment
- WHERE ID_Bill=@ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- ">
- <Tables>
- <Table name="PurchaseQueryBill"/>
- <Table name="PurchaseQueryBillProduct"/>
- <Table name="BillComment"/>
- <Table name="ReportComment"/>
- </Tables>
-
- </SearchPurchaseQueryBillLast>
- <SearchTypeComment CmdType="Text" CmdText="
- declare @QRemark1_FunctionSetting int
- declare @QRemark2_FunctionSetting int
- Select @QRemark1_FunctionSetting = QRemark1_FunctionSetting, @QRemark2_FunctionSetting = QRemark2_FunctionSetting
- from FunctionSetting
- declare @ID_PurchaseQueryBill uniqueidentifier
- declare @flag int
- set @flag = 0
-
- if @QRemark1_FunctionSetting = 0
- begin
- select top 1 @ID_PurchaseQueryBill = PurchaseQueryBill.ID_PurchaseQueryBill
- from PurchaseQueryBill
- where ID_Supplier = @ID_Supplier
- order by PurchaseQueryBill.Date_PurchaseQueryBill desc
- if exists( select ReportComment.* from ReportComment where ReportComment.ID_Bill = @ID_PurchaseQueryBill)
- begin
- select ReportComment.Comment_ReportComment from ReportComment where ReportComment.ID_Bill = @ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- set @flag = 1
- end
- end
- else
- begin
- if exists(SELECT Name_TypeDef FROM TypeDef WHERE Type_TypeDef=26 )
- begin
- SELECT Name_TypeDef as Comment_BillComment FROM TypeDef WHERE Type_TypeDef=26
- set @flag = 1
- end
- end
- if @flag = 0
- begin
- if @QRemark2_FunctionSetting = 0
- begin
- select top 1 @ID_PurchaseQueryBill = PurchaseQueryBill.ID_PurchaseQueryBill
- from PurchaseQueryBill
- where ID_Supplier = @ID_Supplier
- order by PurchaseQueryBill.Date_PurchaseQueryBill desc
- select ReportComment.Comment_ReportComment from ReportComment where ReportComment.ID_Bill = @ID_PurchaseQueryBill
- ORDER BY ReportComment.No_ReportComment
- end
- else
- begin
- SELECT Name_TypeDef as Comment_ReportComment FROM TypeDef WHERE Type_TypeDef=26
- end
- end
- ">
- <Params>
- <Param name="@ID_Supplier" type="PurchaseQueryBill.ID_Supplier" Index="0" />
- </Params>
- <Tables>
- <Table name="TypeComment" />
- </Tables>
- </SearchTypeComment>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- tbNo.ReadOnly=false;
- timeMake.Enabled=false;
- dtpRespondDate.Enabled=false;
- dtpValidityDate.Enabled=false;
- tbNoSupplier.ReadOnly=true;
- cbTaxCurrency.Enabled=false;
- cbCurrency.Enabled=false;
- cbPrincipal.Enabled=false;
- cbLinkman.Enabled=false;
- cbTelephone.Enabled=false;
- cbFax.Enabled=false;
- dgProduct.ReadOnly=true;
- dgRemark.ReadOnly=true;
- dgReportComment.ReadOnly=true;
- txtNumSum.CValue=0.00;
- txtMoneySum.CValue=0.00;
- txtTaxSum.CValue=0.00;
- txtSum.CValue=0.00;
- cbTaxCurrency.Text="";
- #PurchaseQueryBill.Creator=DBNull();
- #PurchaseQueryBill.ID_Creator=DBNull();
- #PurchaseQueryBill.Assessor=DBNull();
- #PurchaseQueryBill.ID_Assessor=DBNull();
- #PurchaseQueryBill.AssessDate_PurchaseQueryBill=DBNull();
- #PurchaseQueryBill.LastModUser_PurchaseQueryBill=DBNull();
- #PurchaseQueryBill.LastModUser=DBNull();
- #PurchaseQueryBill.LastModDate_PurchaseQueryBill=DBNull();
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnablePrint=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- toolBar.EnableExport = false;
- toolBar.EnableImport = false;
- UpdateForm(true,"");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- Empty();
- NewInstance();
- tbNo.ReadOnly=true;
- timeMake.Enabled=true;
- dtpRespondDate.Enabled=true;
- dtpValidityDate.Enabled=true;
- tbNoSupplier.ReadOnly=false;
- cbTaxCurrency.Enabled=true;
- cbCurrency.Enabled=false;
- cbPrincipal.Enabled=true;
- cbLinkman.Enabled=true;
- cbTelephone.Enabled=true;
- cbFax.Enabled=true;
- dgProduct.ReadOnly=false;
- dgRemark.ReadOnly=false;
- dgReportComment.ReadOnly=false;
- txtNumSum.CValue=0.00;
- txtMoneySum.CValue=0.00;
- txtTaxSum.CValue=0.00;
- txtSum.CValue=0.00;
- timeMake.Focus();
- #PurchaseQueryBill.TaxCurrency_PurchaseQueryBill= "外加";
- #PurchaseQueryBill.Currency_PurchaseQueryBill= @SysCurrency;
- #PurchaseQueryBill.ID_PurchaseQueryBill=NewGuid();
- #PurchaseQueryBill.Creator=GetCurrentUser();
- #PurchaseQueryBill.ID_Creator=GetLoginUserID();
- #PurchaseQueryBill.Assessor=DBNull();
- #PurchaseQueryBill.ID_Assessor=DBNull();
- #PurchaseQueryBill.AssessDate_PurchaseQueryBill=DBNull();
- #PurchaseQueryBill.LastModUser=DBNull();
- #PurchaseQueryBill.LastModUser_PurchaseQueryBill=DBNull();
- #PurchaseQueryBill.LastModDate_PurchaseQueryBill=DBNull();
- #PurchaseQueryBill.Date_PurchaseQueryBill=GetCurrentTime();
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnableNew=false;
- toolBar.EnablePrint=false;
- toolBar.EnableExport = false;
- toolBar.EnableImport = true;
- SetColumnDefaultValue("PurchaseQueryBillProduct", "Quantity_PurchaseQueryBillProduct",1 );
- UpdateForm(true,"");
- @Status=1;
- </New>
- <View>
- tbNo.ReadOnly=false;
- timeMake.Enabled=false;
- dtpRespondDate.Enabled=false;
- dtpValidityDate.Enabled=false;
- tbNoSupplier.ReadOnly=true;
- cbTaxCurrency.Enabled=false;
- cbCurrency.Enabled=false;
- cbPrincipal.Enabled=false;
- cbLinkman.Enabled=false;
- cbTelephone.Enabled=false;
- cbFax.Enabled=false;
- dgProduct.ReadOnly=true;
- dgRemark.ReadOnly=true;
- dgReportComment.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnablePrint=GetRight(@Title,"打印");
- toolBar.EnableNew=GetRight(@Title,"新增");
- if(Equals(#PurchaseQueryBill.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.EnableExport = true;
- toolBar.EnableImport = false;
- tbNo.Focus();
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- tbNo.ReadOnly=true;
- timeMake.Enabled=false;
- dtpRespondDate.Enabled=true;
- dtpValidityDate.Enabled=true;
- tbNoSupplier.ReadOnly=false;
-
- cbCurrency.Enabled=false;
- cbPrincipal.Enabled=true;
- cbLinkman.Enabled=true;
- cbTelephone.Enabled=true;
- cbFax.Enabled=true;
- dgProduct.ReadOnly=false;
- dgRemark.ReadOnly=false;
- dgReportComment.ReadOnly=false;
- #PurchaseQueryBill.LastModUser=GetCurrentUser();
- #PurchaseQueryBill.LastModUser_PurchaseQueryBill=GetLoginUserID();
- #PurchaseQueryBill.LastModDate_PurchaseQueryBill=GetCurrentTime();
- toolBar.EnableSubmit=GetRight(@Title,"修改");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=false;
- toolBar.EnableNew=false;
- toolBar.EnablePrint=false;
- toolBar.EnableExport = false;
- toolBar.EnableImport = false;
- SetColumnDefaultValue("PurchaseQueryBillProduct", "Quantity_PurchaseQueryBillProduct",1 );
- @HaveAccessed = !Equals(#PurchaseQueryBill.AssessDate_PurchaseQueryBill,DBNull());
- if(@HaveAccessed)
- cbTaxCurrency.Enabled = false;
- else
- cbTaxCurrency.Enabled = true;
- UpdateForm(true, "");
- @Status=3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if(!Search("SearchSupplier",tbNoSupplier.CValue)|| !Equals(#PurchaseQueryBill.ID_Supplier,#Supplier.ID_Supplier))
- {
- MessageBox("请输入有效的供应商,回车以示确认!",@Title);
- tbDetail.SelectedIndex = 0;
- tbNoSupplier.Focus();
- return;
- }
-
- if (!cbTaxCurrency.CheckSelectedItem())
- {
- MessageBox("请选择有效的税别!",@Title);
- tbDetail.SelectedIndex = 0;
- cbTaxCurrency.Focus();
- return;
- }
- if (!cbPrincipal.CheckSelectedItem())
- {
- MessageBox("请选择有效的负责业务!",@Title);
- tbDetail.SelectedIndex = 0;
- cbPrincipal.Focus();
- return;
- }
- if(RowCount("#PurchaseQueryBillProduct")==0)
- {
- MessageBox("请输入采购产品!",@Title);
- tbDetail.SelectedIndex = 1;
- dgProduct.Focus();
- return;
- }
- UpdateForm(false, "");
- SuspendLayout();
- for(@i=0;@i<RowCount("#PurchaseQueryBillProduct");@i=@i+1)
- {
- SetPosition("#PurchaseQueryBillProduct",@i);
-
-
- if(Equals(#PurchaseQueryBillProduct.No_Product,""))
- {
- tbDetail.SelectedIndex = 1;
- dgProduct.CurrentRowIndex=@i;
- MessageBox("请输入产品编号!",@Title);
- ResumeLayout();
- return;
- }
- if(Equals(#PurchaseQueryBillProduct.ID_Product,GuidEmpty()))
- {
- tbDetail.SelectedIndex = 1;
- dgProduct.CurrentRowIndex=@i;
- MessageBox("该产品不存在!",@Title);
- ResumeLayout();
- return;
- }
- if(#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct<=0)
- {
- tbDetail.SelectedIndex = 1;
- dgProduct.CurrentRowIndex=@i;
- MessageBox("数量不得小于等于0!",@Title);
- ResumeLayout();
- return;
- }
- if(#PurchaseQueryBillProduct.UnitPrice_PurchaseQueryBillProduct<0)
- {
- tbDetail.SelectedIndex = 1;
- dgProduct.CurrentRowIndex=@i;
- MessageBox("单价不得小于0!",@Title);
- ResumeLayout();
- return;
- }
-
-
- if(Equals(#PurchaseQueryBillProduct.ID_PurchaseQueryBillProduct,GuidEmpty()))
- {
- #PurchaseQueryBillProduct.ID_PurchaseQueryBillProduct=NewGuid();
- }
- #PurchaseQueryBillProduct.ID_PurchaseQueryBill=#PurchaseQueryBill.ID_PurchaseQueryBill;
- }
- for(@j=0;@j<RowCount("#BillComment");@j++)
- {
- SetPosition("#BillComment",@j);
- if(Equals(#BillComment.ID_BillComment,GuidEmpty()))
- {
- #BillComment.ID_BillComment=NewGuid();
- }
- #BillComment.ID_Bill=#PurchaseQueryBill.ID_PurchaseQueryBill;
- }
- for(@j=0;@j<RowCount("#ReportComment");@j++)
- {
- SetPosition("#ReportComment",@j);
- if(Equals(#ReportComment.ID_ReportComment,GuidEmpty()))
- {
- #ReportComment.ID_ReportComment=NewGuid();
- }
- #ReportComment.ID_Bill=#PurchaseQueryBill.ID_PurchaseQueryBill;
- }
- ResumeLayout();
- if(@Status==1)
- { #PurchaseQueryBill.CreateDate_PurchaseQueryBill=GetCurrentTime();
- #PurchaseQueryBill.No_PurchaseQueryBill = New("#PurchaseQueryBill.No_PurchaseQueryBill",timeMake.CValue);
- }
- else if(@Status==3)
- {
- #PurchaseQueryBill.LastModUser=GetCurrentUser();
- #PurchaseQueryBill.LastModUser_PurchaseQueryBill=GetLoginUserID();
- #PurchaseQueryBill.LastModDate_PurchaseQueryBill=GetCurrentTime();
- Update();
- }
- ChangeMode("View");
- ]]>
- </SubmitButtonClick>
- <CountSum>
- <![CDATA[
- if (RowCount("#PurchaseQueryBillProduct") == 0)
- {
- txtNumSum.CValue=0;
- txtMoneySum.CValue=0;;
- txtTaxSum.CValue=0;
- txtSum.CValue=0;
- }
- else
- {
- txtNumSum.CValue = SumOfCol("#PurchaseQueryBillProduct.Quantity_PurchaseQueryBillProduct");
- switch (cbTaxCurrency.SelectedName)
- {
- case "外加":
- txtMoneySum.CValue=SumOfCol("#PurchaseQueryBillProduct.Money");
- txtTaxSum.CValue=FormatNumber(txtMoneySum.CValue*@CessIn,@PriceDecimal);
- txtSum.CValue=txtMoneySum.CValue+txtTaxSum.CValue;
- break;
- case "内含":
- txtSum.CValue=SumOfCol("#PurchaseQueryBillProduct.Money");
- txtMoneySum.CValue=FormatNumber(txtSum.CValue/(1+@CessIn),@PriceDecimal);
- txtTaxSum.CValue=txtSum.CValue-txtMoneySum.CValue;
- break;
- case "零税":
- case "免税":
- txtMoneySum.CValue=SumOfCol("#PurchaseQueryBillProduct.Money");
- txtTaxSum.CValue=0;
- txtSum.CValue=txtMoneySum.CValue+txtTaxSum.CValue;
- break;
- }
- UpdateForm(false, "txtMoneySum");
- UpdateForm(false, "txtTaxSum");
- UpdateForm(false, "txtSum");
- }
- ]]>
- </CountSum>
- <AuditLable>
- BeginAudit();
- #PurchaseQueryBill.ID_Assessor=GetLoginUserID();
- #PurchaseQueryBill.Assessor=GetCurrentUser();
- #PurchaseQueryBill.AssessDate_PurchaseQueryBill=DateTimeNow();
- Audit();
- ChangeMode("View");
- EndAudit();
-
- </AuditLable>
- </Lables>
- </Form>
- </Forms>
|