selecionar campo mas só que é calculado

13/01/2004

0

o meu codigo de seleção é o seguinte

Query1.close;
query1.SQL.Clear;
query1.sql.Add(´Select * from lancdetalhe where datal =:CODCOD and renda <> 0´);
query1.ParamByName(´codcod´).Value:= (maskedit1.Text);
query1.open;

renda é calculado e seu calculo é feito assim no oncalcfields

if (tblancdetalhetotalprovento.Value <= tbsalariobase1.Value)and(tblancdetalhestatuslook.Value <> ´P´)and (tblancdetalhestatuslook.Value <> ´I´) then
tblancdetalherenda.Value := 0 else
if (tblancdetalhetotalprovento.Value > tbsalariobase1.Value)and (tblancdetalhetotalprovento.Value <= tbsalariobase2.Value)and(tblancdetalhestatuslook.Value <> ´P´)and (tblancdetalhestatuslook.Value <> ´I´) then
begin
tblancdetalherenda.Value := tblancdetalhetotalprovento.Value *tbsalarioaliqmenor.Value/100 ;
tblancdetalherenda.Value := arredondar(tblancdetalherenda.Value,2) end else
if (tblancdetalhetotalprovento.Value > tbsalariobase2.Value)and(tblancdetalhestatuslook.Value <> ´P´)and (tblancdetalhestatuslook.Value <> ´I´) then
begin
tblancdetalherenda.Value := tblancdetalhetotalprovento.Value * tbsalarioaliqmaior.Value / 100;
tblancdetalherenda.Value := arredondar(tblancdetalherenda.Value,2)end else
tblancdetalherenda.Value := 0;


o que tenho que fazer por favor me ajudem nesta seleção


Fama

Fama

Responder

APRENDA A PROGRAMAR DO ZERO AO PROFISSIONAL

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar