@valter_kettner,
Analisando nos Fontes, ela só ficaria Pendente, se ela não tivesse sido confirmada...
procedure TFormPrincipal.AtualizarPagamentosVendaNaInterface;
var
i, ARow: Integer;
AResp: TACBrTEFResp;
begin
sgPagamentos.RowCount := 1;
for i := 0 to Venda.Pagamentos.Count-1 do
begin
ARow := sgPagamentos.RowCount;
sgPagamentos.RowCount := sgPagamentos.RowCount + 1;
with Venda.Pagamentos[i] do
begin
if not Cancelada then
begin
AResp := AcharTransacaoTEFPendente(i);
if Assigned(AResp) then
Confirmada := AResp.CNFEnviado; // <------------- AQUI -------------
end;
sgPagamentos.Cells[0, ARow] := FormatFloat('000', ARow);
sgPagamentos.Cells[1, ARow] := TipoPagamento + ' - ' + DescricaoTipoPagamento(TipoPagamento);
sgPagamentos.Cells[2, ARow] := FormatFloatBr(ValorPago);
sgPagamentos.Cells[3, ARow] := NSU;
sgPagamentos.Cells[4, ARow] := Rede;
sgPagamentos.Cells[5, ARow] := ifthen(Cancelada, 'Cancelada', ifthen(Confirmada, 'Confirmada', 'Pendente'));
sgPagamentos.Cells[6, ARow] := RedeCNPJ;
end;
end;
AtualizarTotaisVendaNaInterface;
end;
Mas no seu Log, temos o envio do CNF...
Consegue ir com o Debug e verificar se ele entra nesse IF
if not Cancelada then
begin
AResp := AcharTransacaoTEFPendente(i);
if Assigned(AResp) then
Confirmada := AResp.CNFEnviado;
end;
- Se AResp retornar Nulo de AcharTransacaoTEFPendente, pode ser o problema...