Difference between revisions of "VbzCart/queries/qryRstkItms active"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(New page: ==Details== * '''Returns''': Data about items which are in active restocks, i.e. on restock orders but not yet received (or cancelled). * '''Requires''': {{vbzcart/table|rstk_req_item}}, {...)
 
(used by)
Line 2: Line 2:
 
* '''Returns''': Data about items which are in active restocks, i.e. on restock orders but not yet received (or cancelled).
 
* '''Returns''': Data about items which are in active restocks, i.e. on restock orders but not yet received (or cancelled).
 
* '''Requires''': {{vbzcart/table|rstk_req_item}}, {{vbzcart/query|qryRstks_active}}
 
* '''Requires''': {{vbzcart/table|rstk_req_item}}, {{vbzcart/query|qryRstks_active}}
* '''Used by'''
+
* '''Used by''': {{vbzcart/query|qryRstkItms_expected}}
 
* '''Note''': This is different from qryRstkLines_en_route (deprecated):
 
* '''Note''': This is different from qryRstkLines_en_route (deprecated):
 
** Grouped by Item instead of Restock Line
 
** Grouped by Item instead of Restock Line

Revision as of 15:26, 3 January 2010

Details

  • Returns: Data about items which are in active restocks, i.e. on restock orders but not yet received (or cancelled).
  • Requires:
  1. REDIRECT Template:l/vc/table,
  2. REDIRECT Template:l/vc/query
  • Used by: qryRstkItms_expected
  • Note: This is different from qryRstkLines_en_route (deprecated):
    • Grouped by Item instead of Restock Line
    • Uses new Restock tables
  • History:
    • 2008-11-18 Created for new restock process

SQL

<mysql>CREATE OR REPLACE VIEW qryRstkItms_active AS SELECT

 rrq.ID_Restock,
 rrq.ID_Item,
 SUM(rrq.QtyOrd) AS QtyOrd

FROM

     rstk_req_item AS rrq
   LEFT JOIN qryRstks_active AS rq ON rrq.ID_Restock=rq.ID

WHERE rq.ID IS NOT NULL GROUP BY rrq.ID_Restock, rrq.ID_Item;</mysql>