import { Amount } from '../../../commonStateTypes/amount'; import { FetchedState, ID } from '../../../commonStateTypes/common'; export interface IssueCreditNoteLineItemDraft { description: string; maxQuantity: number; maxUnitAmount: Amount; quantity: string; selected: boolean; unitAmount: Amount; id?: string; } export interface IssueCreditNoteFormLocalData { invoiceId: ID; lineItems: IssueCreditNoteLineItemDraft[]; reasonCode: string; /** * Credit-note type code from `credit_note_type_options`. Empty until the user * picks one; the payload then omits it and lets the backend default, rather * than the client asserting `adjustment` for every credit note as it used to. */ type: string; } export interface IssueCreditNoteState extends FetchedState { draft: IssueCreditNoteFormLocalData; issuedCreditNoteId?: ID; }