This commit is contained in:
seb
2026-09-30 21:56:37 +02:00
parent bc467e29da
commit 3d2f8e9296
4 changed files with 7 additions and 13 deletions

View File

@@ -30,14 +30,14 @@ WHERE cg.company_id = @companyId
ORDER BY e.name, e.id
`;
/** Entities whose group is not Lieferanten and not POS (customer picker). */
/** Entities whose group is not Lieferanten (customer picker). */
export const LIST_CUSTOMERS_BY_COMPANY = `
SELECT
${ENTITY_COLUMNS}
FROM entity e
INNER JOIN customergroup cg ON cg.id = e.customergroup_id
WHERE cg.company_id = @companyId
AND cg.name NOT IN (@supplierGroupName, @posGroupName)
AND cg.name <> @supplierGroupName
ORDER BY e.name, e.id
`;
@@ -60,7 +60,7 @@ WHERE cg.company_id = @companyId
AND (@excludeEntityId IS NULL OR e.id <> @excludeEntityId)
`;
/** Customer entity: company-scoped and not Lieferanten/POS. */
/** Customer entity: company-scoped and not Lieferanten. */
export const GET_CUSTOMER_BY_ID = `
SELECT
${ENTITY_COLUMNS}
@@ -68,7 +68,7 @@ FROM entity e
INNER JOIN customergroup cg ON cg.id = e.customergroup_id
WHERE e.id = @id
AND cg.company_id = @companyId
AND cg.name NOT IN (@supplierGroupName, @posGroupName)
AND cg.name <> @supplierGroupName
`;
export const LIST_SUPPLIERS_BY_COMPANY = `