<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Auto Numbering on Item Code]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5889</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5889&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Auto Numbering on Item Code.]]></description>
		<lastBuildDate>Mon, 23 Oct 2017 11:41:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29164#p29164</link>
			<description><![CDATA[<p>The problem here is I think if you want to auto increment both sales kit and item separately. Because of the database, sales kit and item can not have the same number. So, you can not have item with item code 1 and sales kit with item code 1. If you want to auto increment, you can not separate item and sales kit numbering. Use one counter for both item code and sales kit, then there will be no problem.</p><div class="quotebox"><cite>gj6n68 wrote:</cite><blockquote><p>Hello,<br />I have to admit I didn&#039;t know the complexity of sales kit and he circular referencing.</p><p>Does this mean that we cannot at all apply auto increment just on item codes ? Or would it still be possible to create something like transaction references for item code field only, and let sales kit module work as it is ?</p><p>I mean instead of inputting the item code manually can&#039;t we automate it, how would that conflict with stock id convention.</p><div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>The SalesKit circular issue is a bit more complex even if the self choosability of level 1 is implemented..<br />SalesKit SK1 is created to have some items.<br />SalesKit SK2 has some items.<br />SalesKit SK3 has some items and SalesKit1 as part of it.<br />SalesKit SK3 is now added to be part of SK2.<br />SalesKit SK1 will now be able to choose SK2 which in turn has SK3 with in turn comprises of SK1 itself!.</p><p>A complete self join based tree lookup with multiple &#039;inheritances&#039; would need to be implemented.</p><p>So let us keep it simple even if slightly stupid!</p></blockquote></div></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Mon, 23 Oct 2017 11:41:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29164#p29164</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29163#p29163</link>
			<description><![CDATA[<p>Hello,<br />I have to admit I didn&#039;t know the complexity of sales kit and he circular referencing.</p><p>Does this mean that we cannot at all apply auto increment just on item codes ? Or would it still be possible to create something like transaction references for item code field only, and let sales kit module work as it is ?</p><p>I mean instead of inputting the item code manually can&#039;t we automate it, how would that conflict with stock id convention.</p><div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>The SalesKit circular issue is a bit more complex even if the self choosability of level 1 is implemented..<br />SalesKit SK1 is created to have some items.<br />SalesKit SK2 has some items.<br />SalesKit SK3 has some items and SalesKit1 as part of it.<br />SalesKit SK3 is now added to be part of SK2.<br />SalesKit SK1 will now be able to choose SK2 which in turn has SK3 with in turn comprises of SK1 itself!.</p><p>A complete self join based tree lookup with multiple &#039;inheritances&#039; would need to be implemented.</p><p>So let us keep it simple even if slightly stupid!</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (gj6n68)]]></author>
			<pubDate>Mon, 23 Oct 2017 11:35:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29163#p29163</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29151#p29151</link>
			<description><![CDATA[<p>The SalesKit circular issue is a bit more complex even if the self choosability of level 1 is implemented..<br />SalesKit SK1 is created to have some items.<br />SalesKit SK2 has some items.<br />SalesKit SK3 has some items and SalesKit1 as part of it.<br />SalesKit SK3 is now added to be part of SK2.<br />SalesKit SK1 will now be able to choose SK2 which in turn has SK3 with in turn comprises of SK1 itself!.</p><p>A complete self join based tree lookup with multiple &#039;inheritances&#039; would need to be implemented.</p><p>So let us keep it simple even if slightly stupid!</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 23 Oct 2017 03:20:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29151#p29151</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29144#p29144</link>
			<description><![CDATA[<p>For sales kit within sales kit problem, I think in the item code, there should be an additional column to indicate whether it is a normal item or a sales kit or just add additional table of sales kit that record the sales kit code. That way, the dropdown menu can be generated without including sales kit, if we assume sales kit can not contain another sales kit. On the other case, maybe just add some validation so that the user can not select sales kit that has same code as the sales kit that are being edited in the screen. It would prevent the user to create sales kit inception.</p><p>As for the auto increment, I will need to implement auto increment number for my project so in the future, maybe I will have some question or suggestion. In my mind now, I will create a table that hold the sequence number for normal item and sales kit. In the normal item form, I will query this table and when the item is inserted, I will increase the number in the database. The only problem is primary key duplication. That way you can define some rule, maybe give some prefix.</p>]]></description>
			<author><![CDATA[null@example.com (barbarian)]]></author>
			<pubDate>Sun, 22 Oct 2017 05:15:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29144#p29144</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29119#p29119</link>
			<description><![CDATA[<p>There is another issue that appears. When we try to add one more item to a SalesKit, the SalesKit (the one we are adding to) appears in the selection drop down box and we can actually get into a circular binge! If some other SalesKits are chosen then it may be okay and that too only if this current one is not part of the SalesKit we are adding.....This may not really be a problem if the Sales Kit being added to another Sales Kit gets populated by it&#039;s constituent items!</p><p>If we can replace the primary key id with the stock_id and item_code as a compound primary key in the item_codes table and re-code all the classes and functions to adhere to it, then maybe we can do what you want. It will probably break a few extensions as well!</p><p>@joe: good to have.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 20 Oct 2017 19:44:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29119#p29119</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29118#p29118</link>
			<description><![CDATA[<p>Sounds good so far.</p><p>So what would I need to do for the item codes to get auto populated and have auto increment ?</p><p>Is there a little piece of code which I can manipulate without disturbing the whole setup ?</p><p>Please let me know.</p><p>Thank you,<br />GJ</p>]]></description>
			<author><![CDATA[null@example.com (gj6n68)]]></author>
			<pubDate>Fri, 20 Oct 2017 16:42:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29118#p29118</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29116#p29116</link>
			<description><![CDATA[<p>Actually the Uniqueness for the said couple of fields is enforced by an index. It could have been the compound primary key in which case your need would be satisfied.<br />FA for the most part has tables with just one single primary key to make it easy to code record manipulations (select, update,delete).</p><p>The fields <strong>stock_id</strong> and <strong>item_code</strong> are both generally VARCHAR(20 except a few of the former are CHAR(20) in all tables they are part of. <strong>The varied definition is probably an error or some index justification.</strong></p><div class="codebox"><pre><code>grep stock_id sql/en_US-new.sql

  `item_code` varchar(20) NOT NULL default &#039;&#039;,
 `item_code` varchar(20) NOT NULL,
  `item_code` varchar(20) NOT NULL default &#039;&#039;,

grep item_code sql/en_US-new.sql

  `stock_id` varchar(20) NOT NULL default &#039;&#039;,
  `stock_id` varchar(20) NOT NULL,
  `stock_id` char(20) NOT NULL default &#039;&#039;,
  `stock_id` varchar(20) NOT NULL default &#039;&#039;,
  `stock_id` char(20) NOT NULL default &#039;&#039;,
  `stock_id` varchar(20) NOT NULL default &#039;&#039;,
  `stock_id` char(20) NOT NULL DEFAULT &#039;&#039;,
  `stock_id` varchar(20) NOT NULL default &#039;&#039;,
  `stock_id` varchar(20) NOT NULL default &#039;&#039;,
  `stock_id` varchar(40) default NULL,
  `stock_id` char(20) NOT NULL default &#039;&#039;,</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 20 Oct 2017 16:17:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29116#p29116</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29115#p29115</link>
			<description><![CDATA[<p>Hello,</p><p>Though I am not fully at grips with the concept of sales kit and separate item codes within them, I believe if we were to provide a system like that in transaction references where there would be a defined prefix for sales kits and item codes, won&#039;t it make them both always unique ? And then even if they were used in combination, they would never conflict I believe.</p><p>For example Sales Kit = SK### and Item code = IC###</p><p>Even if they were combined ever, they won&#039;t conflict.</p><p>Now above can only be done if the codes can be both alphanumeric etc.</p><p>Hope I am making some sense.</p><p>Regards,<br />GJ</p>]]></description>
			<author><![CDATA[null@example.com (gj6n68)]]></author>
			<pubDate>Fri, 20 Oct 2017 16:04:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29115#p29115</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29088#p29088</link>
			<description><![CDATA[<p>Each <a href="https://frontaccounting.com/fawiki/index.php?n=Help.SalesKitsAndAliasCodes">Sales Kit</a> has a separate item_code of it&#039;s own in FA. The Sales invoice will only reflect the individual items and not the Sales Kit name. In fact, the <strong>item_codes</strong> table has <em>some redundancy in the description of the Sales Kit name</em> (see attachment)&nbsp; that is duplicated for each constituent item in it. This normalisation issue may the cause of it&#039;s inability to provide the unique auto numbered <strong>item_code</strong> to the constituent items of a SalesKit when more than one constituent item exists. As the said table has a separate auto-numbered id field manipulating each entry individually is not hampered when just the id of the record is provided. But when several constituent items are inserted in sequence this will be an issue if the actual item_code is not properly coded into them and the next one is invoked each time.</p><p>Wonder which field or what logic distinguishes a SalesKit from a normal item......</p><p>@joe: this needs investigation.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 19 Oct 2017 02:48:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29088#p29088</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29083#p29083</link>
			<description><![CDATA[<p>Hello,</p><p>Just wondering if this has been possible at all ?</p><p>I searched wiki but couldn&#039;t find anything about auto increment, though when I search in database via php, I can see there is option for auto increment, but if I try to apply it, I get an error.</p><p>This would be a helpful tweak if possible at all.</p><p>Thank you,<br />GJ</p>]]></description>
			<author><![CDATA[null@example.com (gj6n68)]]></author>
			<pubDate>Tue, 17 Oct 2017 20:54:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29083#p29083</guid>
		</item>
		<item>
			<title><![CDATA[Re: Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24138#p24138</link>
			<description><![CDATA[<p>Yes you can add auto item codes for it.&nbsp; Check wiki there is some informations about it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 30 Aug 2015 00:34:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24138#p24138</guid>
		</item>
		<item>
			<title><![CDATA[Auto Numbering on Item Code]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24031#p24031</link>
			<description><![CDATA[<p>Based from my initial test, Item and Sales Kit code should have a unique code.&nbsp; &nbsp;I would say that it is like Part Numbering System by which from my understanding should be unique for every item.&nbsp; Did anyone creates a code that automate the numbering of Item Code / Sale Kit?.&nbsp; On Set-up Tab - Form Setup, I saw that the user can control the sequence of each document number but still has an option to put different number if the user want to.&nbsp; Can we do that as well in Item Code numbering?&nbsp; I am not that good in PHP, so hope to get answer from this forum.&nbsp; Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (deit_phil)]]></author>
			<pubDate>Tue, 11 Aug 2015 05:39:40 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24031#p24031</guid>
		</item>
	</channel>
</rss>
