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

📄 sal_qry_othershiporder.pas

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

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_Sal_Qry_OtherShipOrder = Class(TFrm_Base_Qry)
    AdoQry_MainCustomerName: TStringField;
    AdoQry_Maincustomerflag: TStringField;
    AdoQry_MainInvBillDate: TDateTimeField;
    AdoQry_MainSloNo: TStringField;
    AdoQry_MainSLoLineNo: TIntegerField;
    AdoQry_MainInvBillNo: TStringField;
    AdoQry_MainInvBillLineNo: TStringField;
    AdoQry_MainItemCode: TStringField;
    AdoQry_MainItemName: TStringField;
    AdoQry_MainItemFlag: TStringField;
    AdoQry_MainShipQty: TFloatField;
    AdoQry_MainWhCode: TStringField;
    AdoQry_MainwhName: TStringField;
    AdoQry_Mainwhflag: TStringField;
    AdoQry_MainWhPositionCode: TStringField;
    AdoQry_MainWhPositionName: TStringField;
    AdoQry_MainWhPositionflag: TStringField;
    AdoQry_MainBatchNo: TStringField;
    AdoQry_MainInvBillPrice: TFloatField;
    AdoQry_MainInvBillAmount: TFloatField;
    AdoQry_MainInvBillNOtaxPrice: TFloatField;
    AdoQry_MainInvBillNOtaxAmount: TFloatField;
    AdoQry_MainDiSCountRate: TFloatField;
    AdoQry_MainDiSCountAmount: TFloatField;
    AdoQry_MainSal_EmployeeCode: TStringField;
    AdoQry_MainEmployeeName: TStringField;
    AdoQry_MainEmployeeFlag: TStringField;
    AdoQry_MainSaleType: TStringField;
    AdoQry_MainSaleTypeName: TStringField;
    AdoQry_MainSaleTypeFlag: TStringField;
    AdoQry_MainDeptCode: TStringField;
    AdoQry_MainDeptName: TStringField;
    AdoQry_MainDeptFlag: TStringField;
    AdoQry_MainCurrencyCode: TStringField;
    AdoQry_MainCurrencyName: TStringField;
    AdoQry_MainCurrencyFlag: TStringField;
    AdoQry_MainInvBillTaxRate: TFloatField;
    AdoQry_MainCustomerPayTermCode: TStringField;
    AdoQry_MainPayTermName: TStringField;
    AdoQry_MainPayTermflag: TStringField;
    AdoQry_MainShipModeCode: TStringField;
    AdoQry_MainShipModeName: TStringField;
    AdoQry_MainShipModeflag: TStringField;
    AdoQry_MainShipAddresSCode: TStringField;
    AdoQry_MainShipAddressName: TStringField;
    AdoQry_MainShipAddressflag: TStringField;
    AdoQry_MainRemArk: TStringField;
    AdoQry_MainRemArk1: TStringField;
    AdoQry_MainCustomerCode: TStringField;
    AdoQry_MainSaleEmployeeCode: TStringField;
    AdoQry_MainSaleEmployeeFlag: TStringField;
    AdoQry_MainSaleEmployeeName: TStringField;
    AdoQry_MainInvBillWhChCk: TIntegerField;
    AdoQry_MainInvBillPriceC: TFloatField;
    AdoQry_MainInvBillAmountC: TFloatField;
    AdoQry_MainInvBillNoTaxPriceC: TFloatField;
    AdoQry_MainInvBillNoTaxAmountC: TFloatField;
    AdoQry_MainExchRate: TFloatField;
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
    { Public declarations }
  end;

var
  Frm_Sal_Qry_OtherShipOrder: TFrm_Sal_Qry_OtherShipOrder;

implementation
 uses Sys_Global;
{$R *.DFM}
procedure TFrm_Sal_Qry_OtherShipOrder.InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);
var sqltext:string;
begin
  Application.ProcessMessages;
  inherited;
  SelectFromSQL:='Select Customer.CustomerCode,InvOutBill.ShipType,'
                +' Customer.CustomerName,Customer.CustomerCode+'' ''+Customer.CustomerName As customerflag, '
                +' InvOutBill.InvBillDate,InvOutBillLine.SloNo,InvOutBillLine.SLoLineNo, '
                +' InvOutBill.InvBillNo,InvBillLineNo,InvOutBillLine.ItemCode,Item.ItemName, '
                +' Item.ItemCode+'' ''+Item.ItemName As ItemFlag,InvOutBillLine.InvBillQty As ShipQty, '
                +' InvOutBill.WhCode,Warehouse.whName,Warehouse.whCode+'' ''+Warehouse.whName as whflag, '
                +' InvOutBill.WhPositionCode,WhPosition.WhPositionName,WhPosition.WhPositionCode+'' ''+WhPosition.WhPositionName as WhPositionflag, '
                +' InvOutBillLine.BatchNo,'
                +' InvOutBillLine.InvBillPrice,InvOutBillLine.InvBillPriceC, '
                +' InvOutBillLine.InvBillAmount,InvOutBillLine.InvBillAmountC, '
                +' InvOutBillLine.InvBillNOtaxPrice,InvOutBillLine.InvBillNoTaxPriceC, '
                +' InvOutBillLine.InvBillNOtaxAmount,InvOutBillLine.InvBillNoTaxAmountC , '
                +' InvOutBill.ExchRate, '
                +' InvOutBillLine.DiSCountRate,InvOutBillLine.DiSCountAmount,InvOutBill.Sal_EmployeeCode,Employee.EmployeeName,Employee.EmployeeCode+'' ''+Employee.EmployeeName As EmployeeFlag, '
                +' InvOutBill.SaleType,SaleType.SaleTypeName,SaleType.SaleTypeCode+'' ''+SaleType.SaleTypeName As SaleTypeFlag, '
                +' InvOutBill.DeptCode, Dept.DeptName,Dept.DeptCode+'' ''+Dept.DeptName As DeptFlag,InvOutBill.CurrencyCode,Currency.CurrencyName,Currency.CurrencyCode+'' ''+Currency.CurrencyName As CurrencyFlag, '
                +' InvOutBill.InvBillTaxRate,Customer.CustomerPayTermCode,PayTerm.PayTermName, '
                +' PayTerm.PayTermCode+'' ''+PayTerm.PayTermName as PayTermflag, '
                +' InvOutBill.ShipModeCode,ShipMode.ShipModeName, ShipMode.ShipModeCode+'' ''+ShipMode.ShipModeName as ShipModeflag, '
                +' InvOutBill.ShipAddresSCode,customerShipAddress.ShipAddressName,customerShipAddress.ShipAddresSCode+'' ''+customerShipAddress.ShipAddressName as ShipAddressflag, '
                +' InvOutBill.RemArk,InvOutBill.RemArk1, '
                +' InvOutBill.InvBillWhChCk, '
                +' InvOutBill.SaleEmployeeCode,Employee1.EmployeeName As SaleEmployeeName,Employee1.EmployeeCode+'' ''+Employee1.EmployeeName As SaleEmployeeFlag '
                +' From '
                +' InvOutBillLIne '
                +' Join InvOutBill On InvOutBillLine.InvBillID=InvOutBill.InvBillID '
                +' Left Join Item On InvOutBillLine.ItemCode=Item.ItemCode '
                +' Left Join SaleType On InvOutBill.SaleType=SaleType.SaleTypeCode '
                +' Left Join Customer On InvOutBill.CustomerCode=Customer.CustomerCode '
                +' Left Join Employee On InvOutBill.Sal_EmployeeCode=Employee.EmployeeCode '
                +' Left Join PayTerm On Customer.CustomerPayTermCode=PayTerm.PayTermCode '
                +' Left Join Warehouse On InvOutBill.WhCode=Warehouse.WhCode '
                +' Left Join WhPosition On (InvOutBill.WhCode=WhPosition.WhCode and InvOutBill.WhPositionCode=WhPosition.WhPositionCode )'
                +' Left Join Dept On InvOutBill.DeptCode=Dept.DeptCode '
                +' Left Join Currency On InvOutBill.CurrencyCode=Currency.CurrencyCode '
                +' Left Join ShipMode On InvOutBill.ShipModeCode=ShipMode.ShipModeCode '
                +' Left Join customerShipAddress On InvOutBill.ShipAddresSCode=customerShipAddress.ShipAddresSCode '
                +' Left Join Employee Employee1 On InvOutBill.SaleEmployeeCode=Employee1.EmployeeCode ';
  conditionUserDefine:=' InvOutBill.BillTypeCode in (''0205'',''0206'') '
                      +' And InvOutBill.ShipType=1 ';
  condition:=' InvBillDate<=  '+quotedstr(formatdatetime('yyyy.mm.dd',strtodatetime(GetServerDateTime(dbconnect))-30));
  Orderbyfields:='customerCode,InvBillDate';
  GetData;
  lbl_Condition.Caption:='发货日期<='+formatdatetime('yyyy.mm.dd',strtodatetime(GetServerDateTime(dbconnect))-30);
end;

procedure TFrm_Sal_Qry_OtherShipOrder.FormDestroy(Sender: TObject);
begin
  inherited;
  Frm_Sal_Qry_OtherShipOrder:=nil;
end;

end.

⌨️ 快捷键说明

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