Ga naar inhoud

Palettelabelscannerlocation

Report palettelabelscannerLocation

  • Filename: PaletteLabelScannerLocation
  • Title: Palette label - location
  • Sample: Unit48 (scanner)

Synopsis

Print Palette label for article.

SQL

  • LocationStockForScanner

    SELECT
       1 as typerecord,
       ARTCODE,
       NAME2,
       A.LOCATION,
       A.STOCKCODE,
       SUM(QTYIN - ISNULL(QTYOUT, 0)) AS QTY,
       '' as country,
       A.Lotno,
       A.ExpiryDate,
       B.EANCODE3
     FROM
       STOCTOTAL A
       INNER JOIN ARTICLE B ON (B.NAME = A.ARTCODE)
     WHERE
       A.LOCATION = :Location
     GROUP BY
       A.STOCKCODE,
       A.ARTCODE,
       A.Location,
       A.Lotno,
       A.ExpiryDate,
       B.EANCODE3,
       B.NAME2
     HAVING
       SUM(QTYIN - ISNULL(QTYOUT, 0)) > 0
     UNION
     SELECT
       2 as typerecord,
       a.artcode,
       c.name2,
       B.LOCATION,
       a.stockcode,
       a.qty,
       E.COUNTRY,
       B.Lotno,
       B.ExpiryDate,
       C.EANCODE3
     FROM
       OUTDETAILS a
       INNER JOIN INVDETAILS b ON
         (b.ID = a.INVOICENO)
         AND (B.STOCKCODE = A.STOCKCODE)
         AND (b.ARTCODE = a.ARTCODE)
       INNER JOIN ARTICLE c on (a.artcode = c.name)
       INNER JOIN OUT E ON (A.AVIZNO = E.AVIZ)
     WHERE
       B.LOCATION = :location
       AND (pickedby = '')
       AND (A.TransactionType IN ('ORD', 'KIT'))
       AND (A.filldate > :StartDate)
    UNION
     SELECT
       3 as TypeRecord,
       A.artcode,
       c.name2,
       B.LOCATION,
       A.stockcode,
       A.qty,
       '' as country,
       B.Lotno,
       B.ExpiryDate,
       C.EANCODE3
     FROM
       OUTDETAILS A
       INNER JOIN INVDETAILS B ON
         (b.ID = a.INVOICENO)
         AND (b.STOCKCODE = a.STOCKCODE)
         AND (b.ARTCODE = a.ARTCODE)
       INNER JOIN ARTICLE C ON (a.artcode = c.name)
     WHERE
       (pickedby <> '')
       AND (checkedby = '')
       AND (A.TransactionType = 'KIT')
       AND (A.TransitLocation = :Location)
       AND A.filldate > :StarTDate
    Order by TypeRecord, artcode
    
    Add Calculated fields:

  • ArtBareCore: '*' + B.ARTCODE + '*'

  • STATUS
  • TypeRecord=1: Empty.
  • TypeRecord=2: 'Reserved /' + avizno.
  • TypeRecord=3: 'Production / ' + avizno.
  • STATUS1
  • TypeRecord=1: 'Stock'.
  • TypeRecord=2: 'Reserved'.
  • TypeRecord=3: 'Production'.
  • STATUS2
  • TypeRecord=1: Empty.
  • TypeRecord=2: Country.
  • TypeRecord=3: Empty.
  • LotNo2:
  • If Lotno empty: empty
  • If Lotno not empty: '*'+LotNo+'*'
  • ProductLot:
  • If LotNo<>'' then '*' + ARTCODE + '-' + LOTNO + '*'
  • If LotNo='' then '' + ARTCODE+ ''
  • ProductLot1:
  • If LotNo<>'' then '*' + EANCODE3 + '-' + LOTNO + '*'
  • If LotNo='' then '*' + EANCODE3+ '*'

Parameters

  • ArticleID ID of the aricle for which to print a palette label.

Accessible in forms