📄 pm_pobalance_h.pas
字号:
unit Pm_PoBalance_H;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Check_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin, jpeg;
Type
TFrm_Pm_PoBalance_H = Class(TFrm_Base_Check_Head)
AdoQry_HeadPoTmpFlag: TIntegerField;
AdoQry_HeadPoNo: TStringField;
AdoQry_HeadVendorCode: TStringField;
AdoQry_HeadVendorName: TStringField;
AdoQry_HeadPoDate: TDateTimeField;
AdoQry_HeadPoType: TIntegerField;
procedure Act_LookExecute(Sender: TObject);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Pm_PoBalance_H: TFrm_Pm_PoBalance_H;
implementation
Uses Pm_PoBalance_B;
{$R *.DFM}
{ TFrm_Pm_PoBalance_H }
procedure TFrm_Pm_PoBalance_H.InitForm(AdOConnection: TAdOConnection;
ReadOnly: Boolean);
var SpecialCondition :String;
begin
inherited;
//BODY窗体名称
Frm_Check_Body:=TFrm_Pm_PoBalance_B.Create(self);
//分独立订单及普通订单
If UpperCase(Param1)='PoSpecial' then
begin
Caption:='独立采购订单结算';
Pnl_Title.Caption:='独立采购订单结算';
Frm_Check_Body.Caption:='独立采购订单结算';
Frm_Check_Body.Pnl_Title.Caption:='独立采购订单结算';
SpecialCondition:=' and Po.PoSpecial=1 ';
end
Else
begin
Caption:='采购订单结算';
Pnl_Title.Caption:='采购订单结算';
Frm_Check_Body.Caption:='采购订单结算';
Frm_Check_Body.Pnl_Title.Caption:='采购订单结算';
SpecialCondition:=' and Po.PoSpecial<>1 ';
end;
SelectFromSql:='select Po.PoTmpFlag,Po.PoType,Po.PoNo,Po.VendorCode, '+
' V.VendorName,Po.PoDate '+
' from po '+
' left Join Vendor V on '+
' Po.VendorCode=V.VendorCode, '+
'(select pono,Count(*) CloselineCount '+
' from poline'+
' where polinestatus=7 '+
' group by pono) cpl, '+
'(select pono,Count(*) lineCount '+
' from poline '+
' where pono in '+
' (select pono '+
' from poline '+
' where polinestatus=7 '+
' group by pono) '+
' group by poNo) pl ';
ConditionUserDefine:=' pl.pono=cpl.pono and '+
' pl.lineCount=cpl.CloselineCount and '+
' po.pono=cpl.pono '+SpecialCondition;
OrderByFields:='VendorCode,PoNo';
GetData();
end;
procedure TFrm_Pm_PoBalance_H.Act_LookExecute(Sender: TObject);
begin
Param3:=AdoQry_Head.fieldbyname('PoNo').AsString;
Param4:=AdoQry_Head.fieldbyname('VendorCode').AsString+' '+AdoQry_Head.fieldbyname('VendorName').AsString;
inherited;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -