project QadFinancials > class BJournalEntry > business logic query PostingVatForUpdateVatGroup

Description

PostingVatForUpdateVatGroup: query that will return all required information for the functiona that allows to update the vatgroup on the postingvat


Parameters


iiCompanyIdintegerCompany id
icVatCodecharacter
iiVatIDinteger
icVatInOutcharacter
iiFromVatPeriodYearPeriodinteger
iiToVatPeriodYearPeriodinteger


query condition


  each PostingVat where
PostingVat.Vat_ID = iiVatID AND
PostingVat.PostingVatInOut = icVatInOut

      first PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = PostingVat.PostingLine_ID AND

          first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine.GL_ID AND

          first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine.Posting_ID AND

              first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND

      first Vat (inner-join) where
Vat.Vat_ID = PostingVat.Vat_ID AND
Vat.VatCode = icVatCode

      first VatGroup (inner-join) where
VatGroup.VatGroup_ID = PostingVat.VatGroup_ID AND

      first VatPeriod (inner-join) where
VatPeriod.Company_Id = iiCompanyId AND
VatPeriod.VatPeriod_ID = PostingVat.VatPeriod_ID AND
VatPeriod.VatPeriodYearPeriod >= iiFromVatPeriodYearPeriod AND
VatPeriod.VatPeriodYearPeriod <= iiToVatPeriodYearPeriod

      first VatRule (inner-join) where
VatRule.VatRule_ID = PostingVat.VatRule_ID AND


query resultset tqPostingVatForUpdateVatGroup


field namedata typedb fielddescription
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcJournalTypeCodecharacterJournal.JournalTypeCodeA daybook type code.
api annotation:Value for this field defaults to "Journal Entries".
tiPostingLine_IDintegerPostingVat.PostingLine_IDLink to PostingLine
tiGL_IDintegerPostingLine.GL_IDGL Description
tiPosting_IDintegerPostingLine.Posting_IDLink to Posting
tiPostingLineSequenceintegerPostingLine.PostingLineSequenceSequence
tiJournal_IDintegerPosting.Journal_IDDaybook Code
tiPostingVoucherintegerPosting.PostingVoucherVoucher is a sequential number that uniquely identifies the journal entry (within the combination of an entity and a daybook code).
api annotation:In create mode,enter 0 in this field - the voucher number is generated by the system. In Modify/Delete, the correct voucher number must be entered because this identifies the record.
tiPostingYearintegerPosting.PostingYearThe GL calendar year for the posting.
tiAbsorbedCreditNVatGroup_IDintegerVatRule.AbsorbedCreditNVatGroup_IDTax Group Code
tiAbsorbedInvoiceVatGroup_IDintegerVatRule.AbsorbedInvoiceVatGroup_IDTax Group Code
tiCreditNoteVatGroup_IDintegerVatRule.CreditNoteVatGroup_IDCredit Note Tax Group
tiInvoiceVatGroup_IDintegerVatRule.InvoiceVatGroup_IDInvoice Tax Group
tiRetainCVoucherVatGroup_IDintegerVatRule.RetainCVoucherVatGroup_IDTax Group Code
tiRetainVoucherVatGroup_IDintegerVatRule.RetainVoucherVatGroup_IDTax Group Code
tiVatRuleSequenceintegerVatRule.VatRuleSequenceSequence
tlVatIsAbsorbedlogicalVat.VatIsAbsorbedAbsorbed
tlVatIsRetainedlogicalVat.VatIsRetainedRetained
tiPostingVat_IDintegerPostingVat.PostingVat_IDRecord ID
tcPostingVatInOutcharacterPostingVat.PostingVatInOutIn/Out?
api annotation:Aivalable value for this field: "INPUT" represents purchases, "OUTPUT" represents sales.
tiVat_IDintegerPostingVat.Vat_IDTax Code
tiVatGroup_IDintegerPostingVat.VatGroup_IDTax Group Code
tiVatPeriod_IDintegerPostingVat.VatPeriod_IDLink to VatPeriod
tiVatRule_IDintegerPostingVat.VatRule_IDLink to VatRule
tcVatGroupCodecharacterVatGroup.VatGroupCodeTax Group Code
tiVatPeriodPeriodintegerVatPeriod.VatPeriodPeriodTax Period
tiVatPeriodYearintegerVatPeriod.VatPeriodYearTax Year
tcVatCodecharacterVat.VatCodeTax Code


Internal usage


QadFinancials
method BJournalEntry.AutoUpdatePostingVatVatGroups