: begin
caption:='Zakljucenje kase';
if podtip=0 then SetDates else begin
DatumOD.Items.Add(datetostr(date));
DatumDo.Items.Add(datetostr(date));
end;
dm.IBQuery1.Close;
case podtip of
0,1:dm.IBQuery1.SQL.Text:='select r.broj,r.godina,r.operater,sum(r.kolicina*r.cijena),r.vrijeme,'+
'sum((r.kolicina*r.cijena/(1+(r.mpporez+r.osnovni)*0.01))*(r.osnovni+r.mpporez)*0.01) '
+'from racun r where r.datum>=:d1 and r.datum<=:d2 group by r.broj,r.godina,r.operater order by 1,2,3';
2:exit;
end;
if DatumOd.Items.Count>0 then DatumOD.ItemIndex:=DatumOD.Items.Count-1;
if DatumDo.Items.Count>0 then DatumDO.itemIndex:=DatumDO.Items.Count-1;
DatumOdChange(nil);
end;
sa sam na ovaj dio 0,1:dm.IBQuery1.SQL.Text:='select r.broj,r.godina,r.operater,sum(r.kolicina*r.cijena),r.vrijeme,'+
'sum((r.kolicina*r.cijena/(1+(r.mpporez+r.osnovni)*0.01))*(r.osnovni+r.mpporez)*0.01) '
+'from racun r where r.datum>=:d1 and r.datum<=:d2 group by r.broj,r.godina,r.operater order by 1,2,3';
dodao jos i r.artikal ali kada pokrenem program izbaci mi slijedecu gresku:
Dynamic SQL Error
SQL error code =-104
invalid column reference.. eh eto to je taj problem :))
Ako neznas pitaj... ako mozes pomozi..