📄 ap_qry_apaging.dfm
字号:
inherited Frm_Ap_Qry_ApAging: TFrm_Ap_Qry_ApAging
Left = 63
Top = 127
Caption = '应付帐款帐龄分析'
PixelsPerInch = 96
TextHeight = 12
inherited AdoQry_Tmp: TAdoQuery
SQL.Strings = (
'set noCount on '
' create table #abc (VendorCode varchAr(20) null, VendorB varc' +
'hAr(60) null,currencyCodeb varchAr(40) null, D1_30 float null ,D' +
'31_90 float null ) '
' insert into #abc (VendorCode,VendorB,currencyCodeb,D1_30 ) '
' select a.VendorCode'
' , a.VendorCode+'#39' '#39'+a.VendorName as VendorB'
' , a.currencyCode+'#39' '#39'+c.currencyName currencyCodeb'
' ,b.Amount30 '
' from Vendor a, (select VendorCode,Sum(ApInvoiceAmount-(ApPayed' +
'Amount)) as Amount30 from ApInvoice where dateDiff(dy,ApInvoic' +
'einputdate,getdate())+1>= 1 and dateDiff(dy,ApInvoiceinputdate,g' +
'etdate())+1<= 30 and ApPayFlag<>0 group by VendorCode ) b'
' ,currency c '
'where a.VendorCode=b.VendorCode and a.currencyCode=c.currencycod' +
'e'
''
' insert into #abc (VendorCode,VendorB,currencyCodeb,D31_90 )'
' select a.VendorCode'
' , a.VendorCode+'#39' '#39'+a.VendorName as VendorB'
' , a.currencyCode+'#39' '#39'+c.currencyName as currencyCodeb'
' ,b.Amount30 '
' from Vendor a, (select VendorCode,Sum(ApInvoiceAmount-(ApPayed' +
'Amount)) as Amount30 from ApInvoice where dateDiff(dy,ApInvoic' +
'einputdate,getdate())+1>= 31 and dateDiff(dy,ApInvoiceinputdate,' +
'getdate())+1<= 90 and ApPayFlag<>0 group by VendorCode ) b '
' ,currency c where a.VendorCode=b.VendorCode and a.currencyc' +
'ode=c.currencyCode '
''
' set noCount on '
' create table #aaaa (VendorCode varchAr(20) null, VendorB varc' +
'hAr(60) null,currencyCodeb varchAr(40) null, Total float null ' +
', D1_30 float null ,D31_90 float null ) '
' insert into #aaaa '
' select VendorCode,VendorB,currencyCodeb, Sum(isnull(D1_30,0))+S' +
'um(isnull(D31_90,0)) as Total, Sum(isnull(D1_30,0)) as D1_30 ,' +
'Sum(isnull(D31_90,0)) as D31_90'
' from #abc group by VendorCode,VendorB, currencyCodeb '
' select * from #aaaa ')
Left = 77
Top = 35
end
inherited ActionList: TActionList
Left = 360
Top = 0
end
inherited AdoQry_Main: TAdoQuery
CacheSize = 100
ConnectionString = ''
CurSorType = ctStatic
SQL.Strings = (
'set noCount on'
' create table #abc (VendorCode varchAr(20) null, VendorB varc' +
'hAr(60) null,currencyCodeb varchAr(40) null, D1_30 float null ,D' +
'31_90 float null ) '
' insert into #abc (VendorCode,VendorB,currencyCodeb,D1_30 ) '
' select a.VendorCode'
' , a.VendorCode+'#39' '#39'+a.VendorName as VendorB'
' , a.currencyCode+'#39' '#39'+c.currencyName currencyCodeb'
' ,b.Amount30 '
' from Vendor a, (select VendorCode,Sum(ApInvoiceAmount-(ApPayed' +
'Amount)) as Amount30 from ApInvoice where dateDiff(dy,ApInvoic' +
'einputdate,getdate())+1>= 1 and dateDiff(dy,ApInvoiceinputdate,g' +
'etdate())+1<= 30 and ApPayFlag<>0 group by VendorCode ) b'
' ,currency c '
'where a.VendorCode=b.VendorCode and a.currencyCode=c.currencycod' +
'e'
''
' insert into #abc (VendorCode,VendorB,currencyCodeb,D31_90 )'
' select a.VendorCode'
' , a.VendorCode+'#39' '#39'+a.VendorName as VendorB'
' , a.currencyCode+'#39' '#39'+c.currencyName as currencyCodeb'
' ,b.Amount30 '
' from Vendor a, (select VendorCode,Sum(ApInvoiceAmount-(ApPayed' +
'Amount)) as Amount30 from ApInvoice where dateDiff(dy,ApInvoic' +
'einputdate,getdate())+1>= 31 and dateDiff(dy,ApInvoiceinputdate,' +
'getdate())+1<= 90 and ApPayFlag<>0 group by VendorCode ) b '
' ,currency c where a.VendorCode=b.VendorCode and a.currencyc' +
'ode=c.currencyCode '
''
' set noCount on '
' create table #aaaa (VendorCode varchAr(20) null, VendorB varc' +
'hAr(60) null,currencyCodeb varchAr(40) null, Total float null ' +
', D1_30 float null ,D31_90 float null ) '
' insert into #aaaa '
' select VendorCode,VendorB,currencyCodeb, Sum(isnull(D1_30,0))+S' +
'um(isnull(D31_90,0)) as Total, Sum(isnull(D1_30,0)) as D1_30 ,' +
'Sum(isnull(D31_90,0)) as D31_90'
' from #abc group by VendorCode,VendorB, currencyCodeb '
' select * from #aaaa'
''
' ')
Left = 8
Top = 33
end
inherited DataSource: TDataSource
OnDataChange = DataSourceDataChange
Left = 40
Top = 33
end
inherited ExtPrintReport: TExtPrintReport
Left = 328
Top = 1
end
inherited PopuPmenu: TPopuPmenu
Left = 400
Top = 1
end
object AdoQry_tmp2: TAdoQuery
EnableBCD = False
Parameters = <>
Left = 112
Top = 36
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -