project BLF > class BNumber > business logic query NumbrByYearTypeStatus


Parameters


iiCompanyIdintegerCompany id
icNumbrStatuscharacterComma-separated list of {&NUMBERSTATUS-xxxx}-values.
iiNumbrYearinteger
icNumbrTypecharacter


query condition


  each Numbr where
Numbr.Company_Id = iiCompanyId AND
Numbr.NumbrYear = iiNumbrYear AND
Numbr.NumbrType = icNumbrType AND
Numbr.NumbrStatus can-do icNumbrStatus


query sort order


Numbr.NumbrYear (ascending)
Numbr.NumbrType (ascending)
Numbr.Numbr (ascending)
Numbr.NumbrStatus (ascending)


query resultset tqNumbrByYearTypeStatus


field namedata typedb fielddescription
tiCompany_IDintegerNumbr.Company_IDEntity
tiNumbrYearintegerNumbr.NumbrYearYear
tcNumbrTypecharacterNumbr.NumbrTypeType
tiNumbrintegerNumbr.NumbrNumber
tcNumbrStatuscharacterNumbr.NumbrStatuspossible values:
FREE
Every sequence (combination of company + year + sequence type) always has exactly one 'FREE' status record. This record indicates the next available number and will be increased by one whenever this number is used in a transaction.
CLAIMED
This record indicates a number that is claimed by an ongoing transaction. This record will be deleted when the transaction is committed. When a transaction ends abnormally without releasing it's claimed numbers, the housekeeping process will set the status of these records to 'RELEASED'.
RELEASED
This record indicates a number that was claimed by a cancelled transaction. This record can be 'CLAIMED' by other transactions.
DRAFT
This record indicates a number that is claimed by draft business objects (see table fcDraftInstance).
tlNumbrIsActivelogicalNumbr.NumbrIsActiveInactive sequences cannot be used in a transaction.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Numbr)


Internal usage


BLF
method BNumber.ApiGetFreeNumbers
method BNumber.ApiSetFreeNumbers

QadFinancials
method BDomainProperty.ValidateComponentPostNumbers