How to Reverse Settlement Documents

Asked

Viewed 99 times

0

I have a development in dotnet that consists of a document integrator from another system in Spring V9 and I intend to do the reversal of settlement documents (REC) for the respective Estorno document (DEV).

DEV is a new settlement document that is configured as a REC chargeback document.

I would point out that the documents are integrated online in the accounts and linked to the treasury.

Example of what I am running but in VBA (working this way then will be carry to the Dotnet project):

Public Sub testeEstorno()

Dim DocEstorno As New GcpBEDocumentoLiq
Dim docliq As New GcpBEDocumentoLiq

DocEstorno.Tipodoc = "DEV"
DocEstorno.Serie = "2019"
DocEstorno.DataIntroducao = CDate("01/07/2019")
DocEstorno.DataDoc = CDate("01/07/2019")
DocEstorno.TipoEntidade = "C"
DocEstorno.Entidade = "00055879"

DocEstorno.ValorRec = docliq.ValorRec
DocEstorno.docliq = docliq.id

BSO.Comercial.Liquidacoes.PreencheDadosRelacionados DocEstorno

'ID do REC
Set docliq = BSO.Comercial.Liquidacoes.EditaID("1128DD3F-8D2D-11E9-A3A9-DC4A3EECC8FC")


BSO.Comercial.Liquidacoes.EstornaDocumentoLiquidacao docliq.id, DocEstorno, "005"
BSO.Comercial.Liquidacoes.Actualiza DocEstorno
End Sub

Error:

inserir a descrição da imagem aqui

1 answer

2


To reverse a settlement document by Spring engines, you need to use the method Fillingsdocumentmentestorno instead of the Fillers. The method Fillingsdocumentmentestorno need to receive the ID of the document you will be deleting, type of chargeback document, series and the reason for chargeback.

Follow a simple example where I am hindering a RE with an ERE:

Dim DocEstorno As New GcpBEDocumentoLiq

Set DocEstorno = BSO.Comercial.Liquidacoes.PreencheDadosDocumentoEstorno("B7EC09A2-5A04-11E9-B6A7-94C6912FA392", "ERE", "2019", "005", "teste")

BSO.Comercial.Liquidacoes.EstornaDocumentoLiquidacao "B7EC09A2-5A04-11E9-B6A7-94C6912FA392", DocEstorno, "005"
  • 1

    Thank you very much colleague, it worked perfectly. Good job.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.