Jump to content
Fivewin Brasil

Rejeição 904: Informado indevidamente campo valor de pagamento


sistem

Recommended Posts

Eu faço assim:

 

Function LoadPagamento(oNfe,vNdoc,nTpag,vFinfe,Pag_Troco)
Memvar Tot_Paga
Local oItem,vCnpj:=Space(14),vArea,N:=0
********************************************************************************
Abre_Nfe(.T.)
vArea := Select(); Forpag->(DbGoTop() )
If Forpag->(DbSetOrder(1),DbSeek(vNdoc),Found() )
   If ForPag->Ndoc != vNdoc
      vNdoc := Forpag->Ndoc
   Endif   
   Do While Forpag->Ndoc==vNdoc
      vCnpj := Forpag->Cnpj
      oItem := TVoNfePag()
      N := N+1
      WITH OBJECT oItem
         If N==1
//          :indPag := nTpag
            :tPag  := Forpag->Fpag
            :vPag  := Forpag->Vpag
            Endif       
            If !Empty(vCnpj)
               Cartao->(DbSetOrder(1),DbSeek(vCnpj),Found() )
            :tPag  := Forpag->Fpag
            :vPag  := Forpag->Vpag       
               :CNPJ  := vCnpj
               :tBand := Cartao->Band
               :cAut  := Forpag->Auto
//               :vTroco:= Pag_Troco
            Endif
            oNfe:addItem(oItem)
        END
        Forpag->(DbSkip() )
        Tot_Paga += oItem:vPag
    Enddo
Else
   oItem := TVoNfePag()
   WITH Object oItem
//    :indPag := nTpag
      :tPag   := "90"
      :vPag   := 0
   End
    oNfe:AddItem(oItem)
Endif
********************************************************************************
Return(NIL)        // Fim da proc LoadPagamento()
********************************************************************************               
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...