﻿<?xml version="1.0" encoding="utf-16"?>
<JiwaDocument xmlns:jiwa="http://www.jiwa.com.au/xml/schemas" Type="JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin">
  <RecID>c6a8ae9c-06c3-4ef1-a087-e5f6cbc094d6</RecID>
  <Name>Sales Orders - Freight Calculation</Name>
  <Description>This plugin calculates the freight to be charged based on DB custom fields.  'FreightChargePerKg' and,'IncludeFreightOnLineItems'. IF "Include" is checked then SO_Lines.ItemPrice is increased by ChargePerKg. ELSE SO_History.CartageCharge1 = Sum(SO_Lines.Quantity * ChargePerKg).  NOTE The DB custom fields are included in this plugin.</Description>
  <IsEnabled>true</IsEnabled>
  <IsIsolatedToOwnAppDomain>false</IsIsolatedToOwnAppDomain>
  <ExecutionOrder>0</ExecutionOrder>
  <Author>Atronics Consulting</Author>
  <Version>7.157</Version>
  <Code>using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using JiwaFinancials.Jiwa;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Drawing;

#region "FormPlugin"
public class FormPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaFormPlugin
{

    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }
	
	JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm salesOrder;

    public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }

    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
		salesOrder = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
				
		salesOrder.SalesOrder.SaveEnd += soSaveEnd;
    }
	
	private void soSaveEnd(Object sender, System.EventArgs e)
	{
		
		if(BusinessLogicPlugin.IncludeFreightOnLineItems == "0")
		{
		var db = JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database;
		System.Data.SqlClient.SqlParameter SQLParam = null;
		System.Data.SqlClient.SqlDataReader SQLReader = null;
						
		try
		{
		   string SQL = @"Update a Set a.CartageCharge1 = ((Select isnull(sum(b.QuantityOrdered),0) From SO_Lines b Where a.InvoiceHistoryID = b.InvoiceHistoryID) * "+ BusinessLogicPlugin.FreightChargePerKg+")  From SO_History a Where a.InvoiceID = @InvoiceId ";
			
		   using (SqlCommand SQLCmd = new SqlCommand(SQL, db.SQLConnection, db.SQLTransaction))
		   {
			  SQLParam = new SqlParameter("@InvoiceId", System.Data.SqlDbType.Char, 50);
			  SQLParam.Value = salesOrder.SalesOrder.InvoiceID;
			  SQLCmd.Parameters.Add(SQLParam);
			  			  
			  SQLReader = db.ExecuteReader(SQLCmd);
			
			  if (SQLReader.Read() == true)
			  {			
				  db.ExecuteNonQuery(SQLCmd);
			  }			
		   }

		   SQLReader.Close();
		}
		catch(Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
		finally
		{
		   if (SQLReader != null)
		   {
			  SQLReader.Close();
		   }
		}
		}
	}
}
#endregion

#region "BusinessLogicPlugin"
public class BusinessLogicPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogicPlugin
{

	public static string IncludeFreightOnLineItems = "False";
	public static decimal FreightChargePerKg = 0;
	
    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
		var salesOrder = (JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)JiwaBusinessLogic;
				
		salesOrder.SalesOrderLines.Added += SalesOrderLinesAdding;		
		salesOrder.SalesOrderLines.Changed += soChanged;
    }
	
	private void soChanged(JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine line, System.ComponentModel.PropertyChangedEventArgs e)
	{
		if( e.PropertyName == "QuantityThisDelivery"){		
			RecalculateInvoiceAmount(line);
		}	
	}
	
	private void SalesOrderLinesAdding(JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine line)
	{	
		if(line.InsertFlag	)
		{
			RecalculateInvoiceAmount(line);
		}	
	}
		
	private void RecalculateInvoiceAmount(JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine line)
	{
		if(line.InsertFlag	)
		{
			var salesOrder = (JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)line.SalesOrderLines.SalesOrder;
			//var salesOrderH = (JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderHistory)salesOrder.SalesOrderHistorys(salesOrder.CurrentHistoryNo);
			
			string DebtorID = salesOrder.Debtor.DebtorID;
			decimal DefaultPrice = line.DefaultPrice;
			decimal TotalWeight = line.Weight;
			decimal qty = line.QuantityOrdered;
			decimal FreightCharge = 0;
							
			var db = JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database;
			System.Data.SqlClient.SqlParameter SQLParam = null;
			System.Data.SqlClient.SqlDataReader SQLReader = null;
			
			try
			{
			   string SQL = @"Select SettingName, Contents From DB_CustomSettingValues a Inner Join DB_CustomSetting b on a.SettingID = b.SettingID Where SettingName in('FreightChargePerKg','IncludeFreightOnLineItems') and DebtorID = @DebtorID ";
				
			   using (SqlCommand SQLCmd = new SqlCommand(SQL, db.SQLConnection, db.SQLTransaction))
			   {	  		  
				  SQLParam = new SqlParameter("@DebtorID", System.Data.SqlDbType.Char, 50);
				  SQLParam.Value = DebtorID;
				  SQLCmd.Parameters.Add(SQLParam);
				
				  SQLReader = db.ExecuteReader(SQLCmd);
				
				  while (SQLReader.Read())
				  {				
					switch(db.Sanitise(SQLReader, "SettingName").ToString())
					{
						case "IncludeFreightOnLineItems":
							IncludeFreightOnLineItems = db.Sanitise(SQLReader, "Contents").ToString();
							break;
						case "FreightChargePerKg":
							FreightChargePerKg = Convert.ToDecimal(db.Sanitise(SQLReader, "Contents").ToString());
							break;
						
						Default:
							IncludeFreightOnLineItems = "False";
							break;
					}
				  }			
			   }

			   SQLReader.Close();
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
			finally
			{
			   if (SQLReader != null)
			   {
				  SQLReader.Close();
			   }
			}
					
			switch(IncludeFreightOnLineItems)
			{
				case "True":
					FreightCharge = (TotalWeight * FreightChargePerKg);
					line.SellPriceExGST = (DefaultPrice + FreightCharge);
					break;
					
				case "False":
					FreightCharge = (qty * FreightChargePerKg);
					MessageBox.Show(string.Format("{0:0.00}",FreightCharge));
					//salesOrder
					//salesOrderH.CartageCharge1 = salesOrderH.CartageCharge1 + FreightCharge;
					break;
			}
		
		}
	}
}
#endregion

#region "ApplicationManagerPlugin"
public class ApplicationManagerPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaApplicationManagerPlugin
{

    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }
}
#endregion

#region "CustomFieldPlugin"
public class CustomFieldPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldPlugin
{
    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldValues HostObject, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ReadData(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldValues HostObject, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ButtonClicked(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaCustomFieldValues HostObject, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }
}
#endregion

#region "LineCustomFieldPlugin"
public class LineCustomFieldPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldPlugin
{
    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ReadData(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }

    public void ButtonClicked(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.IJiwaLineCustomFieldValues HostItem, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomField CustomField, JiwaFinancials.Jiwa.JiwaApplication.CustomFields.CustomFieldValue CustomFieldValue)
    {
    }
}
#endregion

#region "SystemSettingPlugin"
public class SystemSettingPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaSystemSettingPlugin
{
    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void FormatCell(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.SystemSettings.Setting SystemSetting)
    {
    }

    public void ReadData(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Row, JiwaFinancials.Jiwa.JiwaApplication.SystemSettings.Setting SystemSetting)
    {
    }

    public void ButtonClicked(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic BusinessLogicHost, JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid GridObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm FormObject, int Col, int Row, JiwaFinancials.Jiwa.JiwaApplication.SystemSettings.Setting SystemSetting)
    {
    }
}
#endregion

#region "ScheduledExecutionPlugin"
public class ScheduledExecutionPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaScheduledExecutionPlugin
{
    public void Execute(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin, JiwaFinancials.Jiwa.JiwaApplication.Schedule.Schedule Schedule)
    {
    }


    public void OnServiceStart(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }


    public void OnServiceStopping(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }
}
#endregion</Code>
  <ExceptionPolicy>Report</ExceptionPolicy>
  <Language>CSharp</Language>
  <PluginFormCollection>
    <PluginForm>
      <RecID>4b914cb4-6a61-441f-9db3-43a1c1cdcf85</RecID>
      <Description>Sales Orders</Description>
      <ClassName>JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm</ClassName>
    </PluginForm>
  </PluginFormCollection>
  <BusinessLogicCollection>
    <BusinessLogic>
      <RecID>52dbcd68-5734-4c3e-ab2d-05d7645accf3</RecID>
      <Description>Sales Order Entry</Description>
      <ClassName>JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder</ClassName>
      <Assembly>JiwaSales, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</Assembly>
    </BusinessLogic>
  </BusinessLogicCollection>
  <ReferenceCollection>
    <Reference>
      <RecID>d9bb757b-d78c-4a15-b185-e849d27c4a95</RecID>
      <AssemblyFullName>JiwaApplication, Version=7.0.157.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>6e4caa25-5fa4-4123-b0b0-9646260a968b</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>061c6d3e-94c5-4c74-ab70-b27a3910901c</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>b76b7547-3f3f-44bf-9c07-15f817e28327</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>18e5cd36-09bb-443d-b64c-06dfc356fddc</RecID>
      <AssemblyFullName>JiwaODBC, Version=7.0.157.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>e13e5487-3346-4ade-a44a-74f557fcfb36</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>96932cec-fcca-4b29-98ce-a6158b4f1b81</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>b2f5f634-f608-45b4-b82a-b8a61c138f0d</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>b0577824-8922-4f20-b31d-ac2cddc326b9</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Smo, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Smo.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1363efd6-ad24-4c45-8538-31d7d97c2099</RecID>
      <AssemblyFullName>Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.ConnectionInfo.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.ConnectionInfo\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ConnectionInfo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>9619a8f7-8578-46fc-bef1-bb50bbb4c33f</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>d75e3dfb-aef8-4b86-9797-96036cce1d3b</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>db5a0350-fe60-4dda-8e0a-5d5ca79964d3</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>37f8b7f5-6548-4b51-84bb-e44b2b909622</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>de0abfb5-9d83-490f-9f22-e11427e671de</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>da2dbb97-e80b-45c2-a13e-d553545b426e</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>31a33b13-cae4-48bd-95b3-d358042b7d5f</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>523fdb29-c823-4375-884f-7196dcfd1f47</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>302f4ac3-214f-4456-8be8-f139eb0ad187</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>0f7ad5d4-4973-4d3c-ad3b-fa2fab8115fb</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>ee10c343-8805-45c5-afd1-5a3795111e07</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>409f053d-1b25-41aa-9961-acc6a1f653e1</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\Infragistics4.Win.UltraWinListView.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>450fc6da-d332-4817-a873-b87a458b44dd</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.WinForms, Version=12.1.304.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d4e5633f-2edc-4459-a232-b00180693dc7</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>e4fe3445-8892-46d5-8fe9-06c161713fc9</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms, Version=12.1.304.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d8284320-dcb1-4bba-8e89-fd122f10352b</RecID>
      <AssemblyFullName>JiwaEncryption, Version=7.0.157.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>33a375ca-21f6-4e85-8f30-903ff1f4d648</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Dac, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Dac.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\Microsoft.SqlServer.Dac.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>3536ca9a-c4d9-4473-8288-733d2c6ad2f0</RecID>
      <AssemblyFullName>CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.CrystalReports.Engine.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b55f6dbb-29fb-42e9-b382-7593ecac95dc</RecID>
      <AssemblyFullName>CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Shared.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>65116e86-4033-4a82-b946-83e9980b40c8</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.Controllers\13.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>6eccb25d-1508-4daf-bd49-30fb53a69bb5</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>bbf1fc05-3285-4bbf-a860-aaf7a1bd0f50</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>eec9eaed-ff84-490f-a907-26cd0cd8ab78</RecID>
      <AssemblyFullName>JiwaLib, Version=7.0.157.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>6b967fce-1925-49fe-8bd2-96c6c0b04756</RecID>
      <AssemblyFullName>CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Windows.Forms.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Windows.Forms\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Windows.Forms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>db0be82f-f820-4d09-a64f-ec018a4dca8e</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>b162757b-46b2-4ac4-9c1a-06724bbb938c</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>9078f6f0-9363-40e2-8905-835ef81c5628</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>72dbc4a7-16ef-469c-afae-6056a63fd49c</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\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d52b37d3-f106-4a35-a0ea-8ac623f50a00</RecID>
      <AssemblyFullName>ActiproSoftware.Shared.WinForms, Version=12.1.304.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.Shared.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\ActiproSoftware.Shared.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>754d79be-1b01-4f00-8ec4-3b331d903424</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>2b98c2e4-e847-4688-8806-7bf79456a2f6</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>8900b25b-3efd-404c-a2d1-e362b52a29e8</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\13.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d516c7ff-ae63-449d-ad99-5f2cbb0ced8f</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ReportDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ReportDefModel\13.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>fbee4241-c620-4660-b84e-b3cae1dab8f4</RecID>
      <AssemblyFullName>JiwaSalesUI, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaSalesUI.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaSalesUI.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1a3fc0c2-4f60-44d1-861f-794a7fa1d42a</RecID>
      <AssemblyFullName>JiwaSales, Version=7.0.157.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>85b6bf8f-83eb-4d9b-bf5a-7a4eb3a3dae0</RecID>
      <AssemblyFullName>JiwaPriceSchemes, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaPriceSchemes.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaPriceSchemes.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1224219c-1a67-416f-992d-4c075752a00b</RecID>
      <AssemblyFullName>JiwaJobCosting, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaJobCosting.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaJobCosting.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>5b41ad16-7df7-4e47-857f-6961d62cc830</RecID>
      <AssemblyFullName>JiwaSerialNumbersUI, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaSerialNumbersUI.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaSerialNumbersUI.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>9a5f8c3d-5c86-42b2-80f2-d4bbb792845f</RecID>
      <AssemblyFullName>LumenWorks.Framework.IO, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>LumenWorks.Framework.IO.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\LumenWorks.Framework.IO.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>96268e2d-090a-4499-914e-645cbca55678</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\EntityFramework.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ec060b2f-b4b3-4123-9e30-279feb736e31</RecID>
      <AssemblyFullName>JiwaJournalSets, Version=7.0.157.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>4ab04c87-8e1d-4bb6-b14b-493eef0bd8bd</RecID>
      <AssemblyFullName>JiwaLock, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaLock.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaLock.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8e4219fe-b642-4508-ac35-4a95e93f85e6</RecID>
      <AssemblyFullName>JiwaCashBook, Version=7.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaCashBook.dll</AssemblyName>
      <AssemblyLocation>C:\Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaCashBook.dll</AssemblyLocation>
    </Reference>
  </ReferenceCollection>
  <CustomFieldCollection>
    <CustomField>
      <RecID>d3c7df7b-0205-4ebf-ab3c-b4f73018d2ed</RecID>
      <Name>FreightChargePerKg</Name>
      <Description>Enter the freight charge per Kg</Description>
      <DisplayOrder>1</DisplayOrder>
      <CellType>Float</CellType>
      <CustomFieldModule>Debtor Maintenance</CustomFieldModule>
    </CustomField>
    <CustomField>
      <RecID>c9923091-9188-4b60-8c05-5560780d1b7d</RecID>
      <Name>IncludeFreightOnLineItems</Name>
      <Description>Tick to include freight charge in item sell price</Description>
      <DisplayOrder>2</DisplayOrder>
      <CellType>Checkbox</CellType>
      <CustomFieldModule>Debtor Maintenance</CustomFieldModule>
    </CustomField>
  </CustomFieldCollection>
</JiwaDocument>