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

📄 inv_qry_opadjustbilllist.pas

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

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_Qry_OpAdjustBillList = Class(TFrm_Base_Qry)
    AdoQry_MainopBillDate: TDateTimeField;
    AdoQry_MainopBillNo: TStringField;
    AdoQry_MaInvendorCodeName: TStringField;
    AdoQry_MainItemFlag: TStringField;
    AdoQry_MainUomName: TStringField;
    AdoQry_MainopBillQty: TFloatField;
    AdoQry_MainopBillNoTaxAmount: TFloatField;
    AdoQry_MainEmployeeCodeName: TStringField;
    AdoQry_MaInBillLineRemArk: TStringField;
    Label1: TLabel;
    Edit1: TEdit;
    procedure AdoQueryAfterOpen(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);
  end;

var
  Frm_Inv_Qry_OpAdjustBillList: TFrm_Inv_Qry_OpAdjustBillList;

implementation
uses  Inv_Qry_OpAdjustBillList_C ;
{$R *.DFM}

procedure TFrm_Inv_Qry_OpAdjustBillList.InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);
begin
  inherited;
  SelectFromSQL:='Select o.opBillDate,'+
    'o.opBillNo,'+  //单据号
    'o.VendorCode+'' ''+Vendor.VendorName As VendorCodeName,'+
    'ol.ItemCode+'' ''+Item.ItemName ItemFlag,'+
    'Uom.UomName,'+
    'ol.opBillQty,'+
    'ol.opBillNoTaxAmount,'+
    'o.EmployeeCode+'' ''+Employee.EmployeeName As EmployeeCodeName,'+
    'ol.BillLineRemArk '+
    'From  opAdjustBillLine ol '+
    'Join opAdjustBill o on ol.opBillId=o.opBillId '+
    'Left Outer Join Item On  ol.ItemCode=Item.ItemCode '+
    'Left Outer Join Uom On  Item.UomCode=Uom.UomCode '+
    'Left Outer Join Vendor On  o.VendorCode=Vendor.VendorCode '+
    'Left Outer Join Employee On  o.EmployeeCode=Employee.EmployeeCode ';

  OrderByFields:='opBillDate,opBillNo';
  Frm_Sys_Condition:=TFrm_Inv_Qry_OpAdjustBillList_C.Create(Self);
  Act_Filter.Execute;
end;


procedure TFrm_Inv_Qry_OpAdjustBillList.AdoQueryAfterOpen(
  DataSet: TDataSet);
var
  sum:real;
begin
  inherited;
  AdoQry_Main.DisableControls;
  with  AdoQry_Main do
  begin
     First;
     while not eof do
     begin
        sum:=sum+fieldbyname('opBillnotaxAmount').Value;
        next;
     end;
  end;
  edit1.Text:=FloatToStr(sum);
  AdoQry_Main.EnableControls;
end;

end.

⌨️ 快捷键说明

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