﻿<?xml version="1.0" encoding="utf-16"?>
<JiwaDocument xmlns:jiwa="http://www.jiwa.com.au/xml/schemas" Type="JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin">
  <RecID>10efbe93-d62b-4c6c-9427-7802e03d344b</RecID>
  <Name>File Watcher WebNinja</Name>
  <Description>Watches folder "C:\Web Ninja\Uploads" for XML files.&amp;#13;&amp;#10;Contains business logic code to print a pick slip when the new order is imported.</Description>
  <IsEnabled>true</IsEnabled>
  <IsIsolatedToOwnAppDomain>false</IsIsolatedToOwnAppDomain>
  <ExecutionOrder>0</ExecutionOrder>
  <Author>Jiwa Financials</Author>
  <Version>7.2.1.1</Version>
  <Code>Imports JiwaFinancials.Jiwa
Imports Microsoft.VisualBasic
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports System.Drawing
Imports System.Data
Imports System.IO
Imports Microsoft.VisualBasic.FileIO.TextFieldParser


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 JiwaSales.SalesOrder.SalesOrder = DirectCast(JiwaBusinessLogic, JiwaSales.SalesOrder.SalesOrder)
		AddHandler salesOrder.DeserialiseEnd, AddressOf SalesOrder_DeserialiseWebNinja
		AddHandler salesOrder.SaveEnd, AddressOf SalesOrder_PrintWebNinja
    End Sub
	
	
	Private Sub SalesOrder_DeserialiseWebNinja(sender As Object, e As System.EventArgs, poco As Object)
		Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast(sender, JiwaSales.SalesOrder.SalesOrder)
		'System.Diagnostics.Debugger.Launch()
		Dim myGenericObject As JiwaApplication.BusinessLogic.GenericObjectItem = salesOrder.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaApplication.BusinessLogic.GenericObjectItem) 
		salesOrder.GenericObjectCollection.SetOrAdd("IsFromXML",True)
		LogToEventLog(String.Format("Webninja deserialize"),System.Diagnostics.EventLogEntryType.Information)	
		
	End Sub

	
	Private Sub SalesOrder_PrintWebNinja(sender As Object, e As System.EventArgs)
		LogToEventLog(String.Format("About to print webninja sales order import"),System.Diagnostics.EventLogEntryType.Information)	
		Dim salesOrder As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder = DirectCast(sender, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)	
		'System.Diagnostics.Debugger.Launch()
		Dim IsFromXML As Boolean = salesOrder.GenericObjectCollection.GetValue(Of Boolean)("IsFromXML")
		If IsFromXML Then
			'Stop listening To the save End Event
			RemoveHandler salesOrder.SaveEnd, AddressOf SalesOrder_PrintWebNinja
			
			If salesOrder.PrintLogCollection.Count = 0 Then
				
				' print the sales order	
				LogToEventLog(String.Format("About to print webninja sales order import 2"),System.Diagnostics.EventLogEntryType.Information)	
				For Each salesOrderReport As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport In salesOrder.SalesOrderReports 
					If salesOrderReport.DocumentType = JiwaFinancials.Jiwa.JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReportCollection.SalesOrderPrintReportTypes.e_SalesOrderPrintReportTypePickingSheet Then 
						LogToEventLog(String.Format("About to print webninja sales order import 3"),System.Diagnostics.EventLogEntryType.Information)	
						If salesOrder.ChangeFlag Then
							salesOrder.Read(salesOrder.InvoiceID)
							LogToEventLog(String.Format("About to print webninja sales order import 4"),System.Diagnostics.EventLogEntryType.Information)	
				    	End If			
						Dim candidateReportsToPrint As New JiwaApplication.JiwaCollection(Of JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport)
		                candidateReportsToPrint.Add(salesOrderReport)
						LogToEventLog(String.Format("About to print webninja sales order import 5"),System.Diagnostics.EventLogEntryType.Information)
		                 salesOrder.Print(candidateReportsToPrint, False)	
						LogToEventLog(String.Format("About to print webninja sales order import 6"),System.Diagnostics.EventLogEntryType.Information)
						'Exit For
					End If			
					
				Next	
			End If	
		End If
		salesOrder.GenericObjectCollection.SetOrAdd("IsFromXML",False)
	End Sub

	Public Sub LogToEventLog(ByVal Message As String, ByVal EventLogEntryType As System.Diagnostics.EventLogEntryType)
		Dim Log As New System.Diagnostics.EventLog("Application")
		Log.Source = String.Format("Jiwa Plugin : File Watcher WebNinja" )
		Log.WriteEntry(Message, EventLogEntryType)
		Log.Close()
	End Sub	
	
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

	Private _plugin As JiwaApplication.Plugin.Plugin 
	Private XMLWatcher As JiwaFileWatcher

	      
    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
		_plugin = Plugin

		' Start watching the folders
		XMLWatcher = New JiwaFileWatcher(Plugin, "C:\Web Ninja\Uploads")		       
		AddHandler XMLWatcher.FileImport, AddressOf XMLFileImport
		XMLWatcher.ImportAllFilesInWatchFolder()
			

    End Sub

    Public Sub OnServiceStopping(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaScheduledExecutionPlugin.OnServiceStopping        
		If Not XMLWatcher Is Nothing Then
        	XMLWatcher.StopWatching 
		End If
			

    End Sub
		
	Private Sub XMLFileImport(ByVal FileName As String)
        ' Import the file using the import queue manager
		SyncLock JiwaFinancials.Jiwa.JiwaApplication.Manager.CriticalSectionFlag			
	        Dim importQueueManager As JiwaImportQManager.ImportQueueItemCollection = _plugin.Manager.BusinessLogicFactory.CreateBusinessLogic(Of JiwaImportQManager.ImportQueueItemCollection)(Nothing)
	        
			Dim queueItem As JiwaImportQManager.ImportQueueItem = _plugin.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaImportQManager.ImportQueueItem)
			queueItem.TransformedXML = File.ReadAllText(FileName)
			queueItem.Status = JiwaImportQManager.ImportQueueItem.ImportQueueItemStatuses.ReadyForImport
			importQueueManager.Add(queueItem)
			queueItem.Process()
			If queueItem.Status = JiwaImportQManager.ImportQueueItem.ImportQueueItemStatuses.Failed Then
				Throw New System.Exception(queueItem.ImportErrorMessage) 
			Else
				XMLWatcher.LogToEventLog(String.Format("Imported XML from File '{0}'", FileName), System.Diagnostics.EventLogEntryType.SuccessAudit)				
			End If
		End SyncLock 
	End Sub
		

End Class
	
Public Class JiwaFileWatcher
	Private Plugin As JiwaApplication.Plugin.Plugin 
	Public Property FileSystemWatcher As FileSystemWatcher
	Public Property BaseFolder As String
			
	Public Event FileImport(ByVal FullPath As String)
			
	Public ReadOnly Property WatchFolder As String	
		Get 
			Return Path.Combine(BaseFolder, "Watch")
		End Get
	End Property
		
	Public ReadOnly Property PendingFolder As String	
		Get 
			Return Path.Combine(BaseFolder, "Pending")
		End Get
	End Property
		
	Public ReadOnly Property FailedFolder As String	
		Get 
			Return Path.Combine(BaseFolder, "Failed")
		End Get
	End Property
		
	Public ReadOnly Property SucceededFolder As String	
		Get 
			Return Path.Combine(BaseFolder, "Succeeded")
		End Get
	End Property
			
	Public Sub New(Plugin As JiwaApplication.Plugin.Plugin, ByVal BaseFolder As String)
		Me.BaseFolder = BaseFolder
		Me.Plugin = Plugin
			
		If Not System.IO.Directory.Exists(Me.BaseFolder) Then
			System.IO.Directory.CreateDirectory(Me.BaseFolder)
		End If
			
		If Not System.IO.Directory.Exists(Me.WatchFolder) Then
			System.IO.Directory.CreateDirectory(Me.WatchFolder)
		End If
			
		If Not System.IO.Directory.Exists(Me.PendingFolder) Then
			System.IO.Directory.CreateDirectory(Me.PendingFolder)
		End If
			
		If Not System.IO.Directory.Exists(Me.FailedFolder) Then
			System.IO.Directory.CreateDirectory(Me.FailedFolder)
		End If
			
		If Not System.IO.Directory.Exists(Me.SucceededFolder) Then
			System.IO.Directory.CreateDirectory(Me.SucceededFolder)
		End If
			
		FileSystemWatcher = New FileSystemWatcher
		FileSystemWatcher.Path = Me.WatchFolder 
		FileSystemWatcher.NotifyFilter = (NotifyFilters.LastWrite Or NotifyFilters.FileName)
		FileSystemWatcher.Filter = "*.*"
		FileSystemWatcher.EnableRaisingEvents = True
			
		AddHandler FileSystemWatcher.Created, AddressOf OnCreated
			
		LogToEventLog(String.Format("Started monitoring folder: '{0}'", Me.WatchFolder), System.Diagnostics.EventLogEntryType.SuccessAudit)
	End Sub
	
	Public Sub ImportAllFilesInWatchFolder()        
		' Import any files already in the watch folder
		For Each file As String In System.IO.Directory.EnumerateFiles(Me.WatchFolder)
			If System.IO.Path.GetFileName(file) &lt;&gt; "Thumbs.db" Then
				OnFileImport(file)
			End If
		Next                    
	End Sub

		
	Private Sub OnFileImport(ByVal FullPath As String)
		If System.IO.File.Exists(FullPath) Then
			Dim pendingFileNameAndPath As String = Path.Combine(Me.PendingFolder, System.IO.Path.GetFileName(FullPath))                 
			    
			Try
				' Wait until we can get exclusive access, or until we exceed the retry period.
				Dim retryCount As Integer = 0
				Dim maxRetries As Integer = 5                         

				Do While True
					Try
						Using fs As New FileStream(FullPath, FileMode.Open, FileAccess.ReadWrite, FileShare.None, 100)
							fs.ReadByte 
							Exit Do
						End Using
					Catch ex As System.Exception                                
						If retryCount &gt; maxRetries Then
							LogToEventLog(String.Format("Cannot get exclusive access to File '{0}' and retry count exceeded", FullPath), System.Diagnostics.EventLogEntryType.Information)
							Exit Do
						Else
							LogToEventLog(String.Format("Cannot get exclusive access to File '{0}', retrying in 500ms", FullPath), System.Diagnostics.EventLogEntryType.Information)
							retryCount += 1
							System.Threading.Thread.Sleep(500)
						End If
					End Try
				Loop
				      
				' Move to pending folder            
				LogToEventLog(String.Format("Moving File '{0}' to '{1}'", FullPath, pendingFileNameAndPath), System.Diagnostics.EventLogEntryType.Information)
				System.IO.File.Move(Path.Combine(Me.WatchFolder, System.IO.Path.GetFileName(FullPath)), pendingFileNameAndPath)                                                    
				      
				' Raise the event so the work is done
				RaiseEvent FileImport(pendingFileNameAndPath)
				            
				' Move to succeeded folderPath.Combine(Me.PendingFolder, System.IO.Path.GetFileName(FullPath)
				Dim succeededFileNameAndPath As String = Path.Combine(Me.SucceededFolder, System.IO.Path.GetFileName(FullPath)) 

				If System.IO.File.Exists(succeededFileNameAndPath) Then                             
					succeededFileNameAndPath = Path.Combine(Me.SucceededFolder, System.IO.Path.GetFileNameWithoutExtension(FullPath) &amp; "." &amp; now.ToString("yyyy-MM-ddTHmmss.FFF") &amp; System.IO.Path.GetExtension(FullPath))
				End If

				LogToEventLog(String.Format("Moving File '{0}' to '{1}'", pendingFileNameAndPath, succeededFileNameAndPath), System.Diagnostics.EventLogEntryType.Information)
				System.IO.File.Move(pendingFileNameAndPath, succeededFileNameAndPath)

				LogToEventLog(String.Format("Imported File '{0}'", FullPath), System.Diagnostics.EventLogEntryType.SuccessAudit)
			Catch ex As System.Exception
				' Move to failed folder
				Dim failedFileNameAndPath As String = Path.Combine(Me.FailedFolder, System.IO.Path.GetFileName(FullPath)) 

				If System.IO.File.Exists(failedFileNameAndPath) Then                          
					failedFileNameAndPath = Path.Combine(Me.FailedFolder, System.IO.Path.GetFileNameWithoutExtension(FullPath) &amp; "." &amp; now.ToString("yyyy-MM-ddTHmmss.FFF") &amp; System.IO.Path.GetExtension(FullPath))
				End If

				LogToEventLog(String.Format("Moving File '{0}' to '{1}'", pendingFileNameAndPath, failedFileNameAndPath), System.Diagnostics.EventLogEntryType.FailureAudit)
				
				Try
					System.IO.File.Move(pendingFileNameAndPath, failedFileNameAndPath)
					LogToEventLog(String.Format("Failed to import File '{0}' - Error: {1}", FullPath, ex.Message), System.Diagnostics.EventLogEntryType.FailureAudit)
				Catch ex2 As System.Exception
					LogToEventLog(String.Format("Failed to import File '{0}' - Error: {1}, Also could not move file to error folder: {2}", FullPath, ex.Message, ex2.Message), System.Diagnostics.EventLogEntryType.FailureAudit)
				End Try
				  
				'Dim email As JiwaApplication.JiwaEmail.EmailMessage = JiwaApplication.BusinessLogicFactory.Instance.CreateBusinessLogic(Of JiwaApplication.JiwaEmail.EmailMessage)
				'email.SystemSettings.UseOutlookForEmail = False ' Cannot use outlook from within a Windows Service - make sure your other system settings like SMTP server are configured.
				'email.CreateNew() 
				'email.EmailTo = "youremail@yourdomain.com.au"
				'email.EmailSubject = "test email"
				'email.EmailBody = String.Format("Document '{0}' failed to import - error message is '{1}'", pendingFileNameAndPath, ex.Message)
				'email.Save()
			End Try           
		End If
	End Sub

		
	Private Sub OnCreated(source As Object, e As FileSystemEventArgs)
		If System.IO.Path.GetFileName(e.FullPath) &lt;&gt; "Thumbs.db" Then
			OnFileImport(e.FullPath)
		End If
	End Sub
		
	Public Sub StopWatching()
		RemoveHandler FileSystemWatcher.Created, AddressOf OnCreated
	End Sub
		
	Public Sub LogToEventLog(ByVal Message As String, ByVal EventLogEntryType As System.Diagnostics.EventLogEntryType)
		Dim Log As New System.Diagnostics.EventLog("Application")
		Log.Source = String.Format("Jiwa Plugin : {0}", Me.Plugin.Name )
		Log.WriteEntry(Message, EventLogEntryType)
		Log.Close()
	End Sub
		
End Class
</Code>
  <ExceptionPolicy>Abort</ExceptionPolicy>
  <Language>VisualBasic</Language>
  <ReferenceCollection>
    <Reference>
      <RecID>38495617-8d65-4bc2-9016-292eff93f80c</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\JiwaApplication.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8bc886b8-e1c3-44da-a331-7e4c623cd6cf</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>59a68418-fd7b-42ba-96a0-85a3072b5f8f</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>fd1f46b9-ee65-4702-9a06-fba83ffba356</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>e6e2f3a0-a74f-4ce0-a3a2-7f7fbb07f808</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>b34605ea-d67a-482d-ac6e-476461051d9e</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\Infragistics4.Win.UltraWinToolbars.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>18dbeb11-d371-454e-aa9e-5a00a6fe4385</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\Infragistics4.Win.Misc.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c792c144-e365-42d5-95b6-4fecd3c50c6b</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\Infragistics4.Win.UltraWinStatusBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4c774748-f466-43d8-9c16-dcd4bd6b3030</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\FarPoint.Win.Spread.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>af0b8235-6e1d-4829-814a-e2d91cee171b</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\Infragistics4.Win.UltraWinTabControl.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>71c94d3c-d8e1-4e62-becf-95633386aada</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>daffa6dd-8924-43e4-a590-25afb9ffa550</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\JiwaODBC.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4c59fc76-8e47-4076-a7ff-c1f7d2c91905</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>8f57c6e3-bfce-4ce6-9232-077d3e3ae5ef</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\Infragistics4.Win.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>6ddf7712-2e97-4cba-916a-bbd3edbee36e</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\Infragistics4.Win.UltraWinEditors.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>72ac8fd8-ffbf-4d19-8448-929645441a0d</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\Infragistics4.Win.UltraWinExplorerBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>433806bd-c051-4101-a09e-64d5e5ef4fdf</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\Infragistics4.Win.UltraWinTree.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>3ff9fc63-bc83-4e0b-a089-f8189d9e53ec</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>26493e11-8e3a-462e-bd7c-f033e8bd6a69</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>846ecae3-6ea0-4f34-9f34-5b43d8e67ee0</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>58743612-637d-4e91-9e80-4123799d85a7</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>47a6b457-9d59-48d1-941d-cd0348b5081c</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\ZetaHtmlEditControl.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b95e6e08-2bd1-4541-b655-cda7f9c34c6c</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\Infragistics4.Win.AppStylistSupport.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>273dd557-8e1a-4b80-8772-a4e9d8485d5c</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\JiwaLib.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>976362f2-8fc4-44fb-8246-571c6a852016</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\Infragistics4.Win.UltraWinSchedule.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>06e4e85e-d913-4fca-88a5-d2d748a7fd3d</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\Infragistics4.Win.UltraWinGrid.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>34f44ec2-5c80-4d8a-8a9d-d041602ea100</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\JiwaEncryption.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4f6734b4-ea3c-45cb-a796-96e173447c16</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>688c3032-f26b-4c53-8668-8311b4c348b4</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\Infragistics4.Shared.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c6a732b7-ecc3-4d19-9226-7610da7eba2a</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>d2b89ceb-5320-46e0-8eb6-b73ce140f959</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>8c149b5b-1681-4d84-a3f4-8d4984e7ea29</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>54369cb9-1898-4185-83c2-b8da72168eae</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>016bee2d-12fd-490f-b7fd-421c2f0c268f</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\FarPoint.Win.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>3066ab98-ae1e-4d5a-8ece-80200dc610a0</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>841956a9-847b-42ac-83d3-6787445b4534</RecID>
      <AssemblyFullName>JiwaImportQManager, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaImportQManager.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaImportQManager.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b036d50b-3a1a-4859-bac0-3612fa030378</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\JiwaSales.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>694fafc2-d9ad-4da1-a00c-68344eb1caaa</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\JiwaJournalSets.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ff5860ca-e8cf-401e-9592-88b9a60d0de9</RecID>
      <AssemblyFullName>JiwaPurchaseOrders, Version=7.2.1.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaPurchaseOrders.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaPurchaseOrders.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>a12c4fc3-327f-4ec4-bc15-c67d423394ea</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\JiwaServiceModel.dll</AssemblyLocation>
    </Reference>
  </ReferenceCollection>
</JiwaDocument>