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
icAPMatchingLnGLCode | input | character | |
icAPMatchingLnDivCode | input | character | |
icAPMatchingLnCCCode | input | character | |
ilAPMatchingLnIsVarGLPosting | input | logical | |
idAPMatchingLnMatchQty | input | decimal | |
idAPMatchingLnMatchUnitPrice | input | decimal | |
icAPMatchingLnPvodCCCode | input | character | |
icAPMatchingLnPvodCostMtdCur | input | character | |
icAPMatchingLnPvodCostMtdGL | input | character | |
icAPMatchingLnPvodDivCode | input | character | |
icAPMatchingLnPvodGLCode | input | character | |
ilAPMatchingLnPvodIsLgCharge | input | logical | |
icAPMatchingLnPvodItem | input | character | |
icAPMatchingLnPvodItemType | input | character | |
icAPMatchingLnPvodLgCharge | input | character | |
icAPMatchingLnPvodPrjCode | input | character | |
idAPMatchingLnPvodReceiptQty | input | decimal | |
icAPMatchingLnPvodSite | input | character | |
idAPMatchingLnPvodUnitPrice | input | decimal | |
idAPMatchingLnVarRateTC | input | decimal | |
icPvoDomain | input | character | |
icPvodOpAllocCode | input | character | Input parameter: Pending voucher operational allocation code. |
icOpAllocCode | input | character | |
icpod_loc | input | character | |
iipod_op | input | integer | |
icpod_wo_Lot | input | character | |
icprh_site | input | character | |
icprh_type | input | character | |
icprh_vend | input | character | |
icpt_prod_line | input | character | |
icpt_site | input | character | |
icpvo_order_type | input | character | |
icpvo_shipfrom | input | character | |
icpvo_shipto | input | character | |
icpvod_channel | input | character | |
icpvod_shipto | input | character | |
icvd_type | input | character | |
ocGLCode | output | character | |
ocDivisionCode | output | character | |
ocCostCentreCode | output | character | CostCentreCode |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
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.