| Description | Version: 2.35MP1 (Oracle)
The class "MaterialReceiptPending.java" has an error in the function "processPurchaseOrder". When it's looking for the DocumentNo, it gets a wrong value, because it's getting the values "C_DocTypeTarget_ID" and "C_DocType_ID" by the Context values, OK, but in the next line:
strDocumentno = Utility.getDocumentNo(this, vars, "", "M_InOut", Utility.getContext(this, vars, "C_DocTypeTarget_ID", docTargetType), Utility.getContext(this, vars, "C_DocType_ID", docTargetType), false, true);
the parameter "docTargetType" it's wrong, because it must be the ad_window_id (184), the "Goods Receipt" window. Due this, it doesn't find the Context value and use the session default value, generating an error in the DocumentNo, because the session value to "C_DocTypeTarget_ID" and "C_DocType_ID" are 1000026 (Sales Standard Order).
The correct line is the next:
strDocumentno = Utility.getDocumentNo(this, vars, "", "M_InOut", Utility.getContext(this, vars, "C_DocTypeTarget_ID", "184"), Utility.getContext(this, vars, "C_DocType_ID", "184"), false, true);
and you have to define two Preferences (one for "C_DocTypeTarget_ID" and another one for "C_DocType_ID") without User, to the window "Goods Receipt" and value "1000007" (MM Receipt with Confirmation) |