<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Fixed Assets inquiry has not connected with right GRN]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=9800</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9800&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Fixed Assets inquiry has not connected with right GRN.]]></description>
		<lastBuildDate>Sat, 07 May 2022 14:49:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Fixed Assets inquiry has not connected with right GRN]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41016#p41016</link>
			<description><![CDATA[<p>From fixed assets inquiry page, we have a purchased column with link, thats giving wrong trans_no. </p><p><strong>get_fixed_asset_purchase</strong>&nbsp; function get invoice now, how do we link the invoice trans no in place of&nbsp; GRN&nbsp; trans no. </p><div class="codebox"><pre><code>function purchase_link($row)
{

      if ($row[&#039;purchase_date&#039;] === NULL)
        return &quot;&quot;;

      return get_supplier_trans_view_str(ST_SUPPRECEIVE, $row[&quot;purchase_no&quot;], sql2date($row[&quot;purchase_date&quot;]));
}</code></pre></div><p>Here the $row[&#039;purchase_no&#039;] has not exist.&nbsp; </p><div class="codebox"><pre><code>function purchase_link($row)
{

      if ($row[&#039;purchase_date&#039;] === NULL)
        return &quot;&quot;;
      //my suggestion would be something like this to get GRN now.
       $sql =&quot;SELECT trans_no FROM &quot;.TB_PREF.&quot;stock_moves WHERE 1=1 AND type =&quot;.ST_SUPPRECEIVE.&quot; AND stock_id =&quot;.db_escape($row[&#039;stock_id&#039;]).&quot; AND qty &gt; &#039;0&#039; &quot;;
      $res = db_query($sql, &quot;Can&#039;t get grn no&quot;);
       $row2=db_fetch($res);

     return get_supplier_trans_view_str(ST_SUPPRECEIVE, $rows[&quot;trans_no&quot;], sql2date($row[&quot;purchase_date&quot;]));
}</code></pre></div><p>@Joe, check it.&nbsp; otherwise we need to connect the invoice, instead of the GRN in purchase link.</p><p>and also i see, we can try the depreciation start with the date given from fixed assets input date. i dont know the reason why we are using every month start date.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 07 May 2022 14:49:27 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41016#p41016</guid>
		</item>
	</channel>
</rss>
