<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Saving dimension id with Customer registeration]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9493&amp;type=atom" />
	<updated>2021-10-04T17:34:22Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=9493</id>
		<entry>
			<title type="html"><![CDATA[Re: Saving dimension id with Customer registeration]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40053#p40053" />
			<content type="html"><![CDATA[<p>Did you replace &quot;0, 0&quot; with &quot;$dimension_id, $dimension2_id&quot; ?<br />Or did you put in some $info[] element?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2021-10-04T17:34:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40053#p40053</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Saving dimension id with Customer registeration]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40052#p40052" />
			<content type="html"><![CDATA[<p>At the time the API was framed, dimensions may not have been available for customers.</p><p>I expect you are referring to <a href="https://github.com/apmuthu/FA24extensions/blob/master/Extensions/api24/src/Customers.php#L111">line 111</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2021-10-04T17:25:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40052#p40052</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Saving dimension id with Customer registeration]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40048#p40048" />
			<content type="html"><![CDATA[<p>My guess is that you found a bug in the API and fixed it.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2021-10-03T12:56:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40048#p40048</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Saving dimension id with Customer registeration]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40047#p40047" />
			<content type="html"><![CDATA[<p>Hi. </p><p>I have an issue in saving dimension id while i am creating the customer via API<br />Even if I pass my dimension id following the Test code below :- </p><p>const CUSTOMER_POST_DATA = array(<br />&nbsp; &nbsp; &#039;name&#039; =&gt; &#039;custname&#039;,<br />&nbsp; &nbsp; &#039;debtor_ref&#039; =&gt; &#039;debtor_ref&#039;,<br />&nbsp; &nbsp; &#039;address&#039; =&gt; &#039;address&#039;,<br />&nbsp; &nbsp; &#039;tax_id&#039; =&gt; &#039;tax_id&#039;,<br />&nbsp; &nbsp; &#039;curr_code&#039; =&gt; &#039;USD&#039;,<br />&nbsp; &nbsp; &#039;credit_status&#039; =&gt; &#039;1&#039;,<br />&nbsp; &nbsp; &#039;payment_terms&#039; =&gt; &#039;1&#039;,<br />&nbsp; &nbsp; &#039;discount&#039; =&gt; &#039;0&#039;,<br />&nbsp; &nbsp; &#039;pymt_discount&#039; =&gt; &#039;0&#039;,<br />&nbsp; &nbsp; &#039;credit_limit&#039; =&gt; &#039;1000&#039;,<br />&nbsp; &nbsp; &#039;sales_type&#039; =&gt; &#039;1&#039;,<br />&nbsp; &nbsp; &#039;notes&#039; =&gt; &#039;notes&#039;,<br />&nbsp; &nbsp; &#039;dimension_id&#039; =&gt; &#039;0&#039;,<br />&nbsp; &nbsp; &#039;dimension2_id&#039; =&gt; &#039;0&#039;,<br />&nbsp; &nbsp; &#039;inactive&#039; =&gt; &#039;0&#039;,<br />);</p><p>- It doesn&#039;t save the dimension id which i passed. <br />- So i did little bit study. And i found in Customers.php insert method line 114<br />&nbsp; &nbsp; &nbsp; &nbsp; add_customer($info[&#039;name&#039;], $info[&#039;debtor_ref&#039;], $info[&#039;address&#039;], $info[&#039;tax_id&#039;], $info[&#039;curr_code&#039;], 0, 0, $info[&#039;credit_status&#039;], $info[&#039;payment_terms&#039;], $info[&#039;discount&#039;], $info[&#039;pymt_discount&#039;], $info[&#039;credit_limit&#039;], $info[&#039;sales_type&#039;], $info[&#039;notes&#039;]);</p><p>The source code is putting both dimension ids as 0,0 Hardcoded.&nbsp; I tried them changing with dynamic values. And it worked. <br />But i need to know why they are hardcoded there while they are in the given test example ? </p><p>Is there any other way to do it ?</p><p>Waiting for an answer / Regards</p>]]></content>
			<author>
				<name><![CDATA[DrCard]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45206</uri>
			</author>
			<updated>2021-10-03T12:44:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40047#p40047</id>
		</entry>
</feed>
