project QadFinancials > class BPosting > API query PostingVatDelayByPostingID (optimised)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiPostingIDi=
iiPostingLineIDi=
iiCompanyIdi
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPostingLine.PostingLineCreditTCd=,>=,>,<>,<=,<
tPostingLine.PostingLineDebitTCd=,>=,>,<>,<=,<
tPostingLine.PostingLineIsProjPostingl=,<>
tPostingLine.PostingLineTextc=,>=,>,<>,<=,<,begins,can-do,matches
tPostingVatDelay.PostingVatDelayBaseCredCCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayBaseCredLCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayBaseCredTCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayBaseDebCCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayBaseDebLCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayBaseDebTCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayExchRated=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayIsOpenl=,<>
tPostingVatDelay.PostingVatDelayRateScaled=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayTaxPntDatet=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayVATBalLCd=,>=,>,<>,<=,<
tPostingVatDelay.PostingVatDelayVATOrigLCd=,>=,>,<>,<=,<
tVat.VatCodec=,>=,>,<>,<=,<,begins,can-do,matches
tVatRule.VatRuleIsDelayedl=,<>
tVatRule.VatRuleIsPostingl=,<>
tVatRule.VatRuleMovementTypec=,>=,>,<>,<=,<,begins,can-do,matches
tVatRule.VatRuleSequencei=,>=,>,<>,<=,<


Parameters (internal)


iiPostingIDintegerPostingID
iiPostingLineIDintegerPostingLineId
iiCompanyIdintegerCompany id


query condition


  each PostingLine where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.Posting_ID = iiPostingID AND
PostingLine.PostingLine_ID = iiPostingLineID

      first Currency (inner-join) where
Currency.Currency_ID = PostingLine.Currency_ID AND

      each PostingVatDelay (inner-join) where
PostingVatDelay.PostingLine_ID = PostingLine.PostingLine_ID AND

          first Vat (inner-join) where
Vat.Vat_ID = PostingVatDelay.Vat_ID AND

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


query resultset tqPostingVatDelayByPostingID


field namedata typedb fielddescription
tiCreditNoteGLProfile_IDintegerVatRule.CreditNoteGLProfile_IDCN GL Profile
tiCreditNoteVatGroup_IDintegerVatRule.CreditNoteVatGroup_IDCredit Note Tax Group
tiCurrency_IDintegerPostingLine.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDelayedGLProfile_IDintegerVatRule.DelayedGLProfile_IDDelayed GL Profile
tiGL_IDintegerPostingLine.GL_IDGL Description
tiInvoiceGLProfile_IDintegerVatRule.InvoiceGLProfile_IDInvoice GL Profile
tiInvoiceVatGroup_IDintegerVatRule.InvoiceVatGroup_IDInvoice Tax Group
tiPeriodMark_IDintegerPostingVatDelay.PeriodMark_IDLink to PeriodMark
tiPosting_IDintegerPostingLine.Posting_IDLink to Posting
tiPostingLine_IDintegerPostingLine.PostingLine_IDRecord ID
tiPostingLine_ID2integerPostingVatDelay.PostingLine_IDLink to PostingLine
tdPostingLineCreditTCdecimalPostingLine.PostingLineCreditTCTC Credit
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tlPostingLineIsProjPostinglogicalPostingLine.PostingLineIsProjPostingProject Posting
tiPostingLineMaster_IDintegerPostingLine.PostingLineMaster_IDLink to Master
tcPostingLineTextcharacterPostingLine.PostingLineTextDescription
api annotation:Value for this field defaults to blank. Note: if a new record is created through the user interface, the default value is as same as the value of "PostingText" of tPosting.
tiPostingVatDelay_IDintegerPostingVatDelay.PostingVatDelay_IDRecord ID
tdPostingVatDelayBaseCredCCdecimalPostingVatDelay.PostingVatDelayBaseCredCCSC (Statutory Currency) Base Credit amount.
tdPostingVatDelayBaseCredLCdecimalPostingVatDelay.PostingVatDelayBaseCredLCBC (Base/Local Currency) Base Credit amount.
api annotation:?
tdPostingVatDelayBaseCredTCdecimalPostingVatDelay.PostingVatDelayBaseCredTCTC (Transaction Currency) Base Credit amount.
api annotation:?
tdPostingVatDelayBaseDebCCdecimalPostingVatDelay.PostingVatDelayBaseDebCCSC (Statutory Currency) Base Debit amount.
api annotation:?
tdPostingVatDelayBaseDebLCdecimalPostingVatDelay.PostingVatDelayBaseDebLCBC (Base/Local Currency) Base Debit amount.
api annotation:?
tdPostingVatDelayBaseDebTCdecimalPostingVatDelay.PostingVatDelayBaseDebTCTC (Trasaction Currency) Base Debit amount.
api annotation:?
tdPostingVatDelayExchRatedecimalPostingVatDelay.PostingVatDelayExchRateExchange Rate?
tlPostingVatDelayIsOpenlogicalPostingVatDelay.PostingVatDelayIsOpenOpen?
tdPostingVatDelayRateScaledecimalPostingVatDelay.PostingVatDelayRateScaleScale Factor?
ttPostingVatDelayTaxPntDatedatePostingVatDelay.PostingVatDelayTaxPntDateTax Point Date?
tdPostingVatDelayVATBalLCdecimalPostingVatDelay.PostingVatDelayVATBalLCBC (Base/Local Currency) Tax Balance.
tdPostingVatDelayVATOrigLCdecimalPostingVatDelay.PostingVatDelayVATOrigLCBC (Base/Local Currency) Tax Original.
tiVat_IDintegerPostingVatDelay.Vat_IDDescription
tcVatCodecharacterVat.VatCodeTax Code
tiVatCurrency_IDintegerPostingVatDelay.Currency_IDCurrency Code
tiVatPeriod_IDintegerPostingVatDelay.VatPeriod_IDLink to VatPeriod
tiVatRule_IDintegerPostingVatDelay.VatRule_IDLink to VatRule
tlVatRuleIsDelayedlogicalVatRule.VatRuleIsDelayedDelayed
tlVatRuleIsPostinglogicalVatRule.VatRuleIsPostingPosting
tcVatRuleMovementTypecharacterVatRule.VatRuleMovementTypeActivity Type
tiVatRuleSequenceintegerVatRule.VatRuleSequenceSequence
PostingLineCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
PostingVatDelayCustomcharactercalculatedcustom fields
VatCustomcharactercalculatedcustom fields
VatRuleCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(PostingLine),rowid(Currency),rowid(PostingVatDelay),rowid(Vat),rowid(VatRule)


Internal usage


unused


Sample code: how to call this query through RPCRequestService (QXtend Inbound)

define temp-table ttContext no-undo
    field propertyQualifier as character
    field propertyName as character
    field propertyValue as character
    index entityContext is primary unique
        propertyQualifier
        propertyName
    index propertyQualifier
        propertyQualifier.

define dataset dsContext for ttContext.

define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.

/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
       ttContext.propertyValue = "BPosting".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "PostingVatDelayByPostingID".
create ttContext.
assign ttContext.propertyName = "applicationId"
       ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
       ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
       ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
       ttContext.propertyValue = "".

/* Create input dataset */
create dataset vhInputDS.
vhInputDS:read-xmlschema("file", "xml/bposting.postingvatdelaybypostingid.i.xsd", ?).
vhParameter = vhInputDS:get-buffer-handle("tParameterI").
vhParameter:buffer-create().

assign vhParameter::icRange = "A"
       vhParameter::icRowid = ""
       vhParameter::iiRownum = 0
       vhParameter::iiNumber = 5 /* Number of records to read */
       vhParameter::icSortColumns = ""
       vhParameter::ilCountOnly = false
       vhParameter::ilForwardRead = true
       vhParameter::iiMaximumBrowseRecordsToCount = 0.

vhParameter = vhInputDS:get-buffer-handle("tFilter").
vhParameter:buffer-create().

assign vhParameter::<field-name-1> = <field-value-1>
       vhParameter::<field-name-2> = <field-value-2>
       ...

/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").

if not vhServer:connected()
then do:
    message "Could not connect AppServer" view-as alert-box error title "Error".
    return.
end.

/* Run */
assign vhContextDS = dataset dsContext:handle.

run program/rpcrequestservice.p on vhServer
    (input-output dataset-handle vhContextDS by-reference,
           output dataset-handle vhExceptionDS,
     input        dataset-handle vhInputDS by-reference,
     input-output dataset-handle vhInputOutputDS by-reference,
           output dataset-handle vhOutputDS).

/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).

if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).

/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.

if valid-handle(vhInputDS)
then delete object vhInputDS.

if valid-handle(vhOutputDS)
then delete object vhOutputDS.

if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.