project QadFinancials > class BAPMatching > method GetGLPLVarRateAvgCosting

Description

AdditionalUpdatesAllLinesPLVarRateLAvgCosting; submethod of AdditionalUpdatesAllLinesPLVarRate that is located in the same segment. This method takes about find thie correct accounting information to create a posting-line for the Rate-Variance (difference in price) for NON-Logistic-charges and NON-discrepancy.


Parameters


icAPMatchingLnGLCodeinputcharacter
icAPMatchingLnDivCodeinputcharacter
icAPMatchingLnCCCodeinputcharacter
ilAPMatchingLnIsVarGLPostinginputlogical
idAPMatchingLnMatchQtyinputdecimal
idAPMatchingLnMatchUnitPriceinputdecimal
icAPMatchingLnPvodCCCodeinputcharacter
icAPMatchingLnPvodCostMtdCurinputcharacter
icAPMatchingLnPvodCostMtdGLinputcharacter
icAPMatchingLnPvodDivCodeinputcharacter
icAPMatchingLnPvodGLCodeinputcharacter
ilAPMatchingLnPvodIsLgChargeinputlogical
icAPMatchingLnPvodIteminputcharacter
icAPMatchingLnPvodItemTypeinputcharacter
icAPMatchingLnPvodLgChargeinputcharacter
icAPMatchingLnPvodPrjCodeinputcharacter
idAPMatchingLnPvodReceiptQtyinputdecimal
icAPMatchingLnPvodSiteinputcharacter
idAPMatchingLnPvodUnitPriceinputdecimal
idAPMatchingLnVarRateTCinputdecimal
icPvoDomaininputcharacter
icPvodOpAllocCodeinputcharacterInput parameter: Pending voucher operational allocation code.
icOpAllocCodeinputcharacter
icpod_locinputcharacter
iipod_opinputinteger
icpod_wo_Lotinputcharacter
icprh_siteinputcharacter
icprh_typeinputcharacter
icprh_vendinputcharacter
icpt_prod_lineinputcharacter
icpt_siteinputcharacter
icpvo_order_typeinputcharacter
icpvo_shipfrominputcharacter
icpvo_shiptoinputcharacter
icpvod_channelinputcharacter
icpvod_shiptoinputcharacter
icvd_typeinputcharacter
ocGLCodeoutputcharacter
ocDivisionCodeoutputcharacter
ocCostCentreCodeoutputcharacterCostCentreCode
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BAPMatching.GetGLPLVarRate


program code (program6/bapmatching.p)

/* ======================================================================== */
/* This method takes care of the creation of a posting-line for the Rate    */
/* Variance of pending-vouchers with no Logistic-charges and no discrepancy */
/* and where this is avg-costing on a normal item                           */
/* ======================================================================== */
/* Find out the correct GL, Div and CC that are used for this posting-line     */
/* All this information is simply stored in tAPMatchingLn                      */
/* =========================================================================== */
assign vcGLCode         = icAPMatchingLnPvodGLCode
       vcDivisionCode   = icAPMatchingLnPvodDivCode
       vcCostCentreCode = icAPMatchingLnPvodCCCode.

if (vcGLCode = "":U or 
    vcGLCode = ?)    and
   (icPvodOpAllocCode = "":U or
    icPvodOpAllocCode = ?)
then assign vcMsgAPMatching = trim(substitute(#T-101'Cannot find the inventory account to be used for updating the costing.':255(69392)t-101#,"ICC_CTRL":U,icPvoDomain)) + chr(10) + 
                              trim(substitute(#T-102'Technical details: &1.':222(55526)T-102#,"RateVar-Costing/2":U)).
                          
/* ================================== */
/* Raise error if GL is not yet known */
/* ================================== */
if vcMsgAPMatching <> "":U
then do :
    assign oiReturnStatus = -3.
    <M-72 run SetMessage (input  vcMsgAPMatching (icMessage), 
                 input  '':U (icArguments), 
                 input  '':U (icFieldName), 
                 input  '':U (icFieldValue), 
                 input  'E':U (icType), 
                 input  3 (iiSeverity), 
                 input  '':U (icRowid), 
                 input  'QadFin-8037':U (icFcMsgNumber), 
                 input  '':U (icFcExplanation), 
                 input  '':U (icFcIdentification), 
                 input  '':U (icFcContext), 
                 output viFcReturnSuper (oiReturnStatus)) in BAPMatching>
    Return.
end. /* if vcMsgAPMatching <> "":U */

/* ======================== */
/* Assign output parameters */
/* Set ReturnStatus = OK    */
/* ======================== */
assign ocGLCode         = vcGLCode
       ocDivisionCode   = vcDivisionCode
       ocCostCentreCode = vcCostCentreCode.