sql.text:= 'insert into Rep仓库收付存月结报表(MC,ycjcje,bqsrje,bqllje,qmjcje) '+
' (select sorttype,sum(qc*inprice),sum((rk-rkt)*inprice),sum((ck-ckt)*inprice),sum(jc*inprice) '+
' from tmpkk2 where 1=1 '+sdepot+stmp +' group by sorttype )' ;
ExecSQL;
function GetPartFilter(AID: string): string;
var
querytemp: TOceanQuery;
s: string;
lOwnerids: TStringList;
procedure GetOwnerids(AID: string);