Help with SO_Invoice_bus

I'm trying to create a Sale Invoice via BOI and not doing something right, but not sure what.  When I nSetKey, I get this error "You cannot use a credit card payment when credit card payment type is not set up."

Thanks!

Parents Reply Children
  • 0 in reply to Sean Gahan

    Are you by chance importing serial numbers?  if so do you have scripting you can share?  we have a script for the so invoice but just added needing to be able to import serial numbers.

  • 0 in reply to Bvulliamy

    No, I'm not importing Serial numbers, but I am importing comments with the order items.  Here is an example of  adding comments:

    retVal = oOrders.oLines.nAddLine()
    retVal = oOrders.oLines.nSetValue("ItemCode$", "/C")
    retVal = oOrders.oLines.nSetValue("CommentText$", SO.Notes)
    retVal = oOrders.oLines.nWrite()

    By the way my initial error was setting the KeyValue is zero filled.  Looks like this:

    retVal = oOrders.nSetKeyValue("INVOICENO$", ZeroFillInv(SO.SONumber.ToString()))
    retVal = oOrders.nSetKey()
    retVal = oOrders.nSetValue("ARDivisionNo$", "00")
    retVal = oOrders.nSetValue("CustomerNo$", SO.CustomerID)
    retVal = oOrders.nSetValue("INVOICEDATE$", SageDate(SO.OrderDate))

  • 0 in reply to Sean Gahan

    thanks for sharing