<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Bug in Supplier Credit Note Edit]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8889</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8889&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bug in Supplier Credit Note Edit.]]></description>
		<lastBuildDate>Fri, 31 Jul 2020 08:20:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bug in Supplier Credit Note Edit]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37883#p37883</link>
			<description><![CDATA[<p>Hello Guys,</p><p>I couldn&#039;t find any better solution, so I have followed @Braath Waate&#039;s solution. I hope it works and please help testing it.</p><p>The changes will be committed to repo asap.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 31 Jul 2020 08:20:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37883#p37883</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Supplier Credit Note Edit]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37875#p37875</link>
			<description><![CDATA[<p>@joe: check if it needs to get into the core.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 30 Jul 2020 19:50:47 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37875#p37875</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Supplier Credit Note Edit]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37865#p37865</link>
			<description><![CDATA[<p>@BraathWate it worked. Thanks</p>]]></description>
			<author><![CDATA[null@example.com (boxygen)]]></author>
			<pubDate>Wed, 29 Jul 2020 13:15:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37865#p37865</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Supplier Credit Note Edit]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37864#p37864</link>
			<description><![CDATA[<div class="codebox"><pre><code>diff --git a/core/purchasing/includes/supp_trans_class.inc b/core/purchasing/includes/supp_trans_class.inc
index be9ec00..5a17f86 100644
--- a/core/purchasing/includes/supp_trans_class.inc
+++ b/core/purchasing/includes/supp_trans_class.inc
@@ -66,7 +66,7 @@ class supp_trans
                        read_supp_invoice($trans_no, $trans_type, $this);
                        if ($trans_type == ST_SUPPCREDIT)
                        {
-                               $this-&gt;src_docs = find_src_invoices($trans_no);
+                               $this-&gt;src_docs = find_src_invoices($this);
                        }
                        read_supplier_details_to_trans($this, $this-&gt;supplier_id);
                }
diff --git a/core/purchasing/supplier_credit.php b/core/purchasing/supplier_credit.php
index 461c804..070afda 100644
--- a/core/purchasing/supplier_credit.php
+++ b/core/purchasing/supplier_credit.php
@@ -28,8 +28,12 @@ if (user_use_date_picker())
 
 //----------------------------------------------------------------------------------------
 
-if (isset($_GET[&#039;ModifyCredit&#039;]))
+if (isset($_GET[&#039;ModifyCredit&#039;])) {
        check_is_editable(ST_SUPPCREDIT, $_GET[&#039;ModifyCredit&#039;]);
+    $_SESSION[&#039;page_title&#039;] = sprintf( _(&quot;Modifying Supplier Credit # %d&quot;), $_GET[&#039;ModifyCredit&#039;]);
+    $_SESSION[&#039;supp_trans&#039;] = new supp_trans(ST_SUPPCREDIT, $_GET[&#039;ModifyCredit&#039;]);
+}
+

 
 //---------------------------------------------------------------------------------------------------</code></pre></div><p>I doubt the old code ever worked.&nbsp; I looked at the change history for related files and nothing has been changed that would have caused this to break.&nbsp; The proposed change above is incomplete and untested; G/L line items cannot be edited, only added or deleted.</p>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Wed, 29 Jul 2020 13:02:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37864#p37864</guid>
		</item>
		<item>
			<title><![CDATA[Bug in Supplier Credit Note Edit]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37863#p37863</link>
			<description><![CDATA[<p>When I tried to Edit Credit Note of Supplier in FA 2.4.8 I faced following bug. My PHP is 7.4</p><div class="codebox"><pre><code>Trying to get property &#039;Comments&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 16
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;tran_date&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 17
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;due_date&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 18
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;supp_reference&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 19
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;reference&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 20
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;supplier_id&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 21
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;dimension&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 22
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;dimension2&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 23
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;ex_rate&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 25
/home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc:80:    copy_from_trans(&#039;&#039;)
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;trans_type&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 86
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;trans_no&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 97
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Trying to get property &#039;supplier_id&#039; of non-object in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 104
/home/pakerp/web/core.pakerp.net/public_html/purchasing/supplier_credit.php:348:    invoice_header(&#039;&#039;)
Unhandled exception [0]: Call to a member function clear_items() on null. in file: /home/pakerp/web/core.pakerp.net/public_html/purchasing/includes/ui/invoice_ui.inc at line 109
exception_handler((Error Object))</code></pre></div><p>I don&#039;t think its a PHP related bug. The Session Variable is not instantiated.</p><p>Here is the Screen shot <a href="https://prnt.sc/tqcosv">https://prnt.sc/tqcosv</a></p>]]></description>
			<author><![CDATA[null@example.com (boxygen)]]></author>
			<pubDate>Wed, 29 Jul 2020 07:19:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37863#p37863</guid>
		</item>
	</channel>
</rss>
