Skip to content

Instantly share code, notes, and snippets.

@nikolasd
Last active October 19, 2024 16:02
Show Gist options
  • Select an option

  • Save nikolasd/7df9bcaf0b23d38f15623525d747e48c to your computer and use it in GitHub Desktop.

Select an option

Save nikolasd/7df9bcaf0b23d38f15623525d747e48c to your computer and use it in GitHub Desktop.
Pylon SQL - Κινήσεις Retail από POS ή PDA
SELECT
heRetDocEntries.HEDOCCODE AS DocCode,
heRetDocEntries.HEREFNUMBER AS RefNumber,
heRetDocEntries.HEENTRYDATE AS EntryDate,
heRetDocEntries.HETTOTALVAL AS Total,
heRetDocEntries.HERETAILSTATION AS RetailStation,
heResOrders.HEORDERNO AS OrderNo,
heResServSections.HECODE AS ServingSectionCode,
heResServSections.HENAME AS ServingSection,
hePDARoles.HECODE AS PDACode,
hePDARoles.HENAME AS PDAName,
poUsers.POUSERNAME AS UserName,
heBusinessUnits.HENAME AS BU
FROM heRetDocEntries
LEFT JOIN heResOrders
ON heResOrders.HEID = heRetDocEntries.HERORDID
LEFT JOIN heResServSections
ON heResServSections.HEID = heResOrders.HERSSSID
LEFT JOIN hePDARoles
ON heResServSections.HEID = hePDARoles.HERSSSID
INNER JOIN poUsers
ON heRetDocEntries.HECREATIONUSRSID = poUsers.POID
LEFT JOIN heBusinessUnits
ON heRetDocEntries.HEBSUTID = heBusinessUnits.HEID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment