VbzCart/docs/queries/qryRpt Pkg Trx: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (tidied up but still not converted to MySQL) |
m (Woozle moved page VbzCart/VbzCart/queries/qryRpt Pkg Trx to VbzCart/docs/queries/qryRpt Pkg Trx without leaving a redirect: part 2) |
||
(One intermediate revision by one other user not shown) | |||
Line 9: | Line 9: | ||
tt.Code, | tt.Code, | ||
t.WhenDone, | t.WhenDone, | ||
CONCAT(IF(t.ID_Package IS NULL,"",CONCAT("pkg #",p.Seq,": ")),t.Descr) AS Descr, | |||
t.Amount | t.Amount | ||
FROM ( | FROM ( |
Latest revision as of 01:55, 25 February 2024
About
- Requires: Template:Vbzcart, Template:Vbzcart, Template:Vbzcart
- History:
- 2011-06-01 ported from MS Access so I can print packing slips from web interface (final major piece?)
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRpt_Pkg_Trx AS SELECT
t.ID_Order, tt.Code, t.WhenDone, CONCAT(IF(t.ID_Package IS NULL,"",CONCAT("pkg #",p.Seq,": ")),t.Descr) AS Descr, t.Amount
FROM (
ord_trxact AS t LEFT JOIN ord_trx_type AS tt ON t.ID_Type=tt.ID) LEFT JOIN ord_pkgs AS p ON t.ID_Package=p.ID
WHERE WhenVoid IS NULL ORDER BY WhenDone, Amount>0;</mysql> <section end=sql />