<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Print Sales Orders]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7263</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7263&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Print Sales Orders.]]></description>
		<lastBuildDate>Sat, 13 Jan 2018 10:59:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30507#p30507</link>
			<description><![CDATA[<p>Follow @joe&#039;s instructions by choosing the smaller number in &quot;From&quot; and larger Number in &quot;To&quot;.</p><p>If the problem still occurs in your installation, then troubleshoot as below.</p><p>The function <strong>get_sales_order_header()</strong> in <strong>sales/includes/db/sales_order_db.inc</strong> is where this error emanates.<br />It is possible that the database may be missing some records.<br />Try this set of SQLs (with your table prefixes - set as 1_ here in 9 places) for each of the error pairs of type and order number in phpMyAdmin or any MySQL client:<br /></p><div class="codebox"><pre><code>SET @typ = 30;
SET @ono = 28; -- test with 29, 38, 71, 82 and 462 where the error occurs as well

SELECT sorder.*,
      cust.name,
      cust.curr_code,
      cust.address,
      loc.location_name,
      cust.discount,
      stype.sales_type,
      stype.id AS sales_type_id,
      stype.tax_included,
      stype.factor,
       ship.shipper_name,
      tax_group.name AS tax_group_name,
      tax_group.id AS tax_group_id,
      cust.tax_id,
      sorder.alloc,
      IFNULL(allocs.ord_allocs, 0)+IFNULL(inv.inv_allocs ,0) AS sum_paid,
      sorder.prep_amount&gt;0 AS prepaid
    FROM 1_sales_orders sorder
            LEFT JOIN (SELECT trans_no_to, SUM(amt) ord_allocs FROM 1_cust_allocations
                WHERE trans_type_to=30 AND trans_no_to=@ono GROUP BY trans_no_to)
                 allocs ON sorder.trans_type=30 AND allocs.trans_no_to=sorder.order_no
            LEFT JOIN (SELECT order_, SUM(alloc) inv_allocs FROM 1_debtor_trans 
                WHERE TYPE=10 AND order_=@ono  GROUP BY order_)
                 inv ON sorder.trans_type=30 AND inv.order_=sorder.order_no
            LEFT JOIN 1_shippers ship ON  ship.shipper_id = sorder.ship_via,
      1_debtors_master cust,
      1_sales_types stype, 
      1_tax_groups tax_group, 
      1_cust_branch branch,
      1_locations loc
    WHERE sorder.order_type=stype.id
        AND branch.branch_code = sorder.branch_code
        AND branch.tax_group_id = tax_group.id
        AND sorder.debtor_no = cust.debtor_no
        AND loc.loc_code = sorder.from_stk_loc
        AND sorder.trans_type = @typ
        AND sorder.order_no = @ono;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 13 Jan 2018 10:59:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30507#p30507</guid>
		</item>
		<item>
			<title><![CDATA[Re: Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30504#p30504</link>
			<description><![CDATA[<p>There is a problem with the new pattern for references if it straddles fiscal years. See <a href="https://frontaccounting.com/punbb/viewtopic.php?pid=30502#p30502">here</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 13 Jan 2018 07:04:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30504#p30504</guid>
		</item>
		<item>
			<title><![CDATA[Re: Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30503#p30503</link>
			<description><![CDATA[<p>I have no problems selecting and printing sales orders.</p><p>In the first combobox select the lowest ref number you want.<br />In the second combobox select the highest ref you want.</p><p>There might be some problems selecting the auto references created from direct deliveries and direct invoices, however these might not be very interesting.</p><p>In the Sales Order Inquiry you can easily print the auto referenced.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 13 Jan 2018 06:59:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30503#p30503</guid>
		</item>
		<item>
			<title><![CDATA[Re: Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30500#p30500</link>
			<description><![CDATA[<p>in my old FA installation 2.4 beta i used to select the latest (newest) invoice in the &quot;from&quot; drop down and the 1st issued invoice (oldest) in the &quot;to&quot; .. it used to work.. </p><p>now when i try it in 2.4.3 i get white pdf.. but if i do it the other way by selecting the oldest invoice in the &quot;From&quot; and the newest in the &quot;to&quot; .. the report is generated successfully, but i get the following errors<br />You have missing or invalid sales document in database (type:30, number:28).<br />You have missing or invalid sales document in database (type:30, number:29).<br />You have missing or invalid sales document in database (type:30, number:38).<br />You have missing or invalid sales document in database (type:30, number:71).<br />You have missing or invalid sales document in database (type:30, number:82).<br />You have missing or invalid sales document in database (type:30, number:462).</p><p>https://ibb.co/du6G6m</p>]]></description>
			<author><![CDATA[null@example.com (Alaa)]]></author>
			<pubDate>Fri, 12 Jan 2018 21:07:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30500#p30500</guid>
		</item>
		<item>
			<title><![CDATA[Re: Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30492#p30492</link>
			<description><![CDATA[<p>You know that the records are presented in falling order. Last first in both combo boxes. Are you sure that you got the sequence right?</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 12 Jan 2018 13:33:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30492#p30492</guid>
		</item>
		<item>
			<title><![CDATA[Print Sales Orders]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30491#p30491</link>
			<description><![CDATA[<p>Hello,&nbsp; <br />it seems there is a bug when trying to Generate &quot;Print Sales Orders&quot; ID 109.<br />if you select to print just 1 sale order.. like the last sales order it works.. but if you select a range of sales order &quot;multiple sales order&quot;&nbsp; like 2 or more than one sale order then you get a white pdf.</p><p>i could produce this on the demo FA website.</p>]]></description>
			<author><![CDATA[null@example.com (Alaa)]]></author>
			<pubDate>Fri, 12 Jan 2018 11:39:46 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30491#p30491</guid>
		</item>
	</channel>
</rss>
