📄 mrp_qry_uprightmrp_d_po.pas
字号:
unit Mrp_Qry_UpRightMrp_D_Po;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin, Mask;
Type
TFrm_Mrp_Qry_UpRightMrp_D_Po = Class(TFrm_Base_Qry)
Label1: TLabel;
Edt_PoNo: TEdit;
Label2: TLabel;
MEdt_PoDate: TMaskEdit;
Label3: TLabel;
Edt_PcNo: TEdit;
Label4: TLabel;
Edt_VendorCode: TEdit;
Label5: TLabel;
Cmbx_PoType: TComboBox;
Edt_PoRemArk: TEdit;
Label11: TLabel;
Label10: TLabel;
Edt_Potax: TEdit;
Label9: TLabel;
Edt_CurrencyCode: TEdit;
Label7: TLabel;
Edt_EmployeeCode: TEdit;
Label6: TLabel;
AdoQry_MaInvendorCode: TStringField;
AdoQry_MainpoType: TIntegerField;
AdoQry_Mainpodate: TDateTimeField;
AdoQry_Mainpotaxrate_Percent: TIntegerField;
AdoQry_MaincurrencyCode: TStringField;
AdoQry_MainEmployeeCode: TStringField;
AdoQry_MainporemArk: TStringField;
AdoQry_MainPONO: TStringField;
AdoQry_MainPOLINENo: TIntegerField;
AdoQry_MainItemCode: TStringField;
AdoQry_MainPOLineDATE: TDateTimeField;
AdoQry_MainPOQTY: TFloatField;
AdoQry_MainPONoFinishQty: TFloatField;
AdoQry_MainPOREFERENCEDPRICE: TIntegerField;
AdoQry_MainPOLINESTATUS: TIntegerField;
AdoQry_MainPoNoTaxPrice: TFloatField;
AdoQry_MainPONoTaxAmount: TBCDField;
AdoQry_MainPoTaxPrice: TFloatField;
AdoQry_MainPoTaxAmount: TBCDField;
AdoQry_MainPOStArtWorkDate: TDateTimeField;
AdoQry_MainPoRealInQty: TFloatField;
AdoQry_MainPoInQty: TFloatField;
AdoQry_MainItemName: TStringField;
AdoQry_MainUomName: TStringField;
AdoQry_Mainpcno: TStringField;
procedure AdoQry_MainAfterScroll(DataSet: TDataSet);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
Orderno:string;
Orderlineno:string;
procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
{ Public declarations }
end;
var
Frm_Mrp_Qry_UpRightMrp_D_Po: TFrm_Mrp_Qry_UpRightMrp_D_Po;
implementation
uses Mrp_Qry_UpRightMrp_D,Mrp_Qry_DynamicUpRightMrp_D;
{$R *.DFM}
{ TFrm_Mrp_Qry_UpRightMrp_D_Po }
procedure TFrm_Mrp_Qry_UpRightMrp_D_Po.InitForm(
AdOConnection: TAdOConnection; ShowExtendColumn: Boolean);
var sqltext:string;
begin
inherited;
Pricefields:='potaxPrice,ponotaxPrice,potaxAmount,ponotaxAmount,';
sqltext:='Select po.VendorCode,po.poType,po.podate,po.potaxrate_Percent, '
+' po.currencyCode,po.EmployeeCode,po.pcno,po.poremArk, '
+' PoLine.*,Item.ItemName,Uom.UomName '
+' From PoLine '
+' join po on po.pono=poline.pono '
+' Left Outer Join Item On PoLine.ItemCode=Item.ItemCode '
+' Left Outer Join Uom On Item.UomCode=Uom.UomCode'
+' where poline.pono='''+Orderno+''''
+' and poline.polineno='+Orderlineno;
// +' and poline.polineno='+copy(Frm_Mrp_Qry_UpRightMrp_D.AdoQry_Main.fieldbyname('Ordernoandlineno').asstring,pos('-',Frm_Mrp_Qry_UpRightMrp_D.AdoQry_Main.fieldbyname('Ordernoandlineno').asstring)+1,);
with AdoQry_Main do
begin
Close;
sql.clear;
sql.Add(sqltext);
Prepared;
try
open;
except
end;
end;
end;
procedure TFrm_Mrp_Qry_UpRightMrp_D_Po.AdoQry_MainAfterScroll(
DataSet: TDataSet);
begin
inherited;
with AdoQry_Main do
begin
edt_Pono.Text:=fieldbyname('pono').asstring;
medt_Podate.Text:=fieldbyname('podate').asstring;
edt_Pcno.Text:=fieldbyname('pcno').asstring;
edt_VendorCode.Text:=fieldbyname('VendorCode').asstring;
cmbx_PoType.ItemIndex:=fieldbyname('poType').asinteger;
edt_EmployeeCode.Text:=fieldbyname('EmployeeCode').asstring;
edt_CurrencyCode.Text:=fieldbyname('currencyCode').asstring;
edt_Potax.Text:=inttostr(fieldbyname('potaxrate_Percent').asinteger);
edt_PoremArk.Text:=fieldbyname('poremArk').asstring;
end;
end;
procedure TFrm_Mrp_Qry_UpRightMrp_D_Po.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Mrp_Qry_UpRightMrp_D_Po:=nil;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -