VbzCart/docs/queries/qryOrdItms Pkg qtys: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (New page: ==Details== * '''Requires''': qryOrderLines_Active, qry_PkgItem_qtys_byOrder * '''Used by''': * '''History''': ** '''2008-11-16...) |
m (Woozle moved page VbzCart/VbzCart/queries/qryOrdItms Pkg qtys to VbzCart/docs/queries/qryOrdItms Pkg qtys without leaving a redirect: part 2) |
(No difference)
|
Latest revision as of 01:55, 25 February 2024
Details
- Requires: qryOrderLines_Active, qry_PkgItem_qtys_byOrder
- Used by:
- History:
- 2008-11-16 created for new restocking process
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryOrdItms_Pkg_qtys AS SELECT
oi.ID_Item, oi.ID_Order, oi.QtyOrd, piq.QtySent, piq.QtyDone, oi.QtyOrd-IFNULL(piq.QtyDone,0) AS QtyOpen
FROM qryOrderItems_Active AS oi
LEFT JOIN qry_PkgItem_qtys_byOrder AS piq ON (piq.ID_Item=oi.ID_Item) AND (piq.ID_Order=oi.ID_Order)
ORDER BY oi.ID_Item, oi.ID_Order;</mysql> <section end=sql />