<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=VbzCart%2Fqueries%2FqryPkgLines_qtys_done_ord_sum</id>
	<title>VbzCart/queries/qryPkgLines qtys done ord sum - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=VbzCart%2Fqueries%2FqryPkgLines_qtys_done_ord_sum"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/queries/qryPkgLines_qtys_done_ord_sum&amp;action=history"/>
	<updated>2026-07-06T04:08:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/queries/qryPkgLines_qtys_done_ord_sum&amp;diff=15390&amp;oldid=prev</id>
		<title>Woozle: status: not useful</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/queries/qryPkgLines_qtys_done_ord_sum&amp;diff=15390&amp;oldid=prev"/>
		<updated>2011-06-01T01:54:13Z</updated>

		<summary type="html">&lt;p&gt;status: not useful&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:54, 1 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==About==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==About==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Status&#039;&#039;&#039;: not useful at this point; filtering &#039;&#039;after&#039;&#039; this stage doesn&#039;t speed things up. The filtering has to be done &#039;&#039;before&#039;&#039; the grouping takes place. This query can probably be discarded.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Requires&amp;#039;&amp;#039;&amp;#039;: {{vbzcart/query|qryPkgLines_qtys_done}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Requires&amp;#039;&amp;#039;&amp;#039;: {{vbzcart/query|qryPkgLines_qtys_done}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;: sum of &amp;quot;done&amp;quot; quantities for all packages which have been checked in each order&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;: sum of &amp;quot;done&amp;quot; quantities for all packages which have been checked in each order&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In other words, you get one record for each item in an order; that record gives the sum of quantities &amp;quot;done&amp;quot; for that item across all &amp;quot;checked&amp;quot; packages. This lets you know how many of each item remain open (to be filled).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In other words, you get one record for each item in an order; that record gives the sum of quantities &amp;quot;done&amp;quot; for that item across all &amp;quot;checked&amp;quot; packages. This lets you know how many of each item remain open (to be filled).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** This &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is &lt;/del&gt;intended to then be filtered by ID_Order, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otherwise &lt;/del&gt;it &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;can take &lt;/del&gt;30-40 seconds &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to return results&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** This &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;was &lt;/ins&gt;intended to then be filtered by ID_Order, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;so &lt;/ins&gt;it &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wouldn&#039;t be pulling in a lot of data it doesn&#039;t need, but apparently MySQL isn&#039;t clever enough to figure that out; it still takes &lt;/ins&gt;30-40 seconds &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;even when filtering for just one order&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** There is also PHP code somewhere which does this, but I needed to be able to pull these numbers up in w3tpl.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** There is also PHP code somewhere which does this, but I needed to be able to pull these numbers up in w3tpl.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;History&amp;#039;&amp;#039;&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;History&amp;#039;&amp;#039;&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/queries/qryPkgLines_qtys_done_ord_sum&amp;diff=15389&amp;oldid=prev</id>
		<title>Woozle: Created page with &quot;==About== * &#039;&#039;&#039;Requires&#039;&#039;&#039;: {{vbzcart/query|qryPkgLines_qtys_done}} * &#039;&#039;&#039;Returns&#039;&#039;&#039;: sum of &quot;done&quot; quantities for all packages which have been checked in each order ** In other w...&quot;</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/queries/qryPkgLines_qtys_done_ord_sum&amp;diff=15389&amp;oldid=prev"/>
		<updated>2011-06-01T01:49:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==About== * &amp;#039;&amp;#039;&amp;#039;Requires&amp;#039;&amp;#039;&amp;#039;: {{vbzcart/query|qryPkgLines_qtys_done}} * &amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;: sum of &amp;quot;done&amp;quot; quantities for all packages which have been checked in each order ** In other w...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==About==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Requires&amp;#039;&amp;#039;&amp;#039;: {{vbzcart/query|qryPkgLines_qtys_done}}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;: sum of &amp;quot;done&amp;quot; quantities for all packages which have been checked in each order&lt;br /&gt;
** In other words, you get one record for each item in an order; that record gives the sum of quantities &amp;quot;done&amp;quot; for that item across all &amp;quot;checked&amp;quot; packages. This lets you know how many of each item remain open (to be filled).&lt;br /&gt;
** This is intended to then be filtered by ID_Order, otherwise it can take 30-40 seconds to return results.&lt;br /&gt;
** There is also PHP code somewhere which does this, but I needed to be able to pull these numbers up in w3tpl.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;History&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;2011-05-31&amp;#039;&amp;#039;&amp;#039; created for packing slips&lt;br /&gt;
==SQL==&lt;br /&gt;
&amp;lt;section begin=sql /&amp;gt;&amp;lt;mysql&amp;gt;CREATE OR REPLACE VIEW qryPkgLines_qtys_done_ord_sum AS&lt;br /&gt;
SELECT &lt;br /&gt;
  ID_Order,&lt;br /&gt;
  ID_OrdLine,&lt;br /&gt;
  ID_Item,&lt;br /&gt;
  SUM(QtyDone) AS QtyDone&lt;br /&gt;
FROM qryPkgLines_qtys_done&lt;br /&gt;
GROUP BY ID_Order, ID_OrdLine, ID_Item;&amp;lt;/mysql&amp;gt;&lt;br /&gt;
&amp;lt;section end=sql /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>