<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Sales Order Inquiry -- Wrong Figure]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8831&amp;type=atom" />
	<updated>2020-06-13T07:26:52Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8831</id>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37637#p37637" />
			<content type="html"><![CDATA[<p>This has now been fixed. Committed to Stable repo 2.4.8.</p><p>The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/sales/includes/db/sales_order_db.inc">here</a>. Please replace.</p><p>Thanks for reporting this.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-06-13T07:26:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37637#p37637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37632#p37632" />
			<content type="html"><![CDATA[<p>I will have a look at this.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-06-12T11:50:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37632#p37632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37631#p37631" />
			<content type="html"><![CDATA[<p>Fix is here.</p><p>Change the lines of the function get_sql_for_sales_order_view() as follows</p><div class="codebox"><pre><code>function get_sql_for_sales_orders_view($trans_type, $trans_no, $filter,
    $stock_item=&#039;&#039;, $from=&#039;&#039;, $to=&#039;&#039;, $ref=&#039;&#039;, $location=ALL_TEXT, $customer_id=ALL_TEXT)
{

    if ($filter==&#039;OutstandingOnly&#039;)
        $order_value = &#039;Sum(line.unit_price*(line.quantity-line.qty_sent)*(1-line.discount_percent))+freight_cost AS OrderValue,&#039;;
    else
        $order_value = &#039;Sum(line.unit_price*line.quantity*(1-line.discount_percent))+freight_cost AS OrderValue,&#039;;

    $sql = &quot;SELECT
            sorder.order_no,
            sorder.reference,
            debtor.name,
            branch.br_name,&quot;
            .($filter==&#039;InvoiceTemplates&#039;
                || $filter==&#039;DeliveryTemplates&#039; ?
             &quot;sorder.comments, &quot; : &quot;sorder.customer_ref, &quot;)
            .&quot;sorder.ord_date,
            sorder.delivery_date,
            sorder.deliver_to,
            $order_value
            sorder.type,
            debtor.curr_code,
            Sum(line.qty_sent) AS TotDelivered,
            Sum(line.quantity) AS TotQuantity,
            Sum(line.invoiced) AS TotInvoiced,
            alloc,
            prep_amount,
            allocs.ord_payments,
            inv.inv_payments,
            sorder.total,
            sorder.trans_type</code></pre></div>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2020-06-12T11:26:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37631#p37631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37617#p37617" />
			<content type="html"><![CDATA[<p>@joe: need this fix?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-06-11T18:27:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37617#p37617</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37610#p37610" />
			<content type="html"><![CDATA[<p>Ok&nbsp; that&#039;s fine. I got your point now. It&#039;s simple dude. You can do this easily by taking the items difference with quantity and qty_sent from sales order.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-06-11T08:22:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37610#p37610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37609#p37609" />
			<content type="html"><![CDATA[<p>No, If we go through Menu <strong>Sales Order Inquiry</strong> then it shows Order Total.</p><p>But if we go through Menu <strong>Delivery Against Sales Order </strong> then it is supposed to show the Total of Outstanding.</p><p>In the above case I mentioned <strong>Delivery Against Sales Order</strong> is not showing the Total of Outstanding correctly.</p><p>The Order was big and all items are fully delivered except for one that I highlighted.</p><p>The system shall show the Total Outstanding as 90,000 (5 * 18000)&nbsp; but it is showing 108,000 (6 * 18,000).</p><p>Regards.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2020-06-11T07:18:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37609#p37609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37608#p37608" />
			<content type="html"><![CDATA[<p>There we are showing the order total. Not the total of outstanding. If required. You can add one more column and show the difference in separate like outstanding. Or yet to deliver.&nbsp; Hope that&#039;s the way to solve it</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-06-11T03:14:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37608#p37608</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Sales Order Inquiry -- Wrong Figure]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=37605#p37605" />
			<content type="html"><![CDATA[<p>When we check the Delivery Against Sales Order Inquiry View, it shows the Order Total Value for the Value of the order that is still not delivered. But there is still an anomaly there.</p><p>In the attached image you can find that there was big order and all delivered except for one item.</p><p>That items total value in the order is 108,000.</p><p>Undelivered is 5 out of 6. </p><p>The inquiry page shall show the amount 90,000 but it is showing 108,000.</p><p>If this is a bug then need a fix. Or if I am mis interpreting it then please let me know.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2020-06-10T12:14:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=37605#p37605</id>
		</entry>
</feed>
