Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Galera estou com o seguinte codigo.....
<%
sql = " SELECT CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, Sum(CONF_RESUMO_CAIXA.VALOR) AS 'total', CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro FROM HANDBOOK.dbo.CONF_RESUMO_CAIXA CONF_RESUMO_CAIXA GROUP BY CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro HAVING (CONF_RESUMO_CAIXA.DATA={ts '2009-10-22 00:00:00'})"
set objRS = conexao.execute(sql) 'executa a cláusula sql
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= (objRS("total"))
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= (objRS("total"))
else
v_cartao="0,00"
end if
%>
<% =v_dinheiro%>
<br>
<% =v_cheque%>
<br>
<% =v_cartao%>
<br>
porem mesmo eu sabendo e conferindo que tem valores reais nestes campos ele não me apresenta os valores
aparece tudo como else (0,00)
o que estou fazendo de errado
Obrigado
>
cade a variavel com o valor da condição formapagamento???
testa forma o valor formapagamento no ifelse fica nulo, não sendo igual a, dinheiro, cheque ou cartão... com isso sendo diferentes ele vai para a condição "0,00" que no caso esta nos valores das variaveis do else falso.
Então o Valor do formapagamento vem do bando de dados que já esta alimentado
MORUMBI CARTAO 6945.60
MORUMBI CHEQUE 706.91
MORUMBI DINHEIRO 603.89
MORUMBI VALE FUNCIONARIO 431.22
ele não deveria já buscar esse valor ?
Velho mais assim ele vai direto para o else falso o if funciona da seguinte maneira
ao colocar
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
ele so vai da if verdadeiro se o valor contido na variavel formapagamento for "dinheiro", caso seja outra coisa por exemplo "dinheiroo" o sistema ira identificar que não bate e com isso vai para o outro valor.
é isso que esta acontecendo, para o sistema identificar e mandar o valor você precisara fazer um if de verificação.
você diz que a variavel formapagamento esta alientada assim por exemplo
MORUMBI DINHEIRO 603.89
e o if de verificação pede para verifica se é igual a
dinheiro
ou seja...
MORUMBI DINHEIRO 603.89 = dinheiro
não bate....
teria que esta
dinheiro = dinheiro
ae sim o sistema iria para o if verdadeiro.
Eu coloquei assim ...
Seria esse o correto ?
formapagamento = "dinheiro"
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
porem ele está me trazendo o valor do cartão e não do dinheiro...
Kra desculpa a minha ignorancia...
eu estou procurando aprender e tem coisas bestas que eu me atrapalho...
Obrigado pela força que estas dando...
sim cara em relação ao if e else é basicamente assim, na questão de pegar determinado valor de determinado tipo de pagamento tu poderia fazer uma filtragem diretamente no sql, mandando pegar o valor de determinada forma de pagamente, seria mais ou menos assim.
variavel = "Texto" 'Atribuindo um Valor de Texto
variavel = 10 'Atribuindo um Valor Númerico
ao inves de colocar v_dinheiro="0,00"
atribua como valor numerico
v_dinheiro=0,00
Galera não estou conseguindo....
passei o dia fazendo alguns testes mas não estou conseguindo resolver...
meu codigo é :
<!--#include file="Sqlconexao.asp"-->
<link href="../seg_asp/css/css.css" rel="stylesheet" type="text/css" />
<%
sql = " SELECT CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, Sum(CONF_RESUMO_CAIXA.VALOR) AS 'total', CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro FROM HANDBOOK.dbo.CONF_RESUMO_CAIXA CONF_RESUMO_CAIXA GROUP BY CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro HAVING (CONF_RESUMO_CAIXA.DATA={ts '2009-10-22 00:00:00'})"
set objRS = conexao.execute(sql) 'executa a cláusula sql
if formapagamento="formapagamento" then
if formapagamento="dinheiro" then
v_dinheiro="total"
else
v_dinheiro=""
end if
end if
%>
<table width="667" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" height="23" class="legenda"><strong>DATA</strong></td>
<td width="23%" class="legenda"><%=objRS("DATA")%></td>
<td width="6%" class="legenda"><strong>LOJA :</strong></td>
<td width="25%" class="legenda"><%=objRS("loja")%></td>
<td width="23%" class="legenda"><strong>DINHEIRO : </strong></td>
<td width="18%" class="legenda"><% =v_dinheiro%></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CHEQUE : </strong></td>
<td class="legenda"><% =v_cheque%></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CARTÃO :</strong></td>
<td class="legenda"><% =v_cartao%></td>
</tr>
</table>
</html>
Valew pela força galera...
nao seria o recordset esse formapagamento?
if objRS("formapagamento") ="formapagamento" then
>
nao seria o recordset esse formapagamento?
if objRS("formapagamento") ="formapagamento" then
formapagamento é uma coluna e dentro dela tem as condições como por exemplo
dinheiro
cheque
cartao
na minha tabela eu tenho o espaço para cada um deles
variaveis
v_dinheiro
v_cheque
v_cartao
<table width="667" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" height="23" class="legenda"><strong>DATA</strong></td>
<td width="23%" class="legenda"><%=objRS("DATA")%></td>
<td width="6%" class="legenda"><strong>LOJA :</strong></td>
<td width="25%" class="legenda"><%=objRS("loja")%></td>
<td width="23%" class="legenda"><strong>DINHEIRO : </strong></td>
<td width="18%" class="legenda"><% =v_dinheiro%></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CHEQUE : </strong></td>
<td class="legenda"><% =v_cheque%></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CARTÃO :</strong></td>
<td class="legenda"><% =v_cartao%></td>
</tr>
</table>então é +- como o ted k' postou
formapagamento = Cstr("" & objRS("formapagamento"))
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= (objRS("total"))
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= (objRS("total"))
else
v_cartao="0,00"
end if
>
então é +- como o ted k' postou
formapagamento = Cstr("" & objRS("formapagamento"))
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= (objRS("total"))
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= (objRS("total"))
else
v_cartao="0,00"
end if
Então eu cheguei a fazer assim porem não aparece os valores....
aparece 0,00
<!--#include file="Sqlconexao.asp"-->
<link href="../seg_asp/css/css.css" rel="stylesheet" type="text/css" />
<%
sql = " SELECT CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, Sum(CONF_RESUMO_CAIXA.VALOR) AS 'total', CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro FROM HANDBOOK.dbo.CONF_RESUMO_CAIXA CONF_RESUMO_CAIXA GROUP BY CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro HAVING (CONF_RESUMO_CAIXA.DATA={ts '2009-10-22 00:00:00'})"
set objRS = conexao.execute(sql) 'executa a cláusula sql
formapagamento = Cstr("" & objRS("formapagamento"))
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= (objRS("total"))
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= (objRS("total"))
else
v_cartao="0,00"
end if
'while not objRS.EOF
%>
<table width="667" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" height="23" class="legenda"><strong>DATA</strong></td>
<td width="23%" class="legenda"><%=objRS("DATA")%></td>
<td width="6%" class="legenda"><strong>LOJA :</strong></td>
<td width="25%" class="legenda"><%=objRS("loja")%></td>
<td width="23%" class="legenda"><strong>DINHEIRO : </strong></td>
<td width="18%" class="legenda"><strong><%=v_dinheiro%></strong></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CHEQUE : </strong></td>
<td class="legenda"><strong><%=v_cheque%></strong></td>
</tr>
<tr>
<td height="23" colspan="4" class="legenda"> </td>
<td class="legenda"><strong>CARTÃO :</strong></td>
<td class="legenda"><strong><%=v_cartao%></strong></td>
</tr>
</table>
<%
'objRS.MoveNext
'WEND
%>
Nunca vi um If tão complicado
veja assim
formapagamento = Lcase(Trim(Cstr("" & objRS("formapagamento"))))
>
veja assim
formapagamento = Lcase(Trim(Cstr("" & objRS("formapagamento"))))
Ok, legal agora deu certinho o valor foi para a variavel correta
Porem ele so me trouxe o valor do CARTAO,
O Dinheiro e o Cheque não veio... eu tenho que adicionar um While ?
<!--#include file="Sqlconexao.asp"-->
<link href="../seg_asp/css/css.css" rel="stylesheet" type="text/css" />
<%
sql = " SELECT CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, Sum(CONF_RESUMO_CAIXA.VALOR) AS 'total', CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro FROM HANDBOOK.dbo.CONF_RESUMO_CAIXA CONF_RESUMO_CAIXA GROUP BY CONF_RESUMO_CAIXA.DATA, CONF_RESUMO_CAIXA.loja, CONF_RESUMO_CAIXA.formapagamento, CONF_RESUMO_CAIXA.L_visa_sub, CONF_RESUMO_CAIXA.L_master_sub, CONF_RESUMO_CAIXA.L_hiper_sub, CONF_RESUMO_CAIXA.L_american_sub, CONF_RESUMO_CAIXA.L_ch_avista, CONF_RESUMO_CAIXA.L_ch_pre, CONF_RESUMO_CAIXA.L_dinheiro HAVING (CONF_RESUMO_CAIXA.DATA={ts '2009-10-22 00:00:00'})"
set objRS = conexao.execute(sql) 'executa a cláusula sql
formapagamento = Lcase(Trim(Cstr("" & objRS("formapagamento"))))
'formapagamento = Cstr("" & objRS("formapagamento"))
if formapagamento="dinheiro" then
v_dinheiro= (objRS("total"))
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= (objRS("total"))
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= (objRS("total"))
else
v_cartao="0,00"
end if
%>
<table width="667" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70" class="legenda"><strong>LOJA</strong></td>
<td width="259" class="legenda"><span class="legenda"><%=objRS("loja")%></span></td>
<td width="210" class="legenda"><strong>DATA</strong></td>
<td width="128" class="legenda"><span class="legenda"><%=objRS("DATA")%></span></td>
</tr>
</table>
<br>
<table width="667" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" height="23" class="legenda"> </td>
<td width="12%" class="legenda"><strong>DINHEIRO : </strong></td>
<td width="78%" class="legenda"><strong><%=v_dinheiro%></strong></td>
</tr>
<tr>
<td height="23" class="legenda"> </td>
<td class="legenda"><strong>CHEQUE : </strong></td>
<td class="legenda"><strong><%=v_cheque%></strong></td>
</tr>
<tr>
<td height="23" class="legenda"> </td>
<td class="legenda"><strong>CARTÃO :</strong></td>
<td class="legenda"><strong><%=v_cartao%></strong></td>
</tr>
</table>
desta forma que está ele não estaria lendo if por if e quandando em cada variavel ?
ai já não sei pois você quem sabe o retorno da consulta e pra que servirá. se fizer o While terá que mudar o Html pois nele mostra o nome da loja e a data
>
ai já não sei pois você quem sabe o retorno da consulta e pra que servirá. se fizer o While terá que mudar o Html pois nele mostra o nome da loja e a data
É assim essa consulta será um consulta de comparação tipo...
a loja vai me digitar o fechamento de caixa deles...
o eu sistema vai me mostrar tudo o que foi vendido e qual a condição de magamento...
o que foi feito até agora foi o que o sistema me gera então a minha ideia é fazer da seguinte forma...
=====================================================================
LOJA:.X...................................DATA.../.../...
CONDIÇÃO...VALOR_SISTEMA......VALOR_LOJA.......DIFERENÇA.
.........................................................
DINHEIRO... 100,00 ............ 50,00 .......... 50,00 ..
CHEQUE..... 100,00 ............ 50,00 .......... 50,00 ..
CARTÃO..... 100,00 ............ 50,00 .......... 50,00 ..
LOJA:.Y...................................DATA.../.../...
CONDIÇÃO...VALOR_SISTEMA......VALOR_LOJA.......DIFERENÇA.
.........................................................
DINHEIRO... 150,00 ............ 50,00 ......... 100,00 ..
CHEQUE..... 150,00 ............ 50,00 ......... 100,00 ..
CARTÃO..... 150,00 ............ 50,00 ......... 100,00 ..
=====================================================================
O Valor_Sistema é o total que estamos colocando agora
o valor da loja é o que eu pretendo fazer depois
Entendeu qual a minha ideia....
Estou no caminho correto ?
Obrigado pelo força...
é por ai o caminho, mas acho que vai facilitar se você colocar 2 sql. um pra trazer as lojas e outro(o que te ajudei acima) que calculara de cada loja. ai você faz um While das lojas e dentro o While dos valores
Galera estou tentando fazer assim mas não está rolando
<span class="legenda">
<%
if not ObjRS.eof then
loja = empty
formapagamento = empty
while not conf_resumo_caixa.eof
if loja <> ObjRS("loja") then
loja = ObjRS("loja")
response.write "Loja " & loja & "<br />"
end if
%>
<%=ObjRS("formapagamento")%><br />
<%
rs.movenext
wend
else
end if
%>
A logica estaria certo ?
está aparecendo em branco.
Galera eu fiz assim e deu quase certo.
Galera eu refiz e está quase dando certo
while loja<>"loja"
response.write ObjRS("loja")&"<br>"
While formapagamento="formapagamento"
response.write ObjRS("total")&"<br>"
ObjRS.movenext
wend
wendele geraalgum erro !?!?!
>
ele geraalgum erro !?!?!
Então eu fiz assim
while loja<>"loja"
response.write ObjRS("loja")&"<br>"
While formapagamento<>"formapagamento"
response.write ObjRS("formapagamento")&" - "&ObjRS("total")&"<br>"
ObjRS.movenext
wendE está aparecendo assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
E deveria aparecer assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
MORUMBI
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
Não esta me separando por loja.
consegui resolver assim:
While not objrs.eof
if loja<>objrs("loja") then
loja=objrs("loja")
response.Write("<BR><BR>"&loja&"<BR>")
end if
if formapagamento="dinheiro" then
v_dinheiro= objRS("total")
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= objRS("total")
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= objRS("total")
else
v_cartao="0,00"
end if
response.Write v_dinheiro&"<br>"
response.Write v_cartao&"<br>"
response.Write v_cheque&"<br>"
ObjRS.movenext
wend
Porem não estou conseguindo alimentar as variaveis.
e mostrar as mesmas...
você ker apenas k o layout fike assim:
E está aparecendo assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
E deveria aparecer assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
MORUMBI
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
você colocar no loop um <br> para dar a kebra de linha...
>
você ker apenas k o layout fike assim:
E está aparecendo assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
E deveria aparecer assim
CENTER NORTE (NOVA)
CARTAO - 11750,2
CHEQUE - 342,43
DINHEIRO - 2742,24
VALE FUNCIONARIO - 533,2
MORUMBI
CARTAO - 6945,6
CHEQUE - 706,91
DINHEIRO - 603,89
VALE FUNCIONARIO - 431,22
você colocar no loop um <br> para dar a kebra de linha...
Eu já tenho os campos
Dinheiro
Cheque
Cartão
Vale Funcionario
E seria algo assim
LOJA
Dinheiro: <% v_dinheiro %>
Cheque: <% v_cheque %>
Cartao: <% v_cartao %>
Vale Funcinairo: <% v_v_Funcionario %>
LOJA2
Dinheiro: <% v_dinheiro %>
Cheque: <% v_cheque %>
Cartao: <% v_cartao %>
Vale Funcinairo: <% v_v_Funcionario %>
Entendeu, é que da maneira que está ele vai colocar da maneira que o loop encontra
e eu queria colocar as informações na variavel em uma determinada ordem que eu mesmo possa definir.
mas você apenas recuperando os dados e inserindo em seu layout especifico, você naun consegue,
apenas colocando ele no loop, sendo o nome da loja primeiro e depois as outras info...
Eu coloquei porem aparece da seguinte forma...
CENTER NORTE (NOVA)
Dinheiro: 0,00
CARTÃO: 11750,2
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 342,43
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 2742,24
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 533,2
CHEQUE: 0,00
MORUMBI
Dinheiro: 0,00
CARTÃO: 6945,6
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 706,91
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 603,89
CHEQUE: 0,00
Dinheiro: 0,00
CARTÃO: 431,22
CHEQUE: 0,00
formapagamento = Lcase(Trim(Cstr("" & objRS("formapagamento"))))
While not objrs.eof
if loja<>objrs("loja") then
loja=objrs("loja")
response.Write("<BR><BR>"&loja&"<BR>")
end if
if formapagamento="dinheiro" then
v_dinheiro= objRS("total")
else
v_dinheiro="0,00"
end if
if formapagamento="cheque" then
v_cheque= objRS("total")
else
v_cheque="0,00"
end if
if formapagamento="cartao" then
v_cartao= objRS("total")
else
v_cartao="0,00"
end if
response.Write ("Dinheiro: "&v_dinheiro&"<br>")
response.Write ("CARTÃO: "&v_cartao&"<br>")
response.Write ("CHEQUE: "&v_cheque&"<br>")
ObjRS.movenext
wend
cade a variavel com o valor da condição formapagamento???
testa forma o valor formapagamento no ifelse fica nulo, não sendo igual a, dinheiro, cheque ou cartão... com isso sendo diferentes ele vai para a condição "0,00" que no caso esta nos valores das variaveis do else falso.