project QadFinancials > class BDInvoice > business logic query DInvoicePrim

Annotation

Primary query

Description

Prim query for DInvoice


Parameters


iiCompanyIdintegerCompany id
iiDInvoiceIdintegerDInvoice ID
iiPeriodYearintegerPeriod Year
iiJournalIdintegerJournal ID
icJournalCodecharacterDaybook Code
iiDInvoiceVoucherintegerVoucher


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = iiDInvoiceId AND
DInvoice.Journal_ID = iiJournalId AND
DInvoice.DInvoiceVoucher = iiDInvoiceVoucher AND
DInvoice.DInvoicePostingYear = iiPeriodYear

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = DInvoice.Journal_ID AND
Journal.JournalCode = icJournalCode

      first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = DInvoice.Period_ID AND
Period.PeriodYear = iiPeriodYear


query resultset tqDInvoicePrim


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tiDebtor_IDintegerDInvoice.Debtor_IDLink to Debtor
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tiDInvoicePostingYearintegerDInvoice.DInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tiDInvoiceVoucherintegerDInvoice.DInvoiceVoucherVoucher.This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is charged(after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiJournal_IDintegerDInvoice.Journal_IDDaybook Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPeriod_IDintegerDInvoice.Period_IDLink to Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DInvoice),rowid(Journal),rowid(Period)


Internal usage


QadFinancials
method BDDocument.CheckDeductionCatCodeExist
method BDInvoice.ApiGetDInvoiceStatus
method BDInvoice.CreateDInvoiceMovements
method BDInvoice.GetDInvoiceIDFromInvoiceInfo
method BDInvoice.ValidateApiDeductionDetailRecords
method BPaymentSelection.AdditionalUpdatesDInvoice
method BRevaluation.CalcRevalDetParentObjectRef
read related business field(s) on tDInvoice.LinkedDInvoice_ID
ApiGetAlternateKeyValues
validate related business field(s) on tDInvoice.LinkedDInvoice_ID