﻿<?xml version="1.0" encoding="utf-16"?>
<JiwaDocument xmlns:jiwa="http://www.jiwa.com.au/xml/schemas" Type="JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin">
  <RecID>3c0c0f5b-b68b-4952-b6cc-2baa883b5dff</RecID>
  <Name>Sales Orders Email after Processed Excel</Name>
  <Description>Just for selected debtors who need their invoices as Excel when processed.</Description>
  <IsEnabled>true</IsEnabled>
  <IsIsolatedToOwnAppDomain>false</IsIsolatedToOwnAppDomain>
  <ExecutionOrder>0</ExecutionOrder>
  <Author>Danny Costa</Author>
  <Version />
  <Code>Imports JiwaFinancials.Jiwa
Imports Microsoft.VisualBasic
Imports System.Collections.Generic
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports System.Drawing
Imports System.Data
Imports System.Reflection
Imports JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder 
Imports JiwaFinancials.Jiwa.JiwaSales

Public Class FormPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaFormPlugin
	Dim _salesOrderForm As JiwaSalesUI.SalesOrder.SalesOrderEntryForm
    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

	Dim DebtorsWhoWantInvoicesAsExcel As New List(Of String)
	
	
    Public Sub SetupBeforeHandlers(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.SetupBeforeHandlers
    End Sub

    Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
			DebtorsWhoWantInvoicesAsExcel.Add("1001")
			DebtorsWhoWantInvoicesAsExcel.Add("1002")
			DebtorsWhoWantInvoicesAsExcel.Add("1006")
				
		
		If TypeOf JiwaForm Is JiwaSalesUI.SalesOrder.SalesOrderEntryForm Then
			Dim salesOrderForm As JiwaSalesUI.SalesOrder.SalesOrderEntryForm = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)
			_salesOrderForm = salesOrderForm
			AddHandler salesOrderForm.SalesOrder.Processed, AddressOf salesOrder_Processed
			AddHandler salesOrderForm.SalesOrder.CreateEnd, AddressOf salesOrder_CreateEnd_CheckEmail
		End If
		
		If TypeOf JiwaForm Is JiwaSalesUI.BatchProcessing.BatchProcess Then
			Dim salesOrdBatchProcessForm As JiwaSalesUI.BatchProcessing.BatchProcess = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)
			AddHandler salesOrdBatchProcessForm.BatchProcess.ProcessedCandidate, AddressOf salesOrderBatch_Processed
			
		End If
			
    End Sub
	

	
	
	Public Sub salesOrder_Processed(sender As Object, e As System.EventArgs)
		'System.Diagnostics.Debugger.Launch()
		Dim salesOrder As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder = DirectCast(sender, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)
		If DebtorsWhoWantInvoicesAsExcel.Contains(salesOrder.Debtor.AccountNo) Then
			'MessageBox.Show("The debtor is in the list")
			If salesOrder.Debtor.IsCashOnly = False And salesOrder.CustomFieldValues.ItemFromSettingName("ProcEmail").Contents  = "True" Then
				For Each salesOrderReport As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport In salesOrder.SalesOrderReports 			
					If salesOrderReport.Name = "Invoice" AndAlso salesOrderReport.BillingType = salesOrder.BillType  Then    '&lt;---  The description in Sales Order, Printer Setup
						Dim candidateReportsToEmail As New JiwaApplication.JiwaCollection(Of JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport)
	                    candidateReportsToEmail.Add(salesOrderReport)
						EmailInvoice(salesOrder.Client, candidateReportsToEmail)
						'Exit For
					End If									
				Next
			End If
		End If	
	End Sub	

	Public Sub salesOrderBatch_Processed(candidate As JiwaSales.BatchProcessing.ProcessCandidate)
		If DebtorsWhoWantInvoicesAsExcel.Contains(candidate.SalesOrder.Debtor.AccountNo) Then
			'in the list		
			If candidate.salesOrder.Debtor.IsCashOnly = False And candidate.salesOrder.CustomFieldValues.ItemFromSettingName("ProcEmail").Contents  = "True" Then
				For Each salesOrderReport As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport In candidate.salesOrder.SalesOrderReports 			
					If salesOrderReport.Name = "Invoice" AndAlso salesOrderReport.BillingType = candidate.salesOrder.BillType  Then    '&lt;---  The description in Sales Order, Printer Setup
						Dim candidateReportsToEmail As New JiwaApplication.JiwaCollection(Of JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport)
	                    candidateReportsToEmail.Add(salesOrderReport)
						'EmailInvoice(salesOrder.Client, candidateReportsToEmail)
						'Exit For

				        If candidateReportsToEmail.Count = 0 Then
				            Throw New System.Exception("There are no reports that are applicable to this particular invoice.  Are there lines to deliver?")
				        End If
						
				        ' load print selection dialog        
						Dim emailReportDialog As JiwaSalesUI.SalesOrder.EmailReport = candidate.Manager.DialogFactory.CreateDialog(Of JiwaSalesUI.SalesOrder.EmailReport)(New Object() {candidateReportsToEmail}, _salesOrderForm, "Sales Order Entry")
						emailReportDialog.Visible = False
						Dim ExportFormatType As CrystalDecisions.Shared.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
						Dim exportFormatTypeNew As CrystalDecisions.Shared.ExportFormatType = ExportFormatType
						exportFormatTypeNew = CrystalDecisions.Shared.ExportFormatType.Excel

				        emailReportDialog.NameToGiveAttachment = "Your invoice-" &amp; candidate.InvoiceNo    '&lt;-  You may want to change this attachment name
						emailReportDialog.EmailTo = candidate.SalesOrder.Debtor.Email

						emailReportDialog.From = Microsoft.VisualBasic.Strings.Chr(34) &amp; Microsoft.VisualBasic.Strings.Replace(candidate.Manager.Staff.EmailDisplayName, "@", " ") &amp; Microsoft.VisualBasic.Strings.Chr(34) &amp; " &lt;" &amp; candidate.Manager.Staff.EmailAddress &amp; "&gt;"
				        emailReportDialog.Subject = "Invoice/CreditNo: " &amp; candidate.InvoiceNo &amp; " from My Company"
				        emailReportDialog.SelectedReport = candidateReportsToEmail(1)   '&lt;---   This selects which report to email from the list of CandidateReports passed into the Sub.
							
						emailReportDialog.Message = "Dear Sir/Madam" &amp; "," &amp; System.Environment.NewLine _
								&amp; System.Environment.NewLine _
								&amp; "Please find invoice/credit " &amp; candidate.InvoiceNo &amp; " attached." &amp; System.Environment.NewLine _
								&amp; System.Environment.NewLine _
								&amp; "Kind Regards, " &amp; System.Environment.NewLine _
								&amp; "Customer Service" &amp; System.Environment.NewLine _

				' The Email method of the sales order business logic doesn't pass along the ExportFormatType to the Manager.EmailReportDirect (this is a bug - DEV-8543)
				' so we just replicate what that does instead until the bug is fixed.
	            'salesOrderForm.SalesOrder.Email(emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, exportFormatTypeNew)
				
				Email(candidate.SalesOrder, emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, exportFormatTypeNew)
				Email(candidate.SalesOrder, emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, exportFormatType)
												
				'candidate.SalesOrder.Email(emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
						
						
					End If									
				Next
			End If
		End If
	End Sub

	Private Sub EmailInvoice(ByRef SalesOrderForm As JiwaSalesUI.SalesOrder.SalesOrderEntryForm, candidateReportsToEmail As JiwaApplication.JiwaCollection(Of JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport), Optional ByVal ExportFormatType As CrystalDecisions.Shared.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)		
		SalesOrderForm.Save()
        If salesOrderForm.GetAbstractPermission("sales order - email invoices") &lt;&gt; JiwaApplication.Security.UserGroup.AccessLevels.Allow Then
            Throw New System.Exception("You do not have sufficient priveleges to email an invoice.")
        End If

        If salesOrderForm.SalesOrder.SalesOrderReports.Count = 0 Then
            If Microsoft.VisualBasic.Interaction.MsgBox("No sales order reports have been defined." &amp; System.Environment.NewLine &amp; System.Environment.NewLine &amp; "Would you like to set some up now ?", Microsoft.VisualBasic.MsgBoxStyle.YesNo , "No Sales Order Reports Configured") = Microsoft.VisualBasic.MsgBoxResult.Yes Then
                salesOrderForm.PrinterSetup()
            Else
                Throw New JiwaApplication.Exceptions.ClientCancelledException
            End If
        End If

        If candidateReportsToEmail.Count = 0 Then
            Throw New System.Exception("There are no reports that are applicable to this particular invoice.  Are there lines to deliver?")
        End If
        ' load print selection dialog        
		Dim emailReportDialog As JiwaSalesUI.SalesOrder.EmailReport = salesOrderForm.Manager.DialogFactory.CreateDialog(Of JiwaSalesUI.SalesOrder.EmailReport)(New Object() {candidateReportsToEmail}, SalesOrderForm, "Sales Order Entry")
		emailReportDialog.Visible = False
        emailReportDialog.NameToGiveAttachment = "Your invoice-" &amp; salesOrderForm.SalesOrder.InvoiceNo    '&lt;-  You may want to change this attachment name
		emailReportDialog.EmailTo = salesOrderForm.SalesOrder.Debtor.Email
        'emailReportDialog.EmailTo = GetEmailAddress(salesOrderForm.SalesOrder.Debtor.RecID, "Email Invoice", salesOrderForm.Manager)
		'emailReportDialog.CC = GetEmailAddress(salesOrderForm.SalesOrder.Debtor.RecID, "CC Email Invoice", salesOrderForm.Manager)
        emailReportDialog.From = Microsoft.VisualBasic.Strings.Chr(34) &amp; Microsoft.VisualBasic.Strings.Replace(salesOrderForm.Manager.Staff.EmailDisplayName, "@", " ") &amp; Microsoft.VisualBasic.Strings.Chr(34) &amp; " &lt;" &amp; salesOrderForm.Manager.Staff.EmailAddress &amp; "&gt;"
        emailReportDialog.Subject = "Invoice/CreditNo: " &amp; salesOrderForm.SalesOrder.InvoiceNo &amp; " from My Company"   '&lt;-  You may want to change the Subject text
        emailReportDialog.SelectedReport = candidateReportsToEmail(1)   '&lt;---   This selects which report to email from the list of CandidateReports passed into the Sub.
			
		emailReportDialog.Message = "Dear Sir/Madam" &amp; "," &amp; System.Environment.NewLine _
				&amp; System.Environment.NewLine _
				&amp; "Please find invoice/credit " &amp; salesOrderForm.SalesOrder.InvoiceNo &amp; " attached." &amp; System.Environment.NewLine _
				&amp; System.Environment.NewLine _
				&amp; "Kind Regards, " &amp; System.Environment.NewLine _
				&amp; "Customer Service" &amp; System.Environment.NewLine _
								
		Dim exportFormatTypeNew As CrystalDecisions.Shared.ExportFormatType = ExportFormatType
		exportFormatTypeNew = CrystalDecisions.Shared.ExportFormatType.Excel

        'salesOrderForm.SalesOrder.Email(emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, ExportFormatTypeNew)
		Email(salesOrderForm.SalesOrder, emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, exportFormatTypeNew)
		Email(salesOrderForm.SalesOrder, emailReportDialog.SelectedReport, emailReportDialog.NameToGiveAttachment, emailReportDialog.From, emailReportDialog.EmailTo, emailReportDialog.RequestReadReceipt, emailReportDialog.Subject, emailReportDialog.CC, emailReportDialog.BCC, emailReportDialog.Message, exportFormatType)

    End Sub

	Public Sub salesOrder_CreateEnd_CheckEmail(sender As Object, e As System.EventArgs)
		Dim salesOrder As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder = DirectCast(sender, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)
		'Set the checkbox to email sales orders to ticked
		salesOrder.CustomFieldValues.ItemFromSettingName("ProcEmail").Contents = "True"
		
		If salesOrder.Debtor.Email = "" Then
			salesOrder.CustomFieldValues.ItemFromSettingName("ProcEmail").Contents = "False"
		End If

	End Sub

	Public Sub Email(ByVal SalesOrder As JiwaSales.SalesOrder.SalesOrder, ByVal Report As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport, ByVal NameToGiveAttachment As String, ByVal EmailFrom As String, ByVal EmailTo As String, ByVal RequestReadReceipt As Boolean, ByVal Subject As String, ByVal CC As String, ByVal BCC As String, ByVal Message As String, Optional ByVal ExportFormatType As CrystalDecisions.Shared.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Optional ReportFormulaTokenDictionary As Dictionary(Of String, Object) = Nothing)
		If SalesOrder.InsertFlag OrElse SalesOrder.ChangeFlag Then
			Throw New System.Exception("Cannot email a sales order until changes have been saved.")
		End If

		Dim switchPermission As JiwaApplication.Security.UserGroup.AccessLevels = SalesOrder.Manager.Staff.GetAbstractPermission("JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm", "Email")
		Select Case switchPermission
			Case JiwaApplication.Security.UserGroup.AccessLevels.Undefined, JiwaApplication.Security.UserGroup.AccessLevels.Disallow
				Throw New System.Exception("You do not have sufficient priveleges to email an invoice.")
		End Select

		SalesOrder.Manager.ResetReportSelectionFormulaTokens()
		SalesOrder.Manager.AddReportSelectionFormulaToken("{@Pass_CurrentHistNo}", SalesOrder.Manager.Database.FormatNumber(Format(SalesOrder.SelectedHistoryNo, "00")))
		SalesOrder.Manager.AddReportSelectionFormulaToken("{@Pass_InvoiceNo}", SalesOrder.InvoiceNo)
		SalesOrder.Manager.AddReportSelectionFormulaToken("{@Pass_SP_InvoiceHistoryID}", SalesOrder.SalesOrderHistorys(SalesOrder.SelectedHistoryNo).RecID)

		If ReportFormulaTokenDictionary IsNot Nothing Then
			For Each dictionaryEntry As KeyValuePair(Of String, Object) In ReportFormulaTokenDictionary
				SalesOrder.Manager.AddReportSelectionFormulaToken(dictionaryEntry.Key, dictionaryEntry.Value)
			Next
		End If

		SalesOrder.OnEmailing(Report, NameToGiveAttachment, EmailFrom, EmailTo, RequestReadReceipt, Subject, CC, BCC, Message)

		' Send the email

		' See if we email zero delivered invoices
		If SalesOrder.SalesOrderLines.TotalDeliveredQuantity = 0 AndAlso SalesOrder.SystemSettings.EmailInvoicesWithZeroQuantityDel = False AndAlso SalesOrder.BillType = SalesOrderBillTypes.e_SalesOrderShipAndBill Then
			Exit Sub
		End If

		Dim EM_Main_RecID As String = ""
		Dim SelectionFormula As String = ""

		SalesOrder.Manager.EmailReportDirect(Report.ReportDefinition.Report, EmailFrom, EmailTo, Subject, CC, BCC, Message, NameToGiveAttachment, EM_Main_RecID, SelectionFormula, RequestReadReceipt, SalesOrder.InvoiceID, "Sales Order", SalesOrder.InvoiceNo, JiwaApplication.JiwaSearch.clsSearch.SearchModes.jswSalesOrder, ExportFormatType, "JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm")

		' Add to email log.
		Dim emailLog As JiwaSales.SalesOrder.EmailLog = SalesOrder.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaSales.SalesOrder.EmailLog)
		emailLog.ReportType = Report.DocumentType
		emailLog.EM_Main_RecID = EM_Main_RecID
		emailLog.BCC = BCC
		emailLog.Body = Message
		emailLog.CC = CC
		emailLog.EmailDateTime = Now
		emailLog.EmailTo = EmailTo
		emailLog.From = EmailFrom
		emailLog.InvoiceHistoryID = SalesOrder.SalesOrderHistorys(SalesOrder.SelectedHistoryNo).RecID
		emailLog.InvoiceID = SalesOrder.InvoiceID
		emailLog.RequestReadReceipt = RequestReadReceipt
		emailLog.Subject = Subject
		emailLog.Staff = SalesOrder.Staff
		emailLog.Attachments = NameToGiveAttachment

		SalesOrder.EmailLogCollection.Add(emailLog)

		Try
			SalesOrder.OnEmailed(Report, NameToGiveAttachment, EmailFrom, EmailTo, RequestReadReceipt, Subject, CC, BCC, Message)
		Finally
			' SalesOrder.iSave(True, False)
			' Need to use reflection to call this protected method iSave with this signature
			SalesOrder.GetType.InvokeMember("iSave", 
											BindingFlags.InvokeMethod Or BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Instance,
											Nothing,
											SalesOrder,
											New Object() { True, False} )
											
											
		End Try

	End Sub
	
	
End Class

Public Class BusinessLogicPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaBusinessLogicPlugin

    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

    Public Sub Setup(ByVal JiwaBusinessLogic As JiwaApplication.IJiwaBusinessLogic, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaBusinessLogicPlugin.Setup
		'Dim salesOrder As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder = DirectCast(JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)
		'AddHandler salesOrder.Processed, AddressOf salesOrder_Processed
    End Sub

	
	
	
	Private Function GetEmailAddress(ByVal DebtorID As String, ByVal ContactPosition As String, Manager As JiwaFinancials.Jiwa.JiwaApplication.Manager) As String		
		Dim SQLReader As SqlDataReader = Nothing
        Dim SQLParam As SqlParameter = Nothing

        Try
            With Manager.Database
                Using SQLCmd As SqlCommand = New SqlCommand("spEmailAddress", .SQLConnection, .SQLTransaction)					
                    SQLCmd.CommandType = System.Data.CommandType.StoredProcedure
                    SQLCmd.CommandTimeout = Manager.Database.DefaultCommandTimeout

                    SQLParam = New SqlParameter("@DebtorID", System.Data.SqlDbType.Char)
                    SQLParam.Value = DebtorID
                    SQLCmd.Parameters.Add(SQLParam)

					SQLParam = New SqlParameter("@Position", System.Data.SqlDbType.VarChar)
                    SQLParam.Value = ContactPosition
                    SQLCmd.Parameters.Add(SQLParam)
					
                    SQLReader = SQLCmd.ExecuteReader()

                    If SQLReader.Read = True Then
                        Return .Sanitise(SQLReader, "EmailAddress").ToString
                    End If

                    SQLReader.Close()
                End Using
            End With

        Finally
            If Not SQLReader Is Nothing Then
                SQLReader.Close()
            End If
        End Try
		
		Return ""
	End Function

	
End Class

Public Class ApplicationManagerPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaApplicationManagerPlugin

    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

    Public Sub Setup(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaApplicationManagerPlugin.Setup
    End Sub

End Class

Public Class CustomFieldPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaCustomFieldPlugin

    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

    Public Sub FormatCell(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.FormatCell
    End Sub

    Public Sub ReadData(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.ReadData
    End Sub

    Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.ButtonClicked
    End Sub

End Class

Public Class LineCustomFieldPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaLineCustomFieldPlugin

    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

    Public Sub FormatCell(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostItem As JiwaApplication.IJiwaLineCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaLineCustomFieldPlugin.FormatCell
    End Sub

    Public Sub ReadData(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Row As Integer, ByVal HostItem As JiwaApplication.IJiwaLineCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaLineCustomFieldPlugin.ReadData
    End Sub

    Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostItem As JiwaApplication.IJiwaLineCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaLineCustomFieldPlugin.ButtonClicked
    End Sub

End Class

Public Class SystemSettingPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaSystemSettingPlugin

    Public Overrides Function InitializeLifetimeService() As Object
        ' returning null here will prevent the lease manager
        ' from deleting the Object.
        Return Nothing
    End Function

    Public Sub FormatCell(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal SystemSetting As JiwaApplication.SystemSettings.Setting) Implements JiwaApplication.IJiwaSystemSettingPlugin.FormatCell
    End Sub

    Public Sub ReadData(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Row As Integer, ByVal SystemSetting As JiwaApplication.SystemSettings.Setting) Implements JiwaApplication.IJiwaSystemSettingPlugin.ReadData
    End Sub

    Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal SystemSetting As JiwaApplication.SystemSettings.Setting) Implements JiwaApplication.IJiwaSystemSettingPlugin.ButtonClicked
    End Sub

End Class

Public Class ScheduledExecutionPlugin
    Inherits System.MarshalByRefObject
    Implements JiwaApplication.IJiwaScheduledExecutionPlugin

    Public Sub Execute(ByVal Plugin As JiwaApplication.Plugin.Plugin, ByVal Schedule As JiwaApplication.Schedule.Schedule) Implements JiwaApplication.IJiwaScheduledExecutionPlugin.Execute

    End Sub

    Public Sub OnServiceStart(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaScheduledExecutionPlugin.OnServiceStart

    End Sub

    Public Sub OnServiceStopping(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaScheduledExecutionPlugin.OnServiceStopping

    End Sub
End Class
</Code>
  <ExceptionPolicy>Report</ExceptionPolicy>
  <Language>VisualBasic</Language>
  <PluginFormCollection>
    <PluginForm>
      <RecID>ce54ab9a-56a4-439c-a1fa-8e7ab26027dc</RecID>
      <Description>Sales Orders</Description>
      <ClassName>JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm</ClassName>
    </PluginForm>
    <PluginForm>
      <RecID>fe05fc9b-0b08-43ee-a4e9-3f4077aef1cf</RecID>
      <Description>Process Sales Orders</Description>
      <ClassName>JiwaFinancials.Jiwa.JiwaSalesUI.BatchProcessing.BatchProcess</ClassName>
    </PluginForm>
  </PluginFormCollection>
  <BusinessLogicCollection>
    <BusinessLogic>
      <RecID>3ae31393-400f-408c-b655-e20f67fed0c2</RecID>
      <Description>Sales Order Entry</Description>
      <ClassName>JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder</ClassName>
      <Assembly>JiwaSales, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</Assembly>
    </BusinessLogic>
  </BusinessLogicCollection>
  <ReferenceCollection>
    <Reference>
      <RecID>eed06768-5ad2-4776-a1b7-3d387e1102ac</RecID>
      <AssemblyFullName>JiwaApplication, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaApplication.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaApplication.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8779f1da-b0d5-4220-bd14-71424a529224</RecID>
      <AssemblyFullName>mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>mscorlib.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1970b371-20dc-4d05-a993-1bc2383d0c96</RecID>
      <AssemblyFullName>System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>f2a185a4-d2de-465b-bf88-a20ea848bfd6</RecID>
      <AssemblyFullName>Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>Microsoft.VisualBasic.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>5908a4c7-337a-48fd-b143-947aa4729015</RecID>
      <AssemblyFullName>System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>System.Drawing.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>238c0c67-91fd-4c1a-aaf7-89fd33afd102</RecID>
      <AssemblyFullName>JiwaODBC, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaODBC.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaODBC.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d2d3e227-bc5c-42c5-b685-11827d93a3c6</RecID>
      <AssemblyFullName>System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Data.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1f3b8cd2-b515-4ed4-b8b8-c56ee0816371</RecID>
      <AssemblyFullName>System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Xml.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>5a60525d-ce2b-47cb-93a1-bfac0b6d06d9</RecID>
      <AssemblyFullName>System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Runtime.Serialization.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>85b97d05-8922-4c88-b0f9-2964892404be</RecID>
      <AssemblyFullName>System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Windows.Forms.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c3b7da75-6e6f-4734-aebd-cac6db79004d</RecID>
      <AssemblyFullName>JiwaServiceModel, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaServiceModel.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaServiceModel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b1cc1062-0eec-4e70-a8bb-6c526625c4ad</RecID>
      <AssemblyFullName>Infragistics4.Win.Misc.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.Misc.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.Misc.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ddefa109-3754-4e50-86fe-6ba7ddae7e34</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinEditors.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinEditors.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinEditors.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>9c55237d-4d78-4c48-830c-26a03d67ba55</RecID>
      <AssemblyFullName>Infragistics4.Win.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>0d322074-7c31-407c-8bea-631d02315a05</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Smo, Version=14.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Smo.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Microsoft.SqlServer.Smo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>da4d2dea-11bc-4370-9574-371f0d74b969</RecID>
      <AssemblyFullName>Microsoft.SqlServer.ConnectionInfo, Version=14.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.ConnectionInfo.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Microsoft.SqlServer.ConnectionInfo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>af9a9f9a-e4a5-45e3-ac97-b54a72d56635</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinExplorerBar.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinExplorerBar.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinExplorerBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>9b426bbf-369f-4ae5-a27d-9f3c806fa645</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinTree.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinTree.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinTree.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b210630f-35d6-4874-8901-1c9247210184</RecID>
      <AssemblyFullName>FarPoint.Win.Spread, Version=8.35.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457</AssemblyFullName>
      <AssemblyName>FarPoint.Win.Spread.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\FarPoint.Win.Spread.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b591eba0-dc37-4944-a40d-82f6c8567def</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinTabControl.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinTabControl.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinTabControl.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>02a28150-86d5-4d6d-816c-804db2f599d2</RecID>
      <AssemblyFullName>Infragistics4.Shared.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Shared.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Shared.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>f1f8e85b-dd00-4485-8997-95131c3340b6</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinToolbars.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinToolbars.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinToolbars.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8fd68d86-ae30-4c5f-b279-e4364350a2b4</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinStatusBar.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinStatusBar.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinStatusBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>e58ba2bf-ffdf-4495-902d-3c3d3dc72024</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinSchedule.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinSchedule.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinSchedule.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4c374cea-0b30-48a7-9885-aa50990b9f11</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinListView.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinListView.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinListView.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>354e0697-f3d3-47af-aebc-8533cba1b75d</RecID>
      <AssemblyFullName>ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ServiceStack.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>dae36422-ab8f-4a57-bc99-5aeabdff6603</RecID>
      <AssemblyFullName>EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>EntityFramework.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\EntityFramework.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ca69c9dc-d580-40c4-bdfc-ef31efe94fd1</RecID>
      <AssemblyFullName>System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Core.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>656f5a21-d36c-4efa-a800-84a78f155e9e</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>28b4bc0f-d116-4771-9fc4-e0c553456819</RecID>
      <AssemblyFullName>ZetaHtmlEditControl, Version=1.1.0.3, Culture=neutral, PublicKeyToken=2e2e5ba5da72b6c0</AssemblyFullName>
      <AssemblyName>ZetaHtmlEditControl.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ZetaHtmlEditControl.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>088c7275-7f11-4f3d-ae78-80abfc7deb35</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>697218d3-2c40-4dc9-9f74-217cb6230a66</RecID>
      <AssemblyFullName>JiwaEncryption, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaEncryption.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaEncryption.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>bb71bb56-9850-4df3-9905-80817ac68a39</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinGrid.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinGrid.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.UltraWinGrid.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8e774353-a932-42cf-85b7-6a12d8bb9a8c</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Dac, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Dac.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Microsoft.SqlServer.Dac.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>6b93382b-4112-4e10-a344-4b51281d76ab</RecID>
      <AssemblyFullName>CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.CrystalReports.Engine.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.3500.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>43d01f8d-a491-424c-9686-be91691717b0</RecID>
      <AssemblyFullName>CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Shared.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.3500.0__692fbea5521e1304\CrystalDecisions.Shared.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>acafe9b4-41c1-4b39-ab8e-2f49b87e07bd</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.Controllers, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.Controllers\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>876b54ff-63fa-4c52-9055-d6674f241e54</RecID>
      <AssemblyFullName>Infragistics4.Win.AppStylistSupport.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.AppStylistSupport.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Infragistics4.Win.AppStylistSupport.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>11d7761f-8bb3-4aaf-b1fd-bca75bf59d93</RecID>
      <AssemblyFullName>JiwaLib, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaLib.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaLib.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>912c03b5-6d38-4013-91f4-f200a39291e6</RecID>
      <AssemblyFullName>Microsoft.ApplicationInsights, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</AssemblyFullName>
      <AssemblyName>Microsoft.ApplicationInsights.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\Microsoft.ApplicationInsights.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d25b57dd-55be-453e-b468-98c036e53765</RecID>
      <AssemblyFullName>CrystalDecisions.Windows.Forms, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Windows.Forms.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Windows.Forms\13.0.3500.0__692fbea5521e1304\CrystalDecisions.Windows.Forms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>fe58e566-4902-47cd-9859-466809292fe2</RecID>
      <AssemblyFullName>EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>EntityFramework.SqlServer.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\EntityFramework.SqlServer.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>dc3e3131-9b80-421f-94fe-d6a6b65a22ed</RecID>
      <AssemblyFullName>ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Text.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ServiceStack.Text.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8ef7688e-d142-4f24-b556-8b7a4b928297</RecID>
      <AssemblyFullName>ActiproSoftware.Shared.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.Shared.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ActiproSoftware.Shared.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>79702932-8ed2-42c7-8d8c-5f62dbe3dfec</RecID>
      <AssemblyFullName>System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>System.Security.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>068e11ea-bfc7-4c53-9dc2-a2d809f035dc</RecID>
      <AssemblyFullName>FarPoint.Win, Version=8.35.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457</AssemblyFullName>
      <AssemblyName>FarPoint.Win.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\FarPoint.Win.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4cce8683-ad26-48bc-9550-3efd653f3382</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>308bcb8c-6daf-4dc0-92bf-b465b851744f</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ReportDefModel, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ReportDefModel\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>02e877eb-705d-4817-8371-a165b979b00a</RecID>
      <AssemblyFullName>ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Interfaces.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ServiceStack.Interfaces.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>0e822cf5-a9d9-4f11-8678-e715f39af494</RecID>
      <AssemblyFullName>ServiceStack.Server, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = 02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Server.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ServiceStack.Server.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>bb24ec01-9802-4155-b022-ab9816d28db3</RecID>
      <AssemblyFullName>ServiceStack.OrmLite, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = 02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.OrmLite.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\ServiceStack.OrmLite.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>5032e029-99b0-496a-8c61-a7bb129eff67</RecID>
      <AssemblyFullName>JiwaSalesUI, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaSalesUI.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaSalesUI.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d6f1405b-b442-4aeb-8eae-5ab6f8205346</RecID>
      <AssemblyFullName>JiwaSales, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaSales.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaSales.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>3199cdf1-4afe-43c7-8e7c-8f3164c7daa4</RecID>
      <AssemblyFullName>JiwaPriceSchemes, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaPriceSchemes.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaPriceSchemes.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>e5cd679d-0e36-4a6b-8878-c24e7fcfe57b</RecID>
      <AssemblyFullName>JiwaJobCosting, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaJobCosting.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaJobCosting.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b26cdc47-4784-444c-b2e8-64f1afe702f0</RecID>
      <AssemblyFullName>JiwaSerialNumbersUI, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaSerialNumbersUI.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaSerialNumbersUI.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>63472138-36ce-4430-81fc-229109df395f</RecID>
      <AssemblyFullName>LumenWorks.Framework.IO, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>LumenWorks.Framework.IO.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\LumenWorks.Framework.IO.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>60ab5982-ece6-44f5-827b-1c6c8e5b2a66</RecID>
      <AssemblyFullName>JiwaJournalSets, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaJournalSets.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaJournalSets.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>60a51996-181a-4b9e-9b78-c7c005c5ffe7</RecID>
      <AssemblyFullName>JiwaLock, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaLock.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaLock.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>2dbf6340-a8f7-4957-9179-1586b71324ce</RecID>
      <AssemblyFullName>JiwaCashBook, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaCashBook.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaCashBook.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>be9c71d2-8fc1-4e7f-a705-45c4aa3371f3</RecID>
      <AssemblyFullName>Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</AssemblyFullName>
      <AssemblyName>Microsoft.Office.Interop.Outlook.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4311791a-440a-485d-87ab-b8ad47575349</RecID>
      <AssemblyFullName>JiwaDebtors, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaDebtors.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7.2.1\JiwaDebtors.dll</AssemblyLocation>
    </Reference>
  </ReferenceCollection>
  <CustomFieldCollection>
    <CustomField>
      <RecID>8e3daa6c-681a-4cec-be29-e55032f94e86</RecID>
      <Name>ProcEmail</Name>
      <Description>Automatically sends email when processed (untick if NO email to send)</Description>
      <DisplayOrder>1</DisplayOrder>
      <CellType>Checkbox</CellType>
      <CustomFieldModule>Sales Order</CustomFieldModule>
    </CustomField>
  </CustomFieldCollection>
</JiwaDocument>