project QadFinancials > class BProjectReport > business logic query BaseProjectMastercard


Parameters


iiCompanyIdintegerCompany id
icFromProjectcharacter
icToProjectcharacter
icCandoProjectcharacter
icFromProjectManagercharacter
icToProjectManagercharacter
icCandoProjectManagercharacter
icFromAccountManagercharacter
icToAccountManagercharacter
icCandoAccountManagercharacter
icFromAdminManagercharacter
icToAdminManagercharacter
icCandoAdminManagercharacter
icFromControllercharacter
icToControllercharacter
icCandoControllercharacter
icFromBRcharacter
icToBRcharacter
icCandoBRcharacter
icFromDebtorcharacter
icToDebtorcharacter
icCandoDebtorcharacter
icFromPenholderCompcharacter
icToPenholderCompcharacter
icCandoPenholderCompcharacter
icFromDivisioncharacter
icToDivisioncharacter
icCandoDivisioncharacter
icFromProjectGroupcharacter
icToProjectGroupcharacter
icCandoProjectGroupcharacter
icFromMainProjectcharacter
icToMainProjectcharacter
icCandoMainProjectcharacter
icStatusCodecharacter
icProjectTypecharacter
itStartDatedate
itEndDatedate


query condition


  each Project where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.ProjectCode >= icFromProject AND
Project.ProjectCode <= icToProject AND
Project.ProjectCode can-do icCandoProject AND
Project.ProjectSystemStatus = icStatusCode AND
Project.ProjectTypeCode = icProjectType AND
Project.ProjectStartDate = itStartDate AND
Project.ProjectEndDate = itEndDate

      first Address1 (conditional-join) where
Address1.Address_ID = Project.SiteAddress_ID AND

      first Address2 (conditional-join) where
Address2.Address_ID = Project.InvoiceAddress_ID AND

      first BusinessRelation (conditional-join) where
BusinessRelation.BusinessRelation_ID = Project.BusinessRelation_ID AND
BusinessRelation.BusinessRelationCode >= icFromBR AND
BusinessRelation.BusinessRelationCode <= icToBR AND
BusinessRelation.BusinessRelationCode can-do icCandoBR

      first Company (conditional-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = Project.PenholderCompany_ID AND
Company.CompanyCode >= icFromPenholderComp AND
Company.CompanyCode <= icToPenholderComp AND
Company.CompanyCode can-do icCandoPenholderComp

      first Debtor (conditional-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = Project.Debtor_ID AND
Debtor.DebtorCode >= icFromDebtor AND
Debtor.DebtorCode <= icToDebtor AND
Debtor.DebtorCode can-do icCandoDebtor

      first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = Project.Division_ID AND
Division.DivisionCode >= icFromDivision AND
Division.DivisionCode <= icToDivision AND
Division.DivisionCode can-do icCandoDivision

      first Project2 (conditional-join) where
Project2.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project2.MainProject_ID = Project.Project_ID AND
Project2.ProjectCode >= icFromMainProject AND
Project2.ProjectCode <= icToMainProject AND
Project2.ProjectCode can-do icCandoMainProject

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

      first ProjectGroup (inner-join) where
ProjectGroup.ProjectGroup_ID = Project.ProjectGroup_ID AND
ProjectGroup.ProjectGroupCode >= icFromProjectGroup AND
ProjectGroup.ProjectGroupCode <= icToProjectGroup AND
ProjectGroup.ProjectGroupCode can-do icCandoProjectGroup

      each ProjectSafDefault (conditional-join) where
ProjectSafDefault.Project_ID = Project.Project_ID AND

          first Saf (conditional-join) where
Saf.Saf_ID = ProjectSafDefault.Saf_ID AND

          first SafConcept (conditional-join) where
SafConcept.SafConcept_ID = ProjectSafDefault.SafConcept_ID AND

      first Usr1 (inner-join) where
Usr1.Usr_ID = Project.ProjectManagerUsr_ID AND
Usr1.UsrName >= icFromProjectManager AND
Usr1.UsrName <= icToProjectManager AND
Usr1.UsrName can-do icCandoProjectManager

      first Usr2 (conditional-join) where
Usr2.Usr_ID = Project.AdminRespUsr_ID AND
Usr2.UsrName >= icFromAdminManager AND
Usr2.UsrName <= icToAdminManager AND
Usr2.UsrName can-do icCandoAdminManager

      first Usr3 (conditional-join) where
Usr3.Usr_ID = Project.ControllerUsr_ID AND
Usr3.UsrName >= icFromController AND
Usr3.UsrName <= icToController AND
Usr3.UsrName can-do icCandoController

      first Usr4 (conditional-join) where
Usr4.Usr_ID = Project.SalesRespUsr_ID AND
Usr4.UsrName >= icFromAccountManager AND
Usr4.UsrName <= icToAccountManager AND
Usr4.UsrName can-do icCandoAccountManager


query resultset tqBaseProjectMastercard


field namedata typedb fielddescription
tcAccountManagercharacterUsr4.UsrNameUser Name
tcAddressCitycharacterAddress2.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressStatecharacterAddress2.AddressStateObsolete field
tcAddressStreet1characterAddress2.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress2.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressZipcharacterAddress2.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.
tcAdminManagercharacterUsr2.UsrNameUser Name
tcBusinessRelationCodecharacterBusinessRelation.BusinessRelationCodeBusiness Relation. A code to identify the business relation.
If this field does not have a input from the user, the system automatically generates a number for the record based on the sequence defined in Business Relation Autonumber Create.
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tcControllercharacterUsr3.UsrNameUser Name
tiCurrency_IDintegerProject.Currency_IDCurrency
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.
tiDivision_IDintegerDivision.Division_IDRecord ID
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDivisionDescriptioncharacterDivision.DivisionDescriptionDescription
tiIndustry_IDintegerProject.Industry_IDLink to Industry
tiInvoiceCountry_IDintegerAddress2.Country_IDCountry Format
tcMainProjectCodecharacterProject2.ProjectCodeProject
tcMainProjectDescriptioncharacterProject2.ProjectDescriptionDescription
tiPaymentCondition_IDintegerProject.PaymentCondition_IDCredit Terms
tcPenholderCompanyCodecharacterCompany.CompanyCodeEntity Code
tiPriceList_IDintegerProject.ObsoletePriceList_IDLink to Price List
tiProject_IDintegerProject.Project_IDRecord ID
tiProject_ID1integerProject2.Project_IDRecord ID
tiProject_ID2integerProject3.Project_IDRecord ID
tcProjectCodecharacterProject.ProjectCodeProject
tdProjectContractAmountTCdecimalProject.ProjectContractAmountTCTC Contract Amount
ttProjectContractDatedateProject.ProjectContractDateContract Date
tcProjectContractReferencecharacterProject.ProjectContractReferenceContract Reference
tcProjectDescriptioncharacterProject.ProjectDescriptionDescription
ttProjectEndDatedateProject.ProjectEndDateEnd Date
tiProjectGroup_IDintegerProjectGroup.ProjectGroup_IDRecord ID
tcProjectGroupCodecharacterProjectGroup.ProjectGroupCodeCode
tcProjectGroupDescriptioncharacterProjectGroup.ProjectGroupDescriptionDescription
tlProjectGroupIsActivelogicalProjectGroup.ProjectGroupIsActiveActive
tlProjectIsAltRevProdCalclogicalProject.ProjectIsAltRevProdCalcAlt Production Calculation
tlProjectIsTemplatelogicalProject.ProjectIsTemplateSave as Template
tlProjectIsWithSaflogicalProject.ProjectIsWithSafSAF Enabled
tcProjectManagercharacterUsr1.UsrNameUser Name
tcProjectPriceTypeCodecharacterProject.ProjectPriceTypeCodePrice Type
ttProjectStartDatedateProject.ProjectStartDateStart Date
tiProjectStatus_IDintegerProject.ProjectStatus_IDStatus Code
tcProjectSystemStatuscharacterProject.ProjectSystemStatusSystem Status
tcProjectTypeCodecharacterProject.ProjectTypeCodeProject Type
tiRegion_IDintegerProject.Region_IDRegion
tiSaf_IDintegerSaf.Saf_IDRecord ID
tcSafCodecharacterSaf.SafCodeSAF Code
tiSafConcept_IDintegerSafConcept.SafConcept_IDRecord ID
tcSafConceptCodecharacterSafConcept.SafConceptCodeSAF Concept Code
tcSafConceptDescriptioncharacterSafConcept.SafConceptDescriptionSAF Concept Description
tlSafConceptIsActivelogicalSafConcept.SafConceptIsActiveActive
tcSafDescriptioncharacterSaf.SafDescriptionSAF Description
tlSafIsActivelogicalSaf.SafIsActiveActive
tcSiteAddressCitycharacterAddress1.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcSiteAddressStatecharacterAddress1.AddressStateObsolete field
tcSiteAddressStreet1characterAddress1.AddressStreet1Address: Line one of address details.
This field can be blank.
tcSiteAddressStreet2characterAddress1.AddressStreet2Address.Line two of address details.
This field can be blank.
tcSiteAddressZipcharacterAddress1.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.
tiSiteCountry_IDintegerAddress1.County_IDDescription
tcTemplateProjectCodecharacterProject3.ProjectCodeProject
tcTemplateProjectDescriptioncharacterProject3.ProjectDescriptionDescription
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Project),rowid(Address1),rowid(Address2),rowid(BusinessRelation),rowid(Company),rowid(Debtor),rowid(Division),rowid(Project2),rowid(Project3),rowid(ProjectGroup),rowid(ProjectSafDefault),rowid(Saf),rowid(SafConcept),rowid(Usr1),rowid(Usr2),rowid(Usr3),rowid(Usr4)


Internal usage


QadFinancials
method BProjectReport.ProjectMastercard