~
This commit is contained in:
parent
08850ca60a
commit
6369e4d72d
|
|
@ -169,10 +169,11 @@ begin
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
sql.Add('select A.*,B.PRTCodeName,B.prtcode,B.PRTColor,B.SOrddefstr5,');
|
sql.Add('select A.*,B.PRTCodeName,B.prtcode,B.PRTColor,B.SOrddefstr5,');
|
||||||
sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
sql.Add(' isnull((A.GxPrice ),0) as gxdj ,isnull(((A.GxPrice)*qty ),0) as gxmoney ');
|
||||||
SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
// sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||||
sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
// SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
||||||
SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
// sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||||
|
// SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
||||||
sql.Add('from JyOrder_Yield A ');
|
sql.Add('from JyOrder_Yield A ');
|
||||||
sql.Add('left join JYOrder_Sub B on A.mainid=B.mainid and A.subid=B.subid');
|
sql.Add('left join JYOrder_Sub B on A.mainid=B.mainid and A.subid=B.subid');
|
||||||
sql.Add('where A.filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' ');
|
sql.Add('where A.filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' ');
|
||||||
|
|
@ -180,6 +181,7 @@ begin
|
||||||
if cxTabControl1.TabIndex < 2 then
|
if cxTabControl1.TabIndex < 2 then
|
||||||
sql.Add(' and isnull(A.status,0)=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
sql.Add(' and isnull(A.status,0)=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
// Sql.add('group by convert(char(10),A.FillTime,120),A.Filler,A.mainID,A.MjTypeOther,C.OrderNo,D.PRTCodeName,C.conNo,C.CustomerNoName,D.PrtColor');
|
// Sql.add('group by convert(char(10),A.FillTime,120),A.Filler,A.mainID,A.MjTypeOther,C.OrderNo,D.PRTCodeName,C.conNo,C.CustomerNoName,D.PrtColor');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user