⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ap_qry_apbalancelist.pas

📁 一个MRPII系统源代码版本
💻 PAS
字号:
unit Ap_Qry_ApBalanceList;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
  StdCtrls, ExtCtrls, ComCtrls, ToolWin, jpeg;

Type
  TFrm_Ap_Qry_ApBalanceList = Class(TFrm_Base_Qry)
    AdoQry_MainApBalanceMonth: TStringField;
    AdoQry_MaInvendorCode: TStringField;
    AdoQry_MaInvendorCodeName: TStringField;
    AdoQry_MainCurrencyCode: TStringField;
    AdoQry_MainCurrencyCodeName: TStringField;
    AdoQry_MainInvoiceBalance: TFloatField;
    AdoQry_MainNoInviceBalance: TFloatField;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure Act_PreviewExecute(Sender: TObject);
    procedure Act_PrintExecute(Sender: TObject);
    procedure Act_ExcelExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;    
  end;

var
  Frm_Ap_Qry_ApBalanceList: TFrm_Ap_Qry_ApBalanceList;

implementation

{$R *.DFM}

{ TFrm_Ap_Qry_ApBalanceList }

procedure TFrm_Ap_Qry_ApBalanceList.InitForm(AdOConnection: TAdOConnection;
  ShowExtendColumn: Boolean);
begin
  inherited;
  SelectFromSql:='select ApBalance.ApBalanceMonth'
                        +',ApBalance.VendorCode '
                        +',ApBalance.VendorCode +'' ''+Vendor.VendorName as VendorCodeName'
                        +',Vendor.CurrencyCode'
                        +',Vendor.CurrencyCode+'' ''+Currency.CurrencyName  as CurrencyCodeName'
                        +',ApBalance.InvoiceBalance'
                        +',ApBalance.NoInviceBalance '
                +' from Vendor  join Currency on Vendor.CurrencyCode=Currency.CurrencyCode'
                +' join ApBalance on ApBalance.VendorCode=Vendor.VendorCode ' ;
  OrderByFields:='VendorCode,ApBalanceMonth';
  PriceFields:='InvoiceBalance,NoInviceBalance,';
  Getdata;
end;

procedure TFrm_Ap_Qry_ApBalanceList.FormCreate(Sender: TObject);
begin
  inherited;
  Pnl_Title.Caption:='应付帐款期初余额表';
  Lbl_Condition.Caption :='全部';
  Lbl_Order.Caption :='供应商代码/月份';
end;

procedure TFrm_Ap_Qry_ApBalanceList.FormDestroy(Sender: TObject);
begin
  inherited;
  Frm_Ap_Qry_ApBalanceList:=nil;
end;

procedure TFrm_Ap_Qry_ApBalanceList.Act_PreviewExecute(Sender: TObject);
begin
  If AdoQry_Main.IsEmpty then Exit;
  inherited;

end;

procedure TFrm_Ap_Qry_ApBalanceList.Act_PrintExecute(Sender: TObject);
begin
  If AdoQry_Main.IsEmpty then Exit;
  inherited;

end;

procedure TFrm_Ap_Qry_ApBalanceList.Act_ExcelExecute(Sender: TObject);
begin
  If AdoQry_Main.IsEmpty then Exit;
  inherited;

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -