Parameters
iiCompanyId | input | integer | |
icReasonAllocationStatus | input | character | |
ocMFJournalCode | output | character | |
ocLayerTypeCode | output | character | Layer Type Code |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program3/bcinvoice.p)
<Q-1 run LookupSharedSetForCompany (all) (Read) (NoCache)
(input iiCompanyId, (CompanyId)
input {&SHAREDSETTYPECODE-JOURNAL}, (SharedSetType)
output dataset tqSharedSetForCompany) in BCompany >
find first tqSharedSetForCompany where
tqSharedSetForCompany.tiCompany_ID = iiCompanyId and
tqSharedSetForCompany.tcSharedSetTypeCode = {&SHAREDSETTYPECODE-JOURNAL}
no-error.
assign viJournalSharedSetId = if available tqSharedSetForCompany
then tqSharedSetForCompany.tiSharedSet_ID
else 0.
<Q-2 run JournalForProfileLinkDef (all) (Read) (NoCache)
(input iiCompanyId, (CompanyId)
input viJournalSharedSetId, (SharedSetId)
input {&JOURNALTYPE-CIREC}, (JournalTypeCode)
input true, (JournalIsActive)
input ?, (JournalTypeIsCorrection)
input {&JOURNALCONTROL-FINANCIAL}, (JournalControl)
output dataset tqJournalForProfileLinkDef) in BJournal >
if icReasonAllocationStatus = {&ALLOCSTATUS-TRANSALLOC}
then find first tqJournalForProfileLinkDef where
tqJournalForProfileLinkDef.tcJournalTypeCode = {&JOURNALTYPE-CIREC} and
tqJournalForProfileLinkDef.tlJournalIsActive = true and
tqJournalForProfileLinkDef.tcJournalControl = {&JOURNALCONTROL-FINANCIAL} and
tqJournalForProfileLinkDef.tcLayerTypeCode = {&LAYERTYPECODE-TRANSIENT}
no-error.
else
if icReasonAllocationStatus = {&ALLOCSTATUS-ALLOC}
then find first tqJournalForProfileLinkDef where
tqJournalForProfileLinkDef.tcJournalTypeCode = {&JOURNALTYPE-CIREC} and
tqJournalForProfileLinkDef.tlJournalIsActive = true and
tqJournalForProfileLinkDef.tcJournalControl = {&JOURNALCONTROL-FINANCIAL} and
tqJournalForProfileLinkDef.tcLayerTypeCode = {&LAYERTYPECODE-OFFICIAL}
no-error.
else find first tqJournalForProfileLinkDef where
tqJournalForProfileLinkDef.tcJournalTypeCode = {&JOURNALTYPE-CIREC} and
tqJournalForProfileLinkDef.tlJournalIsActive = true and
tqJournalForProfileLinkDef.tcJournalControl = {&JOURNALCONTROL-FINANCIAL}
no-error.
assign ocMFJournalCode = if available tqJournalForProfileLinkDef
then tqJournalForProfileLinkDef.tcJournalCode
else "":U
ocLayerTypeCode = if available tqJournalForProfileLinkDef
then tqJournalForProfileLinkDef.tcLayerTypeCode
else "":U.