Skip to Content
author's profile photo Former Member
Former Member

DI: Add more than one serial numbers in Invoice

I have a problem when I try to invoice but of an item that is forced to select its series numbers. The first one item herself invoice well, the problem comes when in the same invoice I try to sell but of an item of this category, seems that not this taking correctly the itemcode.

When i tried add an invoice the next error shows myself:

[OSRI] , '[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'ItemCode', table 'SBODemo_US.dbo.OSRI'; column does not allow nulls. UPDATE fails.'

The following is part of code where I add my series numbers to my document lines

Set objSerial = RetrieveSerial(objDetail.ItemCode)

If objSerial.RecordCount > 0 Then

blnTruncate = True

For intQuantity = 1 To objDetail.Quantity

If intQuantity > 1 Then


objSerialNumbers.SetCurrentLine (intQuantity - 1)

End If

objSerialNumbers.BatchID = objSerial.Fields("U_XAMPBATC").Value

If objSerial.Fields("U_XAMPEXPD").Value <> "" Then

objSerialNumbers.ExpiryDate = CDate(objSerial.Fields("U_XAMPEXPD").Value)

End If

objSerialNumbers.InternalSerialNumber = objSerial.Fields("U_XAMPINTS").Value

objSerialNumbers.Location = objSerial.Fields("U_XAMPLOCA").Value

If objSerial.Fields("U_XAMPMAND").Value <> "" Then

objSerialNumbers.ManufactureDate = CDate(objSerial.Fields("U_XAMPMAND").Value)

End If

objSerialNumbers.ManufacturerSerialNumber = objSerial.Fields("U_XAMPMANS").Value

If objSerial.Fields("U_XAMPADMD").Value <> "" Then

objSerialNumbers.ReceptionDate = CDate(objSerial.Fields("U_XAMPADMD").Value)

End If

objSerialNumbers.SystemSerialNumber = objSerial.Fields("U_XAMPSYSS").Value

If objSerial.Fields("U_XAMPWARS").Value <> "" Then

objSerialNumbers.WarrantyEnd = CDate(objSerial.Fields("U_XAMPWARS").Value)

End If

If objSerial.Fields("U_XAMPWARE").Value <> "" Then

objSerialNumbers.WarrantyStart = CDate(objSerial.Fields("U_XAMPWARE").Value)

End If

objSerialNumbers.Notes = objSerial.Fields("U_XAMPNOTE").Value



End If

Thanks for the help...

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2004 at 08:49 PM

    we had a bug in version 6.5 when adding more than one serial number to invoice this bug was fixed in one of the patches

    Add comment
    10|10000 characters needed characters exceeded