-1
Good afternoon, I’m having a problem turning an ECF, when adding the serial numbers to the line. If I add only 1 it works perfectly... What I’m doing wrong?
Dim numeroserie As New GcpBENumeroSerie
Dim numerosserie As New GcpBENumerosSerie
For Each dtrow As DataRow In Session("dtNumSerie").Select("NumLinha = '" & numlinha & "'")
numeroserie.Manual = 1
numeroserie.Modulo = "C"
numeroserie.NumeroSerie = dtrow("NumSerie")
numerosserie.Insere(numeroserie)
Next
objDocCompra.Linhas(objDocCompra.Linhas.NumItens).NumerosSerie = numerosserie
I think it’s because of the outside instance of
for
put the lineDim numeroserie As New GcpBENumeroSerie
within thefor
to be a new instance always, test!– novic
Solved, thank you!
– Bruno Gomes