Re: Average Cost Not Calculating on PO Receipt - Solution XT4111Z1
Feeling industrious this morning. Here is the technical information relating to this issue:
/*-------------------------------------------------------------------------------
* Saras Babu 09.21.98 SAR 2493275
* When purchase order receipts is processing an initial receipt of
* a routing item, do not update the average cost. */
/*-------------------------------------------------------------------------------
* Saras Babu 09.21.98 SAR 2493275
* When purchase order receipts is processing an initial receipt of
* a routing item, do not update the average cost.
*
* SAR 7650516 - nTransaction is an int, don't treat as a JCHAR or
* it will cause memory violations.
*
* SAR 7889025 - Average Cost should be updated when purchase order receipts
* is not processing an initial receipt of a routing item; Transaction type
* is 4 in both cases; when the receipt routing is activated and also when receipt routing
* is not activated. Having the statement nTransaction != 4 will cause the system to not
* recalculate the average cost correctly. nTransaction != 4 is disabled because
* dsF41UI001.itvuil != _J('1') takes care of validating whether or not the
* average cost should be updated. when the item is in receipt routing the
* dsF41UI001.itvuil flag is set and the average cost is not updated.
*
if ((dsF41UI001.itvuil != _J('1')) && / * '1'- Do not write cardex records * /
(nTransaction != _J('4'))) / * '4'- From purchase order receipts * /
*/
if (dsF41UI001.itvuil != _J('1'))
{
IX4111Z1_UpdateAvrgCost(lpBhvrCom, lpVoid, &dsF41UI001, dsF4009.cpavgc,
lpDS->cMarginMaintenanceFlag, (JCHAR *) lpDS->szProgramID ) ;
}
}
/*------------------------------------------------------------------
* If Write Item Price Record (APRC) equals '1'
* If Program ID = "EP4113" and From Side Of Transfer (ITFTRN)
* equals '1'
* If Price Level (PLEV) equals '3'
* Call CopyWritePriceRecords(..)
* ELSE