📄 inv_vendorsalesum.pas
字号:
unit Inv_VendorSaleSum;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin;
Type
TFrm_Inv_VendorSaleSum = Class(TFrm_Base_Qry)
private
{ Private declarations }
public
{ Public declarations }
procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
end;
var
Frm_Inv_VendorSaleSum: TFrm_Inv_VendorSaleSum;
implementation
uses Inv_VendorSaleSum_C;
{$R *.DFM}
{ TFrm_Inv_ItemSaleSum }
procedure TFrm_Inv_VendorSaleSum.InitForm(AdOConnection: TAdOConnection;
ShowExtendColumn: Boolean);
begin
if Param1='0203' then
begin
Caption:='材料分客户销售汇总';
Pnl_Title.Caption:='材料分客户销售汇总';
ConditionUserDefine:='InvOutBill.BillTypeCode='''+Param1+''''
+' And InvOutBill.InvBillWHChck=1';
end
else if Param1='0204' then
begin
ConditionUserDefine:='InvOutBill.BillTypeCode='''+Param1+''''
+' And InvOutBill.InvBillWHChck=1';
if Param2='NoMps' then
begin
ConditionUserDefine:=ConditionUserDefine
+'And InvOutBill.MpsSale=0';
Caption:='非主计划分客户销售汇总';
Pnl_Title.Caption:='非主计划分客户销售汇总';
end
else
begin
ConditionUserDefine:=ConditionUserDefine
+'And InvOutBill.MpsSale=1';
Caption:='主计划分客户销售汇总';
Pnl_Title.Caption:='主计划分客户销售汇总';
end;
end;
inherited;
AmountFields:='InvBillSaleAmount,';
SelectFromSQL:='Select InvOutBill.CustomerCode'
+',Customer.CustomerName'
+',InvOutBill.CustomerCode+'' ''+Customer.CustomerName As CustomerCodeName'
+',Sum(RealSalePrice.InvBillSaleAmount) As InvBillSaleAmount'
+' From InvOutBillLine'
+' Join InvOutBill on InvOutBillLine.InvBillId=InvOutBill.InvBillId'
+' Join Customer on InvOutBill.CustomerCode=Customer.CustomerCode'
+' Join RealSalePrice on InvOutBillLine.InvBillId=RealSalePrice.InvBillId'
+' And InvOutBillLine.InvBillLineNo=RealSalePrice.InvBillLineNo';
OrderByFields:='CustomerCodeName';
GroupByFields:='InvOutBill.CustomerCode,Customer.CustomerName';
Frm_Sys_Condition:=TFrm_Inv_VendorSaleSum_C.Create(Self);
Act_Filter.Execute;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -