@logismix/mydata-client
Version:
Greek myDATA (AADE) API client library
56 lines (55 loc) • 2.52 kB
TypeScript
import { AmountType, ExpensesClassificationCategoryType, ExpensesClassificationValueType, VatExemptionType, VatType } from './simple-types.model';
/**
* Root element for submitting expense classifications.
* Χαρατηρισμοί Εξόδων Πρότυπων Παραστατικών ΑΑΔΕ
*/
export interface ExpensesClassificationsDoc {
/** Array of expense classifications per invoice */
expensesInvoiceClassification: InvoiceExpensesClassificationType[];
}
/**
* Represents expense classification data for a single invoice.
*/
export interface InvoiceExpensesClassificationType {
/** Unique Invoice Registration Number (MARK) */
invoiceMark: number;
/** Unique Classification Registration Number. Filled by the service. */
classificationMark?: number;
/** VAT Number of the entity the classification refers to (used by representatives/accountants). */
entityVatNumber?: string;
/** Transaction Mode (1: Reject, 2: Deviation) OR detailed classifications. */
transactionMode?: 1 | 2;
/** Detailed expense classifications per invoice line. */
invoicesExpensesClassificationDetails?: InvoicesExpensesClassificationDetailType[];
/** Classification Submission Method (0 or 1). Used for postPerInvoice=true in ERP doc. */
classificationPostMode?: 0 | 1;
}
/**
* Represents expense classification details for a specific line number within an invoice.
*/
export interface InvoicesExpensesClassificationDetailType {
/** The line number of the original invoice this classification refers to. */
lineNumber: number;
/** List of expense classifications for this specific line. */
expensesClassificationDetailData: ExpensesClassificationType[];
}
/**
* Detailed expense classification data.
* This type is defined here as it's the core element of this specific schema.
*/
export interface ExpensesClassificationType {
/** Classification Code (E3 or VAT Code) */
classificationType?: ExpensesClassificationValueType;
/** Classification Category (E3) */
classificationCategory?: ExpensesClassificationCategoryType;
/** Amount of the classification */
amount: AmountType;
/** VAT Amount (only for VAT classifications) */
vatAmount?: AmountType;
/** VAT Category (only for VAT classifications) */
vatCategory?: VatType;
/** VAT Exemption Category (only for VAT classifications) */
vatExemptionCategory?: VatExemptionType;
/** Sequential ID for classifications within a line */
id?: number;
}