<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Accounting systems &#187; Intact</title>
	<atom:link href="http://accountingsystems.ie/?feed=rss2&#038;cat=5" rel="self" type="application/rss+xml" />
	<link>http://accountingsystems.ie</link>
	<description>Our free tips and tricks blog for Intact accounts, Sage, Syspro, Quickbook and bits of SAP and Oracle</description>
	<lastBuildDate>Tue, 06 Jul 2010 19:48:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Downloading Customer data from Intact Business Accounting</title>
		<link>http://accountingsystems.ie/?p=5</link>
		<comments>http://accountingsystems.ie/?p=5#comments</comments>
		<pubDate>Wed, 07 Apr 2010 09:28:32 +0000</pubDate>
		<dc:creator>Patrick Jones</dc:creator>
				<category><![CDATA[Intact]]></category>

		<guid isPermaLink="false">http://accountingsystems.ie/?p=5</guid>
		<description><![CDATA[Intact Business Accounting has an SDK which is exposed for all developers and available in the system.  The following sample shows how we load the customer data into an Access database for use with our MASC Product. If you are using Intact and have any questions leave me a comment and I will reply.

&#160;
Function [...]]]></description>
			<content:encoded><![CDATA[<p>Intact Business Accounting has an SDK which is exposed for all developers and available in the system.  The following sample shows how we load the customer data into an Access database for use with our MASC Product. If you are using Intact and have any questions leave me a comment and I will reply.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&nbsp;
<span style="color: #000080;">Function</span> LoadCust()
<span style="color: #000080;">On</span> <span style="color: #000080;">Error</span> <span style="color: #000080;">GoTo</span> Intact_Error
<span style="color: #000080;">Dim</span> IntactTable <span style="color: #000080;">As</span> <span style="color: #000080;">New</span> INTACTSDKTable
<span style="color: #000080;">Dim</span> tmpLastRecord, r, tmpCount, tmpCompany, tmpRcode
&nbsp;
tmpRcode = GetPref(<span style="color: #800000;">&quot;RouteCode Field Name&quot;</span>)
&nbsp;
Application.Echo <span style="color: #000080;">True</span>, <span style="color: #800000;">&quot;Linking to selected Intact Company&quot;</span>
&nbsp;
tmpCompany = GetPref(<span style="color: #800000;">&quot;Intact Company&quot;</span>)
IntactTable.CompanyDirectory (tmpCompany)
IntactTable.TableName (<span style="color: #800000;">&quot;CUSTS&quot;</span>)
&nbsp;
<span style="color: #008000;">'Clear customers and set reference to table
</span>CurrentDb.Execute (<span style="color: #800000;">&quot;Delete * from tblCustomers&quot;</span>)
CurrentDb.Execute (<span style="color: #800000;">&quot;Delete * from tblCustMemo&quot;</span>)
<span style="color: #000080;">Dim</span> rstCust <span style="color: #000080;">As</span> Recordset
<span style="color: #000080;">Set</span> rstCust = CurrentDb.OpenRecordset(<span style="color: #800000;">&quot;tblCustomers&quot;</span>)
&nbsp;
r = IntactTable.First
tmpLastRecord = <span style="color: #000080;">True</span>
tmpCount = 1
&nbsp;
<span style="color: #000080;">Do</span>
    rstCust.AddNew
&nbsp;
    <span style="color: #008000;">'Assign details
</span>    rstCust!ID = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;CODE&quot;</span>)
    Application.Echo <span style="color: #000080;">True</span>, <span style="color: #800000;">&quot;Adding Customer Seq:&quot;</span> &amp; tmpCount &amp; <span style="color: #800000;">&quot; :&quot;</span> &amp; IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;CODE&quot;</span>)
    tmpCount = tmpCount + 1
    rstCust!CustBarcode = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;CODE&quot;</span>)
    rstCust!CompanyName = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;NAME&quot;</span>)
    rstCust!Add1 = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ADR1&quot;</span>)
    rstCust!Add2 = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ADR2&quot;</span>)
    rstCust!Add3 = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ADR3&quot;</span>)
    rstCust!Town = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ADR4&quot;</span>)
    rstCust!County = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ADR5&quot;</span>)
    rstCust!Phone = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;PHONE1&quot;</span>)    
    rstCust!CPriceCode = IIf(Len(IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;LISTCODE&quot;</span>) &amp; <span style="color: #800000;">&quot;&quot;</span>) = 0, IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;CODE&quot;</span>), IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;LISTCODE&quot;</span>))
    <span style="color: #008000;">'Check Delivery Address
</span>    <span style="color: #000080;">If</span> Len(IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;HOCODE&quot;</span>) &amp; <span style="color: #800000;">&quot;&quot;</span>) &gt; 0 <span style="color: #000080;">Then</span>
        rstCust!MasterAccount = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;HOCODE&quot;</span>)
        rstCust!DeliveryAddress = -1
    <span style="color: #000080;">Else</span>
        rstCust!DeliveryAddress = 0
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    rstCust!RouteCode = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;Repcode&quot;</span>) <span style="color: #008000;">'tmpRcode) 'repcode
</span>    <span style="color: #008000;">'Frequency Check
</span>    <span style="color: #000080;">If</span> Len(IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXFREQ&quot;</span>) &amp; <span style="color: #800000;">&quot;&quot;</span>) &lt;&gt; 0 <span style="color: #000080;">And</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXFREQ&quot;</span>) &lt;&gt; <span style="color: #800000;">&quot;INVALID&quot;</span> <span style="color: #000080;">Then</span>
        rstCust!Frequency = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXFREQ&quot;</span>)
    <span style="color: #000080;">Else</span>
        rstCust!Frequency = <span style="color: #800000;">&quot;Docket&quot;</span>
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    <span style="color: #008000;">'Priced Check
</span>    <span style="color: #000080;">If</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXPRICED&quot;</span>) = <span style="color: #800000;">&quot;t&quot;</span> <span style="color: #000080;">Then</span>
        rstCust!Priced = -1
    <span style="color: #000080;">Else</span>
        rstCust!Priced = 0
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    <span style="color: #008000;">'Active Check
</span>    <span style="color: #000080;">If</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXACTIVE&quot;</span>) = <span style="color: #800000;">&quot;t&quot;</span> <span style="color: #000080;">Or</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXACTIVE&quot;</span>) = <span style="color: #800000;">&quot;INVALID&quot;</span> <span style="color: #000080;">Or</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;XXACTIVE&quot;</span>) = <span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">Then</span>
        rstCust!Active = -1
    <span style="color: #000080;">Else</span>
        rstCust!Active = 0
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
    <span style="color: #000080;">If</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;ForceVat&quot;</span>) = <span style="color: #800000;">&quot;T&quot;</span> <span style="color: #000080;">Then</span>
        rstCust!C_Vol1 = 1
        rstCust!C_Vol2 = IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;DefVatCode&quot;</span>)
    <span style="color: #000080;">Else</span>
        rstCust!C_Vol1 = 0
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
    <span style="color: #008000;">'Other Fields
</span>    rstCust!InvoiceMovements = -1
    rstCust!<span style="color: #000080;">Currency</span> = <span style="color: #800000;">&quot;EUR&quot;</span>
    rstCust!Orders = 0
    rstCust!MESSCHK = 0
    rstCust!CustType = <span style="color: #800000;">&quot;RET&quot;</span>
    <span style="color: #008000;">'Update record
</span>    rstCust.Update
&nbsp;
    r = IntactTable.<span style="color: #000080;">Next</span>
&nbsp;
    <span style="color: #000080;">If</span> r = -90 <span style="color: #000080;">Then</span> tmpLastRecord = <span style="color: #000080;">False</span>
&nbsp;
    <span style="color: #000080;">If</span> IntactTable.fieldvalueasstring(<span style="color: #800000;">&quot;CODE&quot;</span>) = <span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">Then</span>
        tmpLastRecord = <span style="color: #000080;">False</span>
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">Loop</span> <span style="color: #000080;">While</span> tmpLastRecord
&nbsp;
<span style="color: #000080;">Set</span> rstCust = <span style="color: #000080;">Nothing</span>
<span style="color: #000080;">Set</span> IntactTable = <span style="color: #000080;">Nothing</span>
&nbsp;
<span style="color: #000080;">Exit</span> <span style="color: #000080;">Function</span>
&nbsp;
Intact_Error:
MsgBox <span style="color: #800000;">&quot;Intact Customer List Refresh &quot;</span> &amp; Err.Number &amp; vbCrLf &amp; <span style="color: #800000;">&quot;Details &quot;</span> &amp; Err.Description &amp; vbCrLf &amp; <span style="color: #800000;">&quot;Intact Msg:&quot;</span> &amp; GetIntactMsg(Err.Number)
&nbsp;
<span style="color: #000080;">Set</span> rstCust = <span style="color: #000080;">Nothing</span>
<span style="color: #000080;">Set</span> IntactTable = <span style="color: #000080;">Nothing</span>
&nbsp;
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://accountingsystems.ie/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
