<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Duplicate code in WriteOff in FA 2.3]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6778&amp;type=atom" />
	<updated>2017-05-11T17:58:30Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6778</id>
		<entry>
			<title type="html"><![CDATA[Re: Duplicate code in WriteOff in FA 2.3]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27797#p27797" />
			<content type="html"><![CDATA[<p>Thanks for the insight @joe.</p><p>The WriteOff has both a positive and negative entry pair for quantity: <strong>$credit_line-&gt;qty_dispatched</strong> in the database. <a href="https://github.com/apmuthu/frontaccounting/commit/30e85d8c17ee5c9ef41331f6791d68a93a248ce2">Restored code</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-05-11T17:58:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27797#p27797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Duplicate code in WriteOff in FA 2.3]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27786#p27786" />
			<content type="html"><![CDATA[<p>No this is not a duplicate code. This is an outgoing and an ingoing stamp with writeoff reference. These 2 transactions is not seen in the stock movements transactions.</p><p>So you will not see anything in the stock movements. Only when looking into the database.</p><p>This has been changed slightly in 2.4.</p><p>Due to no sideeffects in 2.3 as it is now, we will not change anything here.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-05-11T06:52:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27786#p27786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Duplicate code in WriteOff in FA 2.3]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27784#p27784" />
			<content type="html"><![CDATA[<p>In FA 2.3.x, lines 202-206 in <strong>sales/includes/db/sales_credit_db.inc</strong>:<br /></p><div class="codebox"><pre><code>add_stock_move_customer(ST_CUSTCREDIT,  $credit_line-&gt;stock_id,
        key($credit_note-&gt;trans_no), $credit_note-&gt;Location,
        $credit_note-&gt;document_date, $reference, -$credit_line-&gt;qty_dispatched,
        $curr_std_cost,  0, $price,
        $credit_line-&gt;discount_percent);</code></pre></div><p>are duplicately executed for <strong>$credit_type <em>WriteOff</em></strong> as it is present in lines 209-213 as well.</p><p><a href="https://github.com/apmuthu/frontaccounting/commit/7b1a8703ac91dadbd3f038d340fb80d9d8899818">Committed</a> in my repo&#039;s FAMods.</p><p>@joe: can update in upstream.</p><p>In FA 2.4, there appears to be no <em>WriteOff</em> distinction for the <strong>$credit_type</strong> and it stands <a href="https://github.com/FrontAccountingERP/FA/commit/ac28b765bd97e55707707abe96bb37c99da6d6c9">committed</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-05-10T21:44:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27784#p27784</id>
		</entry>
</feed>
