project QadFinancials > class BCMask > method DefaultValuesJrnlGroup

Description

This method retrieves additional details needed on UI to display all information about Daybook


Parameters


bcJournalGroupCodeinput-outputcharacter
oiJournalGroup_IDoutputinteger
ocJournalGroupDescriptionoutputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program4/bcmask.p)

define buffer bSharedSet for SharedSet.
define buffer bCompanySharedSet for CompanySharedSet.
define buffer bJournalGroup for JournalGroup.

assign oiJournalGroup_ID         = ?
       ocJournalGroupDescription = "":U.
       
/* Input paramters normalization */
if bcJournalGroupCode = "":U then assign bcJournalGroupCode = ?.

/* Precondition */
if bcJournalGroupCode = ?
then return.

/* Get daybook group details */
for each bSharedSet fields (SharedSetTypeCode SharedSet_ID) no-lock where
         bSharedSet.SharedSetTypeCode = {&SHAREDSETTYPE-JOURNAL},
   first bCompanySharedSet fields (SharedSet_ID Company_ID) no-lock where
         bCompanySharedSet.SharedSet_ID = bSharedSet.SharedSet_ID and
         bCompanySharedSet.Company_ID = viCompanyId,
   first bJournalGroup fields (SharedSet_ID JournalGroup_ID JournalGroupCode JournalGroupDescription) no-lock where
         bJournalGroup.SharedSet_ID = bCompanySharedSet.SharedSet_ID and
         bJournalGroup.JournalGroupCode = bcJournalGroupCode on error undo, throw:
    assign bcJournalGroupCode        = bJournalGroup.JournalGroupCode
           oiJournalGroup_ID         = bJournalGroup.JournalGroup_ID.
    if vlObjectTranslationsActive
    then do:
        run GetTranslationForObject /* in componentpool */
           (input bJournalGroup.JournalGroup_ID,
            input current-language,
            input bJournalGroup.JournalGroupDescription,
            input "JournalGroupDescription",
            output ocJournalGroupDescription,
            output viFcReturnSuper).
        if viFcReturnSuper <> 0
        then oiReturnStatus = viFcReturnSuper.
        if viFcReturnSuper < 0
        then return.
    end.
    else ocJournalGroupDescription = bJournalGroup.JournalGroupDescription.
end. /* Get daybook group details */