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.Add

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

objSerial.MoveNext

Next

End If

Thanks for the help...

Add a comment
10|10000 characters needed characters exceeded

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.