VbzCart/queries/qryRpt Pkg Trx

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
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

About

  • Requires: ord_trxact, ord_trx_type, ord_pkgs
  • History:
    • 2011-06-01 ported from MS Access so I can print packing slips from web interface (final major piece?)

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>