project QadFinancials > class BEmployeeReport > business logic query BaseAdvancePrintOut


Parameters


iiCompanyIdintegerCompany id
iiAccYearinteger
icJournalCodecharacter
iiFromVoucherinteger
iiToVoucherinteger
icEmployeeCodescharacter
icCreditorCodecharacter
icCurrencyCodecharacter
icInvoiceTypecharacter
icAddressTypecharacter


query condition


  each Employee where
Employee.Company_Id = iiCompanyId AND
Employee.EmployeeCode can-do icEmployeeCodes

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = Employee.Creditor_ID AND
Creditor.CreditorCode = icCreditorCode

          first BusinessRelation1 (inner-join) where
BusinessRelation1.BusinessRelation_ID = Creditor.BusinessRelation_ID AND

              each Address1 (conditional-join) where
Address1.BusinessRelation_ID = BusinessRelation1.BusinessRelation_ID AND

                  first AddressType1 (conditional-join) where
AddressType1.AddressType_ID = Address1.AddressType_ID AND
AddressType1.AddressTypeCode = icAddressType

          each CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.Creditor_ID = Creditor.Creditor_ID AND
CInvoice.CInvoiceType = icInvoiceType AND
CInvoice.CInvoiceVoucher >= iiFromVoucher AND
CInvoice.CInvoiceVoucher <= iiToVoucher

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

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

                      first BusinessRelation2 (inner-join) where
BusinessRelation2.BusinessRelation_ID = CompanyProperty.BusinessRelation_ID AND

                          each Address2 (conditional-join) where
Address2.BusinessRelation_ID = BusinessRelation2.BusinessRelation_ID AND

                              first AddressType2 (conditional-join) where
AddressType2.AddressType_ID = Address2.AddressType_ID AND
AddressType2.AddressTypeCode = icAddressType

              first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = CInvoice.CostCentre_ID AND

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

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

              first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = CInvoice.Period_ID AND
Period.PeriodYear = iiAccYear

              first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = CInvoice.Project_ID AND


query resultset tqBaseAdvancePrintOut


field namedata typedb fielddescription
tcAddressCitycharacterAddress1.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressStreet1characterAddress1.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress1.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressZipcharacterAddress1.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tiBLWIGroup_IDintegerCInvoice.BLWIGroup_IDBLWI Group Code
tcCInvoiceContactcharacterCInvoice.CInvoiceContactContact. This field indicates the name of the purchasing contact in the supplier company.
api annotation:This field defaults from the Contact field of the invoice's supplier.
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
ttCInvoiceDatedateCInvoice.CInvoiceDateInvoice Date. This field indicates the invoice creation date.
The system uses this field with the credit terms to calculate due date and discount date.
api annotation:This field defaults from the system date.
tcCInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
ttCInvoiceDiscountDueDatedateCInvoice.CInvoiceDiscountDueDateDiscount Due Date.This field indicates the last date a discount applies, calculated by the system based on the credit terms and the invoice date.
User can modify this field without affecting the credit terms.
ttCInvoiceDueDatedateCInvoice.CInvoiceDueDateDue Date.This field indicates the date when payment become due.
This field can be modified without affecting the credit terms.
This field is calculated by the system based on the credit terms and the invoice date.
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.
tdCInvoiceOriginalCreditCCdecimalCInvoice.CInvoiceOriginalCreditCCSC Invoice Amount (CR). This field displays the credit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdCInvoiceOriginalDebitCCdecimalCInvoice.CInvoiceOriginalDebitCCSC Invoice Amount (DR). This field displays the debit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
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.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
ttCInvoiceTaxPointDatedateCInvoice.CInvoiceTaxPointDateTax Point Date.This field indicates the date to be used in tax calculations.
api annotation:This field defaults from the posting date.
tcCInvoiceTSMNumbercharacterCInvoice.CInvoiceTSMNumberPayment Reference. This field displays a unique reference number to be included in the supplier payment file.
This reference can consist of a Transfer with Structured Message (TSM) number.
This field can be blank.
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.
tdCInvoiceVatBaseCreditCCdecimalCInvoice.CInvoiceVatBaseCreditCCSC Base Amount CR. This field displays the credit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceVatBaseCreditLCdecimalCInvoice.CInvoiceVatBaseCreditLCBC Base Amount CR. This field displays the credit base amount in the base currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdCInvoiceVatBaseCreditTCdecimalCInvoice.CInvoiceVatBaseCreditTCTC Base Amount CR. This field displays the credit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatBaseDebitCCdecimalCInvoice.CInvoiceVatBaseDebitCCSC Base Amount DR. This field displays the debit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceVatBaseDebitLCdecimalCInvoice.CInvoiceVatBaseDebitLCBC Base Amount DR. This field displays the debit base amount in the base currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceVatBaseDebitTCdecimalCInvoice.CInvoiceVatBaseDebitTCTC Base Amount DR. This field displays the debit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatCreditCCdecimalCInvoice.CInvoiceVatCreditCCSC Tax Amount CR. This field displays the credit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount CR and the SC rate.
tdCInvoiceVatCreditLCdecimalCInvoice.CInvoiceVatCreditLCBC Tax Amount CR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount CR and the Exchange rate.
tdCInvoiceVatCreditTCdecimalCInvoice.CInvoiceVatCreditTCTC Tax Amount CR. This field displays the credit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatDebitCCdecimalCInvoice.CInvoiceVatDebitCCBC Tax Amount DR. This field displays the debit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount DR and the SC rate.
tdCInvoiceVatDebitLCdecimalCInvoice.CInvoiceVatDebitLCBC Tax Amount DR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount DR and the Exchange rate.
tdCInvoiceVatDebitTCdecimalCInvoice.CInvoiceVatDebitTCTC Tax Amount DR. This field displays the debit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (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.
tcCompanyCitycharacterAddress2.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcCompanyStreet1characterAddress2.AddressStreet1Address: Line one of address details.
This field can be blank.
tcCompanyStreet2characterAddress2.AddressStreet2Address.Line two of address details.
This field can be blank.
tcCompanyZipcharacterAddress2.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tiCompnayCountry_IDintegerAddress2.Country_IDCountry Format
tiCostCentre_IDintegerCostCentre.CostCentre_IDRecord ID
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCostCentreDescriptioncharacterCostCentre.CostCentreDescriptionDescription: a brief description of the cost center.
tiCountry_IDintegerAddress1.Country_IDCountry Format
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tiDivision_IDintegerCInvoice.Division_IDSub-Account
tcEmployeeCodecharacterEmployee.EmployeeCodeEmployee Code. A code that identifies an employee. The code cannot match any other employee in the current entity or any other entities in the current domain.
If you leave the Employee Code field blank, the system automatically generates a number for the record based on the sequence defined in Employee Autonumber Create.
tiJournal_IDintegerJournal.Journal_IDRecord ID
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcJournalDescriptioncharacterJournal.JournalDescriptionA brief description of the daybook.
api annotation:Value for this field defaults to null.
tiNormalPaymentCondition_IDintegerCInvoice.NormalPaymentCondition_IDCredit Terms Code
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tiProject_IDintegerProject.Project_IDRecord ID
tcProjectCodecharacterProject.ProjectCodeProject
tcProjectDescriptioncharacterProject.ProjectDescriptionDescription
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Employee),rowid(Creditor),rowid(BusinessRelation1),rowid(Address1),rowid(AddressType1),rowid(CInvoice),rowid(Company),rowid(CompanyProperty),rowid(BusinessRelation2),rowid(Address2),rowid(AddressType2),rowid(CostCentre),rowid(Currency),rowid(Journal),rowid(Period),rowid(Project)


Internal usage


QadFinancials
method BEmployeeReport.AdvancePrintOut