The @CeDocumentDescriber
annotation is used exclusively on document entity classes to declare which registers are affected by the document. It allows the system to automatically generate movements (postings) in those registers when the document is processed.
infoRegisters: Array<KClass<*>> = emptyArray()
Specifies the information registers that this document updates.
accumulationRegistersIncome: Array<KClass<*>> = emptyArray()
Lists accumulation registers where this document will create income movements.
accumulationRegistersExpense: Array<KClass<*>> = emptyArray()
Lists accumulation registers where this document will create expense movements.
documentType: Int = 0
A unique identifier that distinguishes different types of documents that interact with the same registers but require different logic or handling.
This is helpful when one register is shared across multiple document types.
kotlin
КопироватьРедактировать
@CeDocumentDescriber(
infoRegisters = [InventoryRegister::class],
accumulationRegistersIncome = [StockRegister::class],
accumulationRegistersExpense = [SalesRegister::class],
documentType = 1
)
data class SalesInvoice(
@PrimaryKey val id: Int,
val date: String,
val customerId: Int
)
documentType
parameter allows multiple documents to interact with shared registers without collisions or ambiguous behavior.This annotation replaces the deprecated @DocumentDescriberCE
.