📄 inv_whpmovebillqry.pas
字号:
unit Inv_WhPMoveBillQry;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin, DBCtrls, Mask;
Type
TFrm_Inv_WhPMoveBillQry = Class(TFrm_Base_Qry)
Label1: TLabel;
DBText1: TDBText;
Panel1: TPanel;
Label2: TLabel;
Label7: TLabel;
Label8: TLabel;
lbl_VendorCodeName: TLabel;
Label5: TLabel;
Edt_BillNo: TEdit;
MEdt_Date: TMaskEdit;
Edt_RemArk: TEdit;
Lbl_Pono: TLabel;
Lbl_WhName: TLabel;
Label3: TLabel;
Lbl_WhPositionCodeName: TLabel;
Label4: TLabel;
Lbl_OWhPositionCodeName: TLabel;
procedure Act_PreviewExecute(Sender: TObject);
procedure Act_PrintExecute(Sender: TObject);
private
InvBillNo,WHCode:string;
InvBillTypeCode:string;
{ Private declarations }
public
{ Public declarations }
procedure Getvar(RInvBillNo,RWHCode,RInvBillTypeCode:string);
procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override ;
end;
var
Frm_Inv_WhPMoveBillQry: TFrm_Inv_WhPMoveBillQry;
implementation
uses Inv_PurchaseInBillQry,Inv_Global,Sys_Global;
{$R *.DFM}
procedure TFrm_Inv_WhPMoveBillQry.Getvar(RInvBillNo,RWHCode,RInvBillTypeCode:string);
begin
InvBillNo:=''''+RInvBillNo+'''';
WHCode:=RWHCode;
InvBillTypeCode:=RInvBillTypeCode;
end;
procedure TFrm_Inv_WhPMoveBillQry.InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);
begin
inherited;
SelectFromSQL:=' Select '
+' InvOutBill.InvBillDate, '
+' InvOutBill.InvBillNo, '
+' InvOutBill.PONo,'
+' InvOutBillLine.POLineNo,'
+' InvOutBillLine.ItemCode'
+',InvOutBillLine.BillLineRemArk'
+' ,Item.ItemName, '
+' Uom.UomName,'
+' InvOutBillLine.InvBillQty,'
+' Warehouse.whCode+'' ''+Warehouse.whName as whName, '
+' InvOutBill.WhPositionCode+'' ''+WHP1.WhPositionName as WhPositionCodeName,'
+' InvOutBill.OWhPositionCode+'' ''+WHP2.WhPositionName as OWhPositionCodeName,'
+' InvOutBill.InvBillRemArk '
+' From InvOutBillLine '
+' Left Outer Join Item On InvOutBillLine.ItemCode=Item.ItemCode '
+' Left Outer Join Uom On Item.UomCode=Uom.UomCode, '
+' InvOutBill '
+' left outer join Warehouse on InvOutBill.whCode=Warehouse.whCode '
+' Left Outer JOin WhPosition AS WHP1 on InvOutBill.WhPositionCode=whp1.WhPositionCode '
+' And InvOutBill.whCode=whp1.whCode '
+' Left Outer JOin WhPosition AS WHP2 on InvOutBill.OWhPositionCode=whp2.WhPositionCode '
+' And InvOutBill.whCode=WHP2.whCode '
+' where '
+' InvOutBillLine.InvBillId=InvOutBill.InvBillId '
+' and InvOutBill.InvBillNo='+InvBillNo
+' and Warehouse.WHCode='''+WHCode+''''
+' and InvOutBill.BillTypeCode='''+InvBillTypeCode+'''';
Orderbyfields:='';
getdata;
lbl_WhName.Caption:=AdoQry_Main.fieldbyname('whName').ASSTRING; // 仓库
lbl_WhPositionCodeName.Caption:=AdoQry_Main.fieldbyname('WhPositionCodeName').ASSTRING; // 移出贺位
lbl_OWhPositionCodeName.Caption:=AdoQry_Main.fieldbyname('OWhPositionCodeName').ASSTRING; // 移入贺位
edt_Billno.text:=AdoQry_Main.fieldbyname('InvBillNo').ASSTRING;//单据号
MEdt_Date.text:=AdoQry_Main.fieldbyname('InvBilldate').asstring;//日期
Edt_RemArk.text:=AdoQry_Main.fieldbyname('InvBillRemArk').ASSTRING; //备注
end;
procedure TFrm_Inv_WhPMoveBillQry.Act_PreviewExecute(Sender: TObject);
begin
//inherited;
BillPrint(DBConnect,WhCode,Edt_BillNo.text,InvBillTypeCode,ModuleCode,True,False,True,'');
end;
procedure TFrm_Inv_WhPMoveBillQry.Act_PrintExecute(Sender: TObject);
begin
//inherited;
BillPrint(DBConnect,WhCode,Edt_BillNo.text,InvBillTypeCode,ModuleCode,False,False,True,'');
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -