Hauptmenue: Gutschriften/Lieferscheine-Gesamtuebersicht (portal-scoped)
Neuer Menuepunkt 'Gutschriften' -> Seite /credit-notes mit Tabelle aller Belege (Beleg-Nr, Art, Kunde, Vertrag, Betrag, Datum, PDF), Suche + Pagination. Neuer Endpoint GET /credit-notes (NICHT staff-only wie die uebrigen Credit-Note-Endpoints): Staff sieht alle Belege aller Kunden, Portal- Kunden nur eigene + vertretene (Vollmacht via hasAuthorization). customerIds kommt aus dem JWT, nicht aus Query/Body -> nicht manipulierbar. Fuer Portal wird receiptPath aus der Response entfernt (Belege bleiben staff-only). Route requirePermission contracts:read. Verifiziert: Staff -> alle Belege; Portal-scoped -> nur eigene, korrekt zugeordnet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -99,6 +99,21 @@ export interface CreditNotePayoutBankCard {
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
export interface CreditNoteListItem extends CreditNote {
|
||||
contract: {
|
||||
id: number;
|
||||
contractNumber: string;
|
||||
type: string;
|
||||
customer: {
|
||||
id: number;
|
||||
customerNumber: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
companyName?: string | null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface CreditNoteDefaults {
|
||||
customerType: CreditNoteCustomerType;
|
||||
vatRelevant: boolean;
|
||||
|
||||
Reference in New Issue
Block a user