📄 inv_oppurchinaudit_h.pas
字号:
unit Inv_OpPurchInAudit_H;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Entry_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin;
Type
TFrm_Inv_OpPurchInAudit_H = Class(TFrm_Base_Entry_Head)
AdoQry_HeadInvBillId: TFloatField;
AdoQry_HeadWHCodeName: TStringField;
AdoQry_HeadInvBillNo: TStringField;
AdoQry_HeadInvBillDate: TDateTimeField;
AdoQry_HeadInvBillRemArk: TStringField;
AdoQry_HeadInvBillTaxRate: TFloatField;
AdoQry_HeadInvBillValuation: TIntegerField;
AdoQry_HeadCurrencyCode: TStringField;
AdoQry_HeadPoNo: TStringField;
AdoQry_HeadVendorCode: TStringField;
AdoQry_HeadVendorName: TStringField;
AdoQry_HeadInvBillBomChck: TIntegerField;
AdoQry_HeadWhPositionCodeName: TStringField;
AdoQry_HeadInvBillMonth: TStringField;
AdoQry_HeadParentBillid: TIntegerField;
private
{ Private declarations }
public
{ Public declarations }
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
end;
var
Frm_Inv_OpPurchInAudit_H: TFrm_Inv_OpPurchInAudit_H;
implementation
uses Inv_OpPurchInAudit_B;
{$R *.DFM}
procedure TFrm_Inv_OpPurchInAudit_H.InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);
begin
inherited;
SelectFromSQL:='Select'
+' InvInBill.InvBillId'
+',InvInBill.WHCode+'' ''+Warehouse.WHName As WHCodeName'
+',InvInBill.InvBillNo'
+',InvInBill.InvBillDate'
+',InvInBill.InvBillMonth'
+',InvInBill.InvBillRemArk'
+',InvInBill.InvBillTaxRate'
+',InvInBill.InvBillValuation'
+',InvInBill.CurrencyCode'
+',InvInBill.PoNo'
+',InvInBill.VendorCode'
+',InvInBill.ParentBillid'
+',Vendor.VendorName'
+',InvInBill.InvBillBomChck'
+',InvInBill.WhPositionCode+'' ''+WhPosition.WhPositionName As WhPositionCodeName'
+' From InvInBill'
+' Join Vendor On InvInBill.VendorCode=Vendor.VendorCode'
+' Join Warehouse On InvInBill.WHCode=Warehouse.WHCode'
+' left Join (Select Distinct InvBillId From OpBill)'
+' OpBill On InvInBill.InvBillId=OpBill.InvBillId'
+' Join WhPosition On InvInBill.WHCode=WhPosition.WHCode'
+' And InvInBill.WhPositionCode=WhPosition.WhPositionCode';
ConditionUserDefine:='InvInBill.BillTypeCode=''0103'''
+' And InvInBill.WHCode In '
+'(Select WHAccessCtrl.WHCode'//该用户有权对此仓库进行操作
+' From WHAccessCtrl Join Warehouse On WHAccessCtrl.WHCode=Warehouse.WHCode'
+' Where WHAccessCtrl.EmployeeCode='''+UserCode+''''
+' And Warehouse.PriceType=0)';
Condition:='InvInBill.InvBillBomChck=0 ';
OrderByFields:='WHCodeName,InvBillNo';
GetData;
Frm_Entry_Body:=TFrm_Inv_OpPurchInAudit_B.Create(Self);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -