project QadFinancials > class BCInvoice > business logic query CInvoiceForPayment


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIdintegerID of supplier invoice


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = iiCInvoiceId

      first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = CInvoice.Company_ID AND

          each CompanySharedSet (inner-join) where
CompanySharedSet.Company_Id = iiCompanyId AND
CompanySharedSet.Company_ID = Company.Company_ID AND

              first SharedSet (inner-join) where
SharedSet.SharedSet_ID = CompanySharedSet.SharedSet_ID AND
SharedSet.SharedSetTypeCode = 'EXCHANGERATE'

          first DomainProperty (inner-join) where
DomainProperty.Domain_ID = Company.Domain_ID AND

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


query resultset tqCInvoiceForPayment


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCCdecimalCInvoice.CInvoiceBalanceCCSC Balance. This field displays the sum of the debit and credit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Balance and the SC rate.
tdCInvoiceBalanceCreditCCdecimalCInvoice.CInvoiceBalanceCreditCCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceBalanceCreditLCdecimalCInvoice.CInvoiceBalanceCreditLCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitCCdecimalCInvoice.CInvoiceBalanceDebitCCSC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceBalanceDebitLCdecimalCInvoice.CInvoiceBalanceDebitLCBC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceLCdecimalCInvoice.CInvoiceBalanceLCBC Balance. This field displays the sum of the debit and credit amounts of all posting lines in base currency.
This field is calculated by the system using the TC Balance and the Exchange rate.
tdCInvoiceBalanceTCdecimalCInvoice.CInvoiceBalanceTCBalance. This field displays the sum of the debit and credit amounts of all posting lines in transaction currency.
tdCInvoiceCCRatedecimalCInvoice.CInvoiceCCRateSC Rate. The statutory exchange rate used by the invoice.
The SC Invoice Amount is calculated based on the SC rate.
tdCInvoiceCCScaledecimalCInvoice.CInvoiceCCScaleScale Factor. This field indicates the scale factor applying to the SC rate in use for foreign currency payments.
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
tcCInvoiceCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tdCInvoiceExchangeRatedecimalCInvoice.CInvoiceExchangeRateExchange Rate. The exchange rate used by the invoice.
The BC Invoice Amount is calculated based on the exchange rate.
If user modify the TC Invoice Amount, the BC invoice amount is automatically adjusted.
tlCInvoiceIsDiscTaxAtPaymlogicalCInvoice.CInvoiceIsDiscTaxAtPaymDiscount Tax at Payment. This field indicates if the invoice has a discount for tax at the time of payment.
The discount amount at the time of payment only applies to the tax base amount.
api annotation:PartialUpdate = yes - defaults to false
tdCInvoiceNonDiscAmtTCdecimalCInvoice.CInvoiceNonDiscAmtTCTC Non-discount Amount. This field display the invoice amount without discount in base currency.
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
tiCompany_IDintegerCompany.Company_IDRecord ID
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiDivision_IDintegerCInvoice.Division_IDSub-Account
tiExchangeRateSharedSet_IDintegerSharedSet.SharedSet_IDRecord ID
tiLCCurrency_IDintegerDomainProperty.Currency_IDBase Currency
tcSharedSetTypeCodecharacterSharedSet.SharedSetTypeCodeShared Set Type
tiStatutoryCurrency_IDintegerDomainProperty.StatutoryCurrency_IDStatutory Currency


Internal usage


QadFinancials
method BBankEntry.GetPossibleAllocationsCInvoiceCrossCy
method BCDocument.AdditionalUpdatesPostingDocExchRatePaid
method BCDocument.StopAllQueries
method BCDocument.ValidateComponentPreInvXrefCI
method BCInvoice.CreateCInvoiceMovementsCrossCy
method BPaymentSelection.GetToPayObjectsInitLoadFromInst