VbzCart/docs/queries/qryStk lines remaining byBin: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(created)
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==About==
==About==
* '''OBSOLETE''': replaced by '''vcqtStockBinsInfo''' methods
* '''Returns''': list of bins, with stock quantities for each (for sale, for shipping, existing)
* '''Returns''': list of bins, with stock quantities for each (for sale, for shipping, existing)
* '''Requires''': {{vbzcart/query|v_stk_lines_remaining}}
* '''Requires''': {{vbzcart/query|qryStk_lines_remaining}}
* '''Used by''': {{vbzcart/query|qryStk_Bins_w_info}}
* '''Used by''': {{vbzcart/query|qryStk_Bins_w_info}}
* '''History''':
* '''History''':
** '''2009-04-29''' Created for Special:VbzAdmin
** '''2009-04-29''' Created for Special:VbzAdmin
** '''2009-11-29''' Updated to reflect name change of source query
** '''2017-03-24''' obsoleted
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryStk_lines_remaining_byBin AS
<mysql>CREATE OR REPLACE VIEW qryStk_lines_remaining_byBin AS
   SELECT
   SELECT
     ID_Bin,
     ID_Bin,
Line 12: Line 15:
     SUM(QtyForShip) AS QtyForShip,
     SUM(QtyForShip) AS QtyForShip,
     SUM(QtyExisting) AS QtyExisting
     SUM(QtyExisting) AS QtyExisting
   FROM v_stk_lines_remaining GROUP BY ID_Bin;</mysql>
   FROM qryStk_lines_remaining
<section end=sql />
  GROUP BY ID_Bin;</mysql>

Latest revision as of 01:56, 25 February 2024

About

  • OBSOLETE: replaced by vcqtStockBinsInfo methods
  • Returns: list of bins, with stock quantities for each (for sale, for shipping, existing)
  • Requires: Template:Vbzcart/query
  • Used by: Template:Vbzcart/query
  • History:
    • 2009-04-29 Created for Special:VbzAdmin
    • 2009-11-29 Updated to reflect name change of source query
    • 2017-03-24 obsoleted

SQL

<mysql>CREATE OR REPLACE VIEW qryStk_lines_remaining_byBin AS

 SELECT
   ID_Bin,
   SUM(QtyForSale) AS QtyForSale,
   SUM(QtyForShip) AS QtyForShip,
   SUM(QtyExisting) AS QtyExisting
 FROM qryStk_lines_remaining
 GROUP BY ID_Bin;</mysql>