Pylon SQL - Εύρεση όλων των Σειρών με συγκεκριμένο Τύπο
-- Παραστατικά Είσπραξης
SELECT
heDocSeries.heCode AS SeriesCode,
heDocSeries.heName AS SeriesName,
heDocSeries.heShortcut AS SeriesShortCut,
heDocSeries.heActive AS SeriesActive,
heFinDocTypes.heCode AS TypeCode,
heFinDocTypes.heName AS TypeName,
heDocSeries.heUsedBy AS SeriesUsedBy,
heDocSeries.heUsedByModule AS SeriesUsedIn
FROM heDocSeries
INNER JOIN heFinDocTypes
ON heFinDocTypes.heID = heDocSeries.heDocTypeID
WHERE heFinDocTypes.heCode = '8900'
-- Εμπορικά Παραστατικά
SELECT
heDocSeries.heCode AS SeriesCode,
heDocSeries.heName AS SeriesName,
heDocSeries.heShortcut AS SeriesShortCut,
heDocSeries.heActive AS SeriesActive,
heCommDocTypes.heCode AS TypeCode,
heCommDocTypes.heName AS TypeName
FROM heDocSeries
INNER JOIN heCommDocTypes
ON heDocSeries.heDocTypeID = heCommDocTypes.heID
WHERE heCommDocTypes.heName = 'Ενδοδιακίνηση (Ποσότητα)'