VbzCart/docs/queries/qryItems needed forStock: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(Created page with '==About== * '''History''': ** '''2010-01-02''' Created * '''Used by''': VbzAdminStkItems::Needed() - restock request creation in VbzAdmin * '''Requires''': {{vbzcart/query|qryStk…')
 
imported>Woozle
("returns" explanation)
Line 1: Line 1:
==About==
==About==
* '''Returns''': catalog items we need to order more of in order to satisfy stock minima
** Items may be needed for other reasons, but they will not be listed here unless they satisfy that criterion.
* '''History''':
* '''History''':
** '''2010-01-02''' Created
** '''2010-01-02''' Created

Revision as of 13:55, 5 December 2010

About

  • Returns: catalog items we need to order more of in order to satisfy stock minima
    • Items may be needed for other reasons, but they will not be listed here unless they satisfy that criterion.
  • History:
    • 2010-01-02 Created
  • Used by: VbzAdminStkItems::Needed() - restock request creation in VbzAdmin
  • Requires: Template:Vbzcart/query

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryItems_needed_forStock AS SELECT

 i.ID,
 i.QtyMin_Stk,
 s.QtyForSale

FROM cat_items AS i

 LEFT JOIN qryStkItms_for_sale AS s
 ON s.ID_Item=i.ID

WHERE i.isForSale AND ((i.QtyMin_Stk - s.QtyForSale) > 0);</mysql> <section end=sql />