SalesOrder Class

The SalesOrder Class represents a sales order. It is the business logic class for sales orders and invoices. This class is used to create, read, edit, delete and process sales orders.

Namespace:  JiwaFinancials.Jiwa.JiwaSales.SalesOrder
Assembly:  JiwaSales (in JiwaSales.dll)

Syntax


Examples


Log onto Jiwa, and retrieve the first sales order, ordered by InvoiceNo.
VB.NET
Imports JiwaFinancials.Jiwa
  Public Class TestClass

     Private Sub ReadFirstSalesOrder()
         Dim jiwaApplicationManager As JiwaApplication.Manager

         JiwaApplication.Manager.Instance.Logon("JiwaMike", "JiwaDemo", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "password")

         Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaSales.SalesOrder.SalesOrder)()
         salesOrder.Find(JiwaApplication.IJiwaNavigable.ReadModes.First, "SO_Main.InvoiceNo", "", "")
         Console.WriteLine(String.Format("First Sales order is : {0}", salesOrder.InvoiceNo))

         JiwaApplication.Manager.Instance.LogOff()
     End Sub
  End Class

Examples


Log onto Jiwa, and Create a new sales order, add one item to the order and set the quantity ordered then save.
VB.NET
Imports JiwaFinancials.Jiwa
  Public Class TestClass

     Private Sub CreateNewSalesOrder()
         Dim jiwaApplicationManager As JiwaApplication.Manager

         JiwaApplication.Manager.Instance.Logon("JiwaMike", "JiwaDemo", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "password")

         Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaSales.SalesOrder.SalesOrder)()
         salesOrder.CreateNew(JiwaSales.SalesOrder.SalesOrder.NewSalesOrderTypes.e_NewSalesOrder, "1001", False)
         Dim lkey As String = ""
         salesOrder.SalesOrderLines.AddInventoryItem("1170", JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes.e_SalesOrderLinePartNo, lkey)
         salesOrder.SalesOrderLines(lkey).QuantityOrdered = 5
         salesOrder.Save()

         Console.WriteLine(String.Format("New Invoice No. is : {0}", salesOrder.InvoiceNo))

         JiwaApplication.Manager.Instance.LogOff()
     End Sub
  End Class

Examples


Reads a sales order and processes it.
VB.NET
Imports JiwaFinancials.Jiwa
  Public Class TestClass

     Private Sub ProcessSalesOrder(ByVal InvoiceID As String)
         Dim jiwaApplicationManager As JiwaApplication.Manager

         JiwaApplication.Manager.Instance.Logon("JiwaMike", "JiwaDemo", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "password")

         Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaSales.SalesOrder.SalesOrder)()
         salesOrder.Read(InvoiceID)

         salesOrder.Process()
         Console.WriteLine(String.Format("Invoice No. {0} is now processed.", salesOrder.InvoiceNo))

         JiwaApplication.Manager.Instance.LogOff()
     End Sub
  End Class

Inheritance Hierarchy


Object
  MarshalByRefObject
    JiwaFinancials.Jiwa.JiwaApplication.BusinessLogic..::..Maintenance
      JiwaFinancials.Jiwa.JiwaSales.SalesOrder..::..SalesOrder