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

📄 inv_otherinaudit_h.pas

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

Interface

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

Type
  TFrm_Inv_OtherInAudit_H = Class(TFrm_Base_Entry_Head)
    AdoQry_HeadInvBillwhchck: TIntegerField;
    AdoQry_HeadInvBillid: TBCDField;
    AdoQry_HeadwhCodeName: TStringField;
    AdoQry_HeadInvBillno: TStringField;
    AdoQry_HeadInvBilldate: TDateTimeField;
    AdoQry_HeadInvBilltaxrate: TFloatField;
    AdoQry_HeadBillType2CodeName: TStringField;
    AdoQry_HeadOutType: TStringField;
    AdoQry_HeadOutCode: TStringField;
    AdoQry_HeadOutName: TStringField;
    AdoQry_HeadWhPositionCodeName: TStringField;
    AdoQry_HeadwhCode: TStringField;
    AdoQry_HeadwhName: TStringField;
    AdoQry_HeadWhPositionCode: TStringField;
    AdoQry_HeadWhPositionName: TStringField;
    AdoQry_HeadBillType2Code: TStringField;
    AdoQry_HeadBillType2Name: TStringField;
    AdoQry_HeadInvBillremArk: TStringField;
    AdoQry_HeadcurrencyCode: TStringField;
    AdoQry_Headwh_EmployeeCode: TStringField;
  private

    { Private declarations }
  public
    BillTypeCode:string;
    procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
    { Public declarations }
  end;

var
  Frm_Inv_OtherInAudit_H: TFrm_Inv_OtherInAudit_H;

implementation

uses Inv_OtherInAudit_B;
{$R *.DFM}

procedure TFrm_Inv_OtherInAudit_H.InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);
begin
  inherited;
  BillTypeCode:=Param1;
  SelectFromSQL:='select '+
                    'i.InvBillwhchck,'+
                    'i.InvBillid,'+
                    'i.whCode,'+
                    'i.currencyCode,'+
                    'w.whName,'+
                    'i.whCode+'+''' '''+'+w.whName as whCodeName, '+
                    'i.InvBillno,'+
                    'i.InvBilldate,'+
                    'i.wh_EmployeeCode,'+
                    'i.InvBillremArk,'+
                    'i.InvBilltaxrate,'+
                    'i.BillType2Code,'+
                    'b.BillType2Name,'+
                    'i.BillType2Code+'+''' '''+'+b.BillType2Name as BillType2CodeName, '+
                  //入库对象
                    'OutType='+
                    'case'+
                    '  when i.DeptCode is not null then ''部门'' '+
                    '  when i.VendorCode is not null then ''供应商'' '+
                    'else '+
                    ' '''' '+
                    ' end,'+
                  //入库对象代码
                    'OutCode='+
                    'case'+
                    '  when i.DeptCode is not null then i.DeptCode '+
                    '  when i.VendorCode is not null then i.VendorCode '+
                    'else '+
                    ' '''' '+
                    'end,'+
                  //入库对象描述
                   'OutName='+
                   'case'+
                   '  when i.DeptCode is not null then D.DeptName '+
                   '  when i.VendorCode is not null then V.VendorName '+
                   'else '+
                   ' '''' '+
                   'end, '+
                   'i.WhPositionCode,'+
                   'p.WhPositionName,'+
                   'i.WhPositionCode+'+''' '''+'+p.WhPositionName as WhPositionCodeName '+
    'from InvInBill i '+
    'left join Dept D on i.DeptCode=D.DeptCode '+
    'left join Vendor V on i.VendorCode=V.VendorCode '+
    'left join Warehouse w on i.whCode=w.whCode '+
    'left join BillType2 b on i.BillType2Code=b.BillType2Code '+
    'left join WhPosition p on i.whCode=p.whCode and i.WhPositionCode=p.WhPositionCode ';

    condition:=' (i.BillTypeCode='''+BillTypeCode+''' and '+
               '      i.InvBillStkchck=0 and '+
               '      i.whCode in (select w.whCode '+
                                  ' from whAccessCtrl a,Warehouse w '+
                                  ' where a.EmployeeCode='''+userCode+''' and '+
                                  ' a.whCode=w.whCode and w.PriceType=0))';
    ConditionUserDefine:=condition;
    OrderByFields:='whCode,InvBillno';

    getdata;

    Frm_Entry_Body:=TFrm_Inv_OtherInAudit_B.Create(Self);
end;


end.

⌨️ 快捷键说明

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