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
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
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)