project QadFinancials > class BPosting > method AddStandardPosting
Description
add a posting line on any gl account (except control and VAT accounts) to current posting
Parameters
| icPostingtcRowid | input | character | tposting.tc_Rowid |
| icGLCode | input | character | gl account |
| icDivisionCode | input | character | Sub-Account |
| icCostCentreCode | input | character | cost centre |
| icCostCentreText | input | character | Text |
| icProjectCode | input | character | project |
| icProjectText | input | character | Text |
| icIntercoBusinessRelationCode | input | character | interco |
| icCurrencyCode | input | character | currency |
| idDebitTC | input | decimal | DebitTC |
| idDebitLC | input | decimal | DebitLC (use NULL if value should be calculated) |
| idDebitCC | input | decimal | DebitCC (use NULL if value should be calculated) |
| idDebitPC | input | decimal | DebitPC (use NULL if value should be calculated) |
| idCreditTC | input | decimal | CreditTC |
| idCreditLC | input | decimal | CreditLC (use NULL if value should be calculated) |
| idCreditCC | input | decimal | CreditCC (use NULL if value should be calculated) |
| idCreditPC | input | decimal | CreditPC (use NULL if value should be calculated) |
| idQty | input | decimal | Quantity |
| icLineText | input | character | Text |
| icSafText | input | character | Text |
| tDefaultSafs | input | temp-table | default saf's |
| icExchangeRateType | input | character | exchange rate type |
| idExchangeRate | input | decimal | |
| idExchangeRateScale | input | decimal | |
| idPostingLineCCRate | input | decimal | |
| idPostingLineCCScale | input | decimal | |
| oiPostingLineId | output | integer | Posting Line ID |
| iiSafStructureId | input | integer | Saf Structure ID : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken |
| icSafStructureCode | input | character | Saf Structure Code : necessary for posting on project, cost centre, .. so that you knows which saf structure you must take, if this is blank, then the first one will be taken |
| icAllocationKey | input | character | |
| ilLinkedCrCyDaemonReqExists | input | logical | |
| itExchangeRateDate | input | date | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bposting.p)
/* ====================================== */
/* Exception handling and param resetting */
/* ====================================== */
assign oiReturnStatus = -98
viLocalReturnStatus = 0
idExchangeRate = round(idExchangeRate, 10)
idExchangeRateScale = round(idExchangeRateScale, 10).
if iiSafStructureId = ? then assign iiSafStructureId = 0.
if icSafStructureCode = ? then assign icSafStructureCode = "":U.
/* =============== */
/* Start the block */
/* =============== */
ADDSTANDARDPOSTINGBLOCK : DO :
/* ======================= */
/* Get the correct posting */
/* ======================= */
find tPosting where
tPosting.tc_Rowid = icPostingtcRowid no-error.
if not available tPosting
then do:
assign vcMessage = trim(substitute(#T-20'Internal error: posting record not found for row ID &1.':150(3199)T-20#, icPostingtcRowid))
viLocalReturnStatus = -3.
<M-18 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-873':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if not available tPosting */
if itExchangeRateDate = ? then assign itExchangeRateDate = tPosting.PostingDate.
/* ====================================================================== */
/* Call submethod that creates the posting-line */
/* After this call: tqGLForPostingLineCreation and tPostingLine are avail */
/* ====================================================================== */
<M-1 run AddPostingSub
(input icGLCode (icGLCode),
input icDivisionCode (icDivisionCode),
input icCurrencyCode (icCurrencyCode),
input icIntercoBusinessRelationCode (icBusinessRelationIntercoCode),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
if not available tqGLForPostingLineCreation or
not available tPostingLine
then do :
assign vcMessage = trim(substitute(#T-27'Internal error. The system cannot find the posting record details for row ID '&1'.':255(69655)T-27#, icPostingtcRowid)) + chr(10) +
trim(substitute(#T-28'Available &1: &2':255(69656)T-28#,"tPostingLine":U,(if available tPostingLine then trim(#T-29'Yes':5(69658)T-29#) else trim(#T-30'No':5(69659)T-30#)) )) + chr(10) +
trim(substitute(#T-31'Available &1: &2':255(69656)T-31#,"tqGLForPostingLineCreation":U,(if available tqGLForPostingLineCreation then trim(#T-32'Yes':5(69660)T-32#) else trim(#T-33'No':5(69661)T-33#)) ))
viLocalReturnStatus = -3.
<M-34 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-8233':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if not available tqGLForPostingLineCreation or */
/* ==================================================================== */
/* Assign the values in tPostingLine. The allocation type will be set */
/* based on the first (and second) entry of the AllocationKey parameter */
/* ==================================================================== */
assign tPostingLine.PostingLineText = icLineText
tPostingLine.PostingLineDebitTC = idDebitTC
tPostingLine.PostingLineDebitLC = idDebitLC
tPostingLine.PostingLineDebitCC = idDebitCC
tPostingLine.PostingLineCreditTC = idCreditTC
tPostingLine.PostingLineCreditLC = idCreditLC
tPostingLine.PostingLineCreditCC = idCreditCC
tPostingLine.PostingLineExchangeRate = if idExchangeRate = 0 or idExchangeRate = ? then 1 else idExchangeRate
tPostingLine.PostingLineRateScale = if idExchangeRateScale = 0 or idExchangeRateScale = ? then 1 else idExchangeRateScale
tPostingLine.tcAllocationKey = if tPostingLine.tcGLTypeCode = {&GLTYPECODE-OPEN} then entry(1,icAllocationKey,chr(2)) else ?
tPostingLine.tcAllocationType = if tPostingLine.tcAllocationKey = "":U or
tPostingLine.tcAllocationKey = ?
then {&ALLOCATIONTYPE-LATER}
else if num-entries(icAllocationKey,chr(2)) > 1 and
entry(2,icAllocationKey,chr(2)) = {&ALLOCATIONTYPE-LINK}
then {&ALLOCATIONTYPE-LINK}
else {&ALLOCATIONTYPE-NEW}
tPostingLine.tlLinkedCrCyDaemonReqExists = ilLinkedCrCyDaemonReqExists
oiPostingLineId = tPostingLine.PostingLine_ID.
/* ==================================================== */
/* Retrieve / Set the Analysis on the GL. This is not */
/* allowed for YearClosings as they only go to GL-level */
/* ==================================================== */
if tPosting.tcPeriodTypeCode <> {&PERIODTYPECODE-YEARCLOSING}
then do:
/* In some cases, the SAFs against the project should be ignored. This should be documented in the User Guide, as well as fixed in the code. */
/* ======================================== */
/* Set the CostCentre and its optional SAFs */
/* ======================================== */
if tqGLForPostingLineCreation.tlGLIsCostCentreAccount
then do:
if icCostCentreCode = "":U or
icCostCentreCode = ?
then do:
if tPosting.PostingParentText <> {&POSTINGPARENTTEXT-APMATCHING} and /* Skip this defaulting in case it concerns an APMatchign-posting */
tqGLForPostingLineCreation.tiCostCentreProfile_ID <> 0 and
tqGLForPostingLineCreation.tiCostCentreProfile_ID <> ?
then do:
<Q-2 run GetCostCentreFromProfile (all) (Read) (Cache)
(input tPosting.Company_ID, (CompanyId)
input tqGLForPostingLineCreation.tiCostCentreProfile_ID, (CostCentreProfileId)
output dataset tqCostCentreFromProfile) in BProfile>
find first tqCostCentreFromProfile no-error.
if available tqCostCentreFromProfile
then do:
assign tPostingLine.CostCentre_ID = tqCostCentreFromProfile.tiCostCentre_ID
tPostingLine.tcCostCentreCode = tqCostCentreFromProfile.tcCostCentreCode
tPostingLine.tcCostCentreDescription = tqCostCentreFromProfile.tcCostCentreDescription
tPostingLine.PostingLineCostCentreText = icCostCentreText.
<M-8 run AddDefaultSaf
(input {&POSTINGSAFPARENTTYPE-COSTCENTRE} (icType),
input tPostingLine.CostCentre_ID (iiObjectId),
input iiSafStructureId (iiSafStructureId),
input icSafStructureCode (icSafStructureCode),
input tPostingLine.GL_ID (iiGLId),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if available tqCostCentreFromProfile */
end. /* if (tqGLForPostingLineCreation.tiCostCentreProfile_ID <> 0 and */
end. /* if icCostCentreCode = "":U or */
else do:
<Q-3 run CostCentrePrim (all) (Read) (Cache)
(input tPosting.Company_ID, (CompanyId)
input 0, (CostCentreID)
input icCostCentreCode, (CostCentreCode)
output dataset tqCostCentrePrim) in BCostCentre>
find first tqCostCentrePrim no-error.
if available tqCostCentrePrim
then do:
assign tPostingLine.CostCentre_ID = tqCostCentrePrim.tiCostCentre_ID
tPostingLine.tcCostCentreCode = tqCostCentrePrim.tcCostCentreCode
tPostingLine.tcCostCentreDescription = tqCostCentrePrim.tcCostCentreDescription
tPostingLine.PostingLineCostCentreText = icCostCentreText.
<M-9 run AddDefaultSaf
(input {&POSTINGSAFPARENTTYPE-COSTCENTRE} (icType),
input tPostingLine.CostCentre_ID (iiObjectId),
input iiSafStructureId (iiSafStructureId),
input icSafStructureCode (icSafStructureCode),
input tPostingLine.GL_ID (iiGLId),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if available tqCostCentrePrim */
end. /* Not if icCostCentreCode = "":U or */
end. /* if tqGLForPostingLineCreation.tlGLIsCostCentreAccount */
/* ======================================== */
/* Set the Project and its optional SAFs */
/* ======================================== */
if tqGLForPostingLineCreation.tcGLAnalysisLimitation = {&GLANALYSISLIMITATION-EXCLEACHOTHER} and
tPostingLine.tcCostCentreCode <> "":U
then assign tPostingLine.tcProjectCode = "":U
tPostingLine.tcProjectDescription = "":U
tPostingLine.Project_ID = 0.
else if tqGLForPostingLineCreation.tlGLIsProjectAccount
then do:
if icProjectCode = "":U
or icProjectCode = ?
then do:
if tPosting.PostingParentText <> {&POSTINGPARENTTEXT-APMATCHING} and /* Skip this defaulting in case it concerns an APMatchign-posting */
tqGLForPostingLineCreation.tiProjectProfile_ID <> 0 and
tqGLForPostingLineCreation.tiProjectProfile_ID <> ?
then do:
<Q-4 run GetProjectFromProfile (all) (Read) (Cache)
(input tPosting.Company_ID, (CompanyId)
input tqGLForPostingLineCreation.tiProjectProfile_ID, (ProjectProfileID)
output dataset tqProjectFromProfile) in BProfile>
find first tqProjectFromProfile no-error.
if available tqProjectFromProfile
then do:
assign tPostingLine.Project_ID = tqProjectFromProfile.tiProject_ID
tPostingLine.tcProjectCode = tqProjectFromProfile.tcProjectCode
tPostingLine.tcProjectDescription = tqProjectFromProfile.tcProjectDescription
tPostingLine.PostingLineProjectText = icProjectText
viProjectCurr = tqProjectFromProfile.tiCurrency_ID
viProjectRate = tqProjectFromProfile.tiExchangeRateType_ID.
<M-10 run AddDefaultSaf
(input {&POSTINGSAFPARENTTYPE-PROJECT} (icType),
input tPostingLine.Project_ID (iiObjectId),
input iiSafStructureId (iiSafStructureId),
input icSafStructureCode (icSafStructureCode),
input tPostingLine.GL_ID (iiGLId),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if available tqProjectFromProfile */
end. /* if (tqGLForPostingLineCreation.tiProjectProfile_ID <> 0 and */
end. /* if icProjectCode = "":U or */
else do:
<Q-19 run ProjectByCode (all) (Read) (Cache)
(input tPosting.Company_ID, (CompanyId)
input icProjectCode, (ProjectCode)
output dataset tqProjectByCode) in BProject>
find first tqProjectByCode no-error.
if available tqProjectByCode
then do:
assign tPostingLine.Project_ID = tqProjectByCode.tiProject_ID
tPostingLine.tcProjectCode = tqProjectByCode.tcProjectCode
tPostingLine.tcProjectDescription = tqProjectByCode.tcProjectDescription
tPostingLine.PostingLineProjectText = icProjectText
viProjectCurr = tqProjectByCode.tiCurrency_ID
viProjectRate = tqProjectByCode.tiExchangeRateType_ID.
<M-11 run AddDefaultSaf
(input {&POSTINGSAFPARENTTYPE-PROJECT} (icType),
input tPostingLine.Project_ID (iiObjectId),
input iiSafStructureId (iiSafStructureId),
input icSafStructureCode (icSafStructureCode),
input tPostingLine.GL_ID (iiGLId),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if available tqProjectByCode */
end. /* Not if icProjectCode = "":U or */
end. /* if tqGLForPostingLineCreation.tlGLIsProjectAccount */
/* ======================= */
/* Set the Saf-information */
/* ======================= */
if tqGLForPostingLineCreation.tlGLIsSafAccount = true
then do:
assign tPostingLine.PostingLineSafText = icSafText.
<M-35 run AddDefaultSaf
(input {&POSTINGSAFPARENTTYPE-GL} (icType),
input tPostingLine.GL_ID (iiObjectId),
input iiSafStructureId (iiSafStructureId),
input icSafStructureCode (icSafStructureCode),
input tPostingLine.GL_ID (iiGLId),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
end. /* if tqGLForPostingLineCreation.tlGLIsSafAccount */
end. /* end of if tPosting.tcPeriodTypeCode <> {&PERIODTYPECODE-YEARCLOSING} */
/* ======================== */
/* Set the Unit information */
/* ======================== */
if tqGLForPostingLineCreation.tiUnit_ID <> 0 and
tqGLForPostingLineCreation.tiUnit_ID <> ?
then do:
<Q-6 run UnitPrim (all) (Read) (Cache)
(input tqGLForPostingLineCreation.tiUnit_ID, (UnitID)
input '':U, (UnitCode)
output dataset tqUnitPrim) in BUnit>
find first tqUnitPrim no-error.
if available tqUnitPrim
then assign tPostingLine.tcUnitCode = tqUnitPrim.tcUnitCode
tPostingLine.PostingLineQTY = idQty.
end. /* if tqGLForPostingLineCreation.tiUnit_ID <> 0 and */
/* ========= */
/* Assign LC */
/* ========= */
if tPostingLine.PostingLineDebitLC = ? or
tPostingLine.PostingLineCreditLC = ?
then do:
if idExchangeRate = ? or idExchangeRateScale = ?
then do:
if tPostingLine.Currency_ID = viCompanyLCId
then assign tPostingLine.PostingLineDebitLC = tPostingLine.PostingLineDebitTC
tPostingLine.PostingLineCreditLC = tPostingLine.PostingLineCreditTC
tPostingLine.PostingLineExchangeRate = 1
tPostingLine.PostingLineRateScale = 1.
else do:
<M-39 run GetExchangeRate
(input tPosting.Company_ID (iiCompanyID),
input tPostingLine.Currency_ID (iiFromCurrencyID),
input ? (icFromCurrencyCode),
input ? (iiToCurrencyID),
input ? (icToCurrencyCode),
input ? (iiExchangeRateTypeID),
input icExchangeRateType (icExchangeRateTypeCode),
input itExchangeRateDate (itValidityDate),
output vdRate (odExchangeRate),
output vdRateScale (odExchangeScaleFactor),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
assign tPostingLine.PostingLineExchangeRate = vdRate
tPostingLine.PostingLineRateScale = vdRateScale.
if tPostingLine.PostingLineDebitLC = ?
then assign tPostingLine.PostingLineDebitLC =
<M-21 RoundAmount
(input tPostingLine.PostingLineDebitTC * vdRate * vdRatescale (idUnroundedAmount),
input viCompanyLCId (iiCurrencyID),
input vcCompanyLC (icCurrencyCode)) in business>.
if tPostingLine.PostingLineCreditLC = ?
then assign tPostingLine.PostingLineCreditLC =
<M-22 RoundAmount
(input tPostingLine.PostingLineCreditTC * vdRate * vdRateScale (idUnroundedAmount),
input viCompanyLCId (iiCurrencyID),
input vcCompanyLC (icCurrencyCode)) in business>.
end. /* if tPostingLine.Currency_ID = viCompanyLCId */
end.
else assign tPostingLine.PostingLineDebitLC =
<M-38 RoundAmount
(input tPostingLine.PostingLineDebitTC * idexchangeRate * idExchangeRateScale (idUnroundedAmount),
input viCompanyLCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>
tPostingLine.PostingLineCreditLC =
<M-40 RoundAmount
(input tPostingLine.PostingLineCreditTC * idexchangeRate * idExchangeRateScale (idUnroundedAmount),
input viCompanyLCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>.
end. /* if tPostingLine.PostingLineDebitLC = ? or */
else if idExchangeRate <> ? and idExchangeRateScale <> ?
then assign tPostingLine.PostingLineExchangeRate = idExchangeRate
tPostingLine.PostingLineRateScale = idExchangeRateScale.
else if tPostingLine.PostingLineDebitTC - tPostingLine.PostingLineCreditTC = 0
then assign tPostingLine.PostingLineExchangeRate = 0
tPostingLine.PostingLineRateScale = 0.
else assign tPostingLine.PostingLineExchangeRate = absolute(round((tPostingLine.PostingLineDebitLC - tPostingLine.PostingLineCreditLC) / (tPostingLine.PostingLineDebitTC - tPostingLine.PostingLineCreditTC), 10))
tPostingLine.PostingLineRateScale = 1.
/* ========= */
/* Assign CC */
/* ========= */
if tPostingLine.PostingLineDebitCC = ? or
tPostingLine.PostingLineCreditCC = ?
then do:
if idPostingLineCCRate = ? or idPostingLineCCScale = ?
then do:
if viCompanyCCId = tPostingLine.Currency_ID
then assign tPostingLine.PostingLineDebitCC = tPostingLine.PostingLineDebitTC
tPostingLine.PostingLineCreditCC = tPostingLine.PostingLineCreditTC
tPostingLine.PostingLineCCRate = 1
tPostingLine.PostingLineCCScale = 1.
else if vlDomainIsStatutory = false
then assign tPostingLine.PostingLineDebitCC = tPostingLine.PostingLineDebitLC
tPostingLine.PostingLineCreditCC = tPostingLine.PostingLineCreditLC
tPostingLine.PostingLineCCRate = tPostingLine.PostingLineExchangeRate
tPostingLine.PostingLineCCScale = tPostingLine.PostingLineRateScale.
else do:
<M-62 run GetExchangeRate
(input tPosting.Company_ID (iiCompanyID),
input tPostingLine.Currency_ID (iiFromCurrencyID),
input ? (icFromCurrencyCode),
input viCompanyCCId (iiToCurrencyID),
input ? (icToCurrencyCode),
input ? (iiExchangeRateTypeID),
input {&EXCHANGERATETYPE-STATUTORY} (icExchangeRateTypeCode),
input itExchangeRateDate (itValidityDate),
output vdRate (odExchangeRate),
output vdRateScale (odExchangeScaleFactor),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave ADDSTANDARDPOSTINGBLOCK.
assign tPostingLine.PostingLineCCRate = vdRate
tPostingLine.PostingLineCCScale = vdRateScale.
if tPostingLine.PostingLineDebitCC = ?
then assign tPostingLine.PostingLineDebitCC =
<M-23 RoundAmount
(input tPostingLine.PostingLineDebitTC * vdRate * vdRateScale (idUnroundedAmount),
input viCompanyCCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>.
if tPostingLine.PostingLineCreditCC = ?
then assign tPostingLine.PostingLineCreditCC =
<M-24 RoundAmount
(input tPostingLine.PostingLineCreditTC * vdRate * vdRateScale (idUnroundedAmount),
input viCompanyCCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>.
end. /* Not if viCompanyCCId = viCompanyLCId */
end. /* if idPostingLineCCRate = ? or idPostingLineCCScale = ? */
else if vlDomainIsStatutory = false
then assign tPostingLine.PostingLineDebitCC = tPostingLine.PostingLineDebitLC
tPostingLine.PostingLineCreditCC = tPostingLine.PostingLineCreditLC
tPostingLine.PostingLineCCRate = tPostingLine.PostingLineExchangeRate
tPostingLine.PostingLineCCScale = tPostingLine.PostingLineRateScale.
else assign tPostingLine.PostingLineCCRate = idPostingLineCCRate
tPostingLine.PostingLineCCScale = idPostingLineCCScale
tPostingLine.PostingLineDebitCC =
<M-36 RoundAmount
(input tPostingLine.PostingLineDebitTC * idPostingLineCCRate * idPostingLineCCScale (idUnroundedAmount),
input viCompanyCCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>
tPostingLine.PostingLineCreditCC =
<M-37 RoundAmount
(input tPostingLine.PostingLineCreditTC * idPostingLineCCRate * idPostingLineCCScale (idUnroundedAmount),
input viCompanyCCId (iiCurrencyID),
input '':U (icCurrencyCode)) in business>.
end. /* if tPostingLine.PostingLineDebitCC = ? or */
else if idPostingLineCCRate <> ? and idPostingLineCCScale <> ?
then assign tPostingLine.PostingLineCCRate = idPostingLineCCRate
tPostingLine.PostingLineCCScale = idPostingLineCCScale.
else if tPostingLine.PostingLineDebitTC - tPostingLine.PostingLineCreditTC = 0
then assign tPostingLine.PostingLineCCRate = 0
tPostingLine.PostingLineCCScale = 0.
else assign tPostingLine.PostingLineCCRate = absolute(round((tPostingLine.PostingLineDebitCC - tPostingLine.PostingLineCreditCC) / (tPostingLine.PostingLineDebitTC - tPostingLine.PostingLineCreditTC), 10))
tPostingLine.PostingLineCCScale = 1.
/* ====================================== */
/* Keep query result for descendant class */
/* ====================================== */
empty temp-table tqGLForPostingLineCreationCpy.
create tqGLForPostingLineCreationCpy.
buffer-copy tqGLForPostingLineCreation to tqGLForPostingLineCreationCpy.
END. /* ADDSTANDARDPOSTINGBLOCK */
/* ================== */
/* Exception handling */
/* ================== */
assign oiReturnStatus = viLocalReturnStatus.